How do I change the “label” reported by lsblk?
I have a USB stick that once-upon-a-time contained Ubuntu installation media. I have repurposed the device, but the original label has stuck despite my efforts to change it.
lsblk -o label
reports that the name is Ubuntu 16.10 amd64 (from prior use). lsblk
reports this same label for each of its 4 new partitions, and this label shows up as a mountpoint each time I insert the disk. This is confusing from many perspectives.
I have tried the following, unsuccessfully:
- changing partition names using parted
- re-partitioning
- new disk label (gpt)
- new UUIDs for disk and partitions
- different computers.
Where is this "label" coming from, and how do I change it?
partitioning usb-drive
New contributor
add a comment |
I have a USB stick that once-upon-a-time contained Ubuntu installation media. I have repurposed the device, but the original label has stuck despite my efforts to change it.
lsblk -o label
reports that the name is Ubuntu 16.10 amd64 (from prior use). lsblk
reports this same label for each of its 4 new partitions, and this label shows up as a mountpoint each time I insert the disk. This is confusing from many perspectives.
I have tried the following, unsuccessfully:
- changing partition names using parted
- re-partitioning
- new disk label (gpt)
- new UUIDs for disk and partitions
- different computers.
Where is this "label" coming from, and how do I change it?
partitioning usb-drive
New contributor
3
Possible duplicate of How do I rename a USB drive?
– George Udosen
1 hour ago
add a comment |
I have a USB stick that once-upon-a-time contained Ubuntu installation media. I have repurposed the device, but the original label has stuck despite my efforts to change it.
lsblk -o label
reports that the name is Ubuntu 16.10 amd64 (from prior use). lsblk
reports this same label for each of its 4 new partitions, and this label shows up as a mountpoint each time I insert the disk. This is confusing from many perspectives.
I have tried the following, unsuccessfully:
- changing partition names using parted
- re-partitioning
- new disk label (gpt)
- new UUIDs for disk and partitions
- different computers.
Where is this "label" coming from, and how do I change it?
partitioning usb-drive
New contributor
I have a USB stick that once-upon-a-time contained Ubuntu installation media. I have repurposed the device, but the original label has stuck despite my efforts to change it.
lsblk -o label
reports that the name is Ubuntu 16.10 amd64 (from prior use). lsblk
reports this same label for each of its 4 new partitions, and this label shows up as a mountpoint each time I insert the disk. This is confusing from many perspectives.
I have tried the following, unsuccessfully:
- changing partition names using parted
- re-partitioning
- new disk label (gpt)
- new UUIDs for disk and partitions
- different computers.
Where is this "label" coming from, and how do I change it?
partitioning usb-drive
partitioning usb-drive
New contributor
New contributor
edited 1 hour ago
Zanna
49.9k13130237
49.9k13130237
New contributor
asked 3 hours ago
JeQFBu
111
111
New contributor
New contributor
3
Possible duplicate of How do I rename a USB drive?
– George Udosen
1 hour ago
add a comment |
3
Possible duplicate of How do I rename a USB drive?
– George Udosen
1 hour ago
3
3
Possible duplicate of How do I rename a USB drive?
– George Udosen
1 hour ago
Possible duplicate of How do I rename a USB drive?
– George Udosen
1 hour ago
add a comment |
2 Answers
2
active
oldest
votes
Since the label is a property of the filesystem there are individual ways to set the label for different file systems.
for ext2/ext3/ext4 filesystems you use:
e2label /dev/XXX <label>
for btrfs:
btrfs filesystem label /dev/XXX <label>
for reiserfs:
reiserfstune -l <label> /dev/XXX
for jfs:
jfs_tune -L <label> /dev/XXX
for xfs:
xfs_admin -L <label> /dev/XXX
for fat/vfat (using dosfstools):
fatlabel /dev/XXX <label>
OR (using mtools):
mlabel -i /dev/XXX ::<label>
for exfat:
exfatlabel /dev/XXX <label>
for ntfs:
ntfslabel /dev/XXX <label>
for swap:
swaplabel -L <label> /dev/XXX
source: https://wiki.archlinux.org/index.php/persistent_block_device_naming#by-label
New contributor
1
Welcome to Ask Ubuntu! :-) Excellent first answer! +1 Please do take the tour to familiarize yourself with how this site works as it's something like the star in the middle of this... ;-)
– Fabby
20 mins ago
add a comment |
The easy way is to start gparted
and in the top right go to /dev/XdY
:
The options are:
right-click the partition you want to rename and click Label file system
Then type the name you want the partition to have and press OK
Repeat for the other partitions.
Click the little green check-mark, applying all operations
If that would fail, take option 2:
Go to the menu Device - Create Partition Table - msdos and this
will destroy everything on the USB disk,
including the partitions with their silly names.
Note: If you would want to do this from the command line the hard way, use parted
instead of gparted
. ;-)
2
... or fairly easy via the command line withtune2fs
forext2/ext3/ext4
file systems. (+1 by the way)
– sudodus
24 mins ago
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
JeQFBu is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1103569%2fhow-do-i-change-the-label-reported-by-lsblk%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Since the label is a property of the filesystem there are individual ways to set the label for different file systems.
for ext2/ext3/ext4 filesystems you use:
e2label /dev/XXX <label>
for btrfs:
btrfs filesystem label /dev/XXX <label>
for reiserfs:
reiserfstune -l <label> /dev/XXX
for jfs:
jfs_tune -L <label> /dev/XXX
for xfs:
xfs_admin -L <label> /dev/XXX
for fat/vfat (using dosfstools):
fatlabel /dev/XXX <label>
OR (using mtools):
mlabel -i /dev/XXX ::<label>
for exfat:
exfatlabel /dev/XXX <label>
for ntfs:
ntfslabel /dev/XXX <label>
for swap:
swaplabel -L <label> /dev/XXX
source: https://wiki.archlinux.org/index.php/persistent_block_device_naming#by-label
New contributor
1
Welcome to Ask Ubuntu! :-) Excellent first answer! +1 Please do take the tour to familiarize yourself with how this site works as it's something like the star in the middle of this... ;-)
– Fabby
20 mins ago
add a comment |
Since the label is a property of the filesystem there are individual ways to set the label for different file systems.
for ext2/ext3/ext4 filesystems you use:
e2label /dev/XXX <label>
for btrfs:
btrfs filesystem label /dev/XXX <label>
for reiserfs:
reiserfstune -l <label> /dev/XXX
for jfs:
jfs_tune -L <label> /dev/XXX
for xfs:
xfs_admin -L <label> /dev/XXX
for fat/vfat (using dosfstools):
fatlabel /dev/XXX <label>
OR (using mtools):
mlabel -i /dev/XXX ::<label>
for exfat:
exfatlabel /dev/XXX <label>
for ntfs:
ntfslabel /dev/XXX <label>
for swap:
swaplabel -L <label> /dev/XXX
source: https://wiki.archlinux.org/index.php/persistent_block_device_naming#by-label
New contributor
1
Welcome to Ask Ubuntu! :-) Excellent first answer! +1 Please do take the tour to familiarize yourself with how this site works as it's something like the star in the middle of this... ;-)
– Fabby
20 mins ago
add a comment |
Since the label is a property of the filesystem there are individual ways to set the label for different file systems.
for ext2/ext3/ext4 filesystems you use:
e2label /dev/XXX <label>
for btrfs:
btrfs filesystem label /dev/XXX <label>
for reiserfs:
reiserfstune -l <label> /dev/XXX
for jfs:
jfs_tune -L <label> /dev/XXX
for xfs:
xfs_admin -L <label> /dev/XXX
for fat/vfat (using dosfstools):
fatlabel /dev/XXX <label>
OR (using mtools):
mlabel -i /dev/XXX ::<label>
for exfat:
exfatlabel /dev/XXX <label>
for ntfs:
ntfslabel /dev/XXX <label>
for swap:
swaplabel -L <label> /dev/XXX
source: https://wiki.archlinux.org/index.php/persistent_block_device_naming#by-label
New contributor
Since the label is a property of the filesystem there are individual ways to set the label for different file systems.
for ext2/ext3/ext4 filesystems you use:
e2label /dev/XXX <label>
for btrfs:
btrfs filesystem label /dev/XXX <label>
for reiserfs:
reiserfstune -l <label> /dev/XXX
for jfs:
jfs_tune -L <label> /dev/XXX
for xfs:
xfs_admin -L <label> /dev/XXX
for fat/vfat (using dosfstools):
fatlabel /dev/XXX <label>
OR (using mtools):
mlabel -i /dev/XXX ::<label>
for exfat:
exfatlabel /dev/XXX <label>
for ntfs:
ntfslabel /dev/XXX <label>
for swap:
swaplabel -L <label> /dev/XXX
source: https://wiki.archlinux.org/index.php/persistent_block_device_naming#by-label
New contributor
New contributor
answered 40 mins ago
qwertz
411
411
New contributor
New contributor
1
Welcome to Ask Ubuntu! :-) Excellent first answer! +1 Please do take the tour to familiarize yourself with how this site works as it's something like the star in the middle of this... ;-)
– Fabby
20 mins ago
add a comment |
1
Welcome to Ask Ubuntu! :-) Excellent first answer! +1 Please do take the tour to familiarize yourself with how this site works as it's something like the star in the middle of this... ;-)
– Fabby
20 mins ago
1
1
Welcome to Ask Ubuntu! :-) Excellent first answer! +1 Please do take the tour to familiarize yourself with how this site works as it's something like the star in the middle of this... ;-)
– Fabby
20 mins ago
Welcome to Ask Ubuntu! :-) Excellent first answer! +1 Please do take the tour to familiarize yourself with how this site works as it's something like the star in the middle of this... ;-)
– Fabby
20 mins ago
add a comment |
The easy way is to start gparted
and in the top right go to /dev/XdY
:
The options are:
right-click the partition you want to rename and click Label file system
Then type the name you want the partition to have and press OK
Repeat for the other partitions.
Click the little green check-mark, applying all operations
If that would fail, take option 2:
Go to the menu Device - Create Partition Table - msdos and this
will destroy everything on the USB disk,
including the partitions with their silly names.
Note: If you would want to do this from the command line the hard way, use parted
instead of gparted
. ;-)
2
... or fairly easy via the command line withtune2fs
forext2/ext3/ext4
file systems. (+1 by the way)
– sudodus
24 mins ago
add a comment |
The easy way is to start gparted
and in the top right go to /dev/XdY
:
The options are:
right-click the partition you want to rename and click Label file system
Then type the name you want the partition to have and press OK
Repeat for the other partitions.
Click the little green check-mark, applying all operations
If that would fail, take option 2:
Go to the menu Device - Create Partition Table - msdos and this
will destroy everything on the USB disk,
including the partitions with their silly names.
Note: If you would want to do this from the command line the hard way, use parted
instead of gparted
. ;-)
2
... or fairly easy via the command line withtune2fs
forext2/ext3/ext4
file systems. (+1 by the way)
– sudodus
24 mins ago
add a comment |
The easy way is to start gparted
and in the top right go to /dev/XdY
:
The options are:
right-click the partition you want to rename and click Label file system
Then type the name you want the partition to have and press OK
Repeat for the other partitions.
Click the little green check-mark, applying all operations
If that would fail, take option 2:
Go to the menu Device - Create Partition Table - msdos and this
will destroy everything on the USB disk,
including the partitions with their silly names.
Note: If you would want to do this from the command line the hard way, use parted
instead of gparted
. ;-)
The easy way is to start gparted
and in the top right go to /dev/XdY
:
The options are:
right-click the partition you want to rename and click Label file system
Then type the name you want the partition to have and press OK
Repeat for the other partitions.
Click the little green check-mark, applying all operations
If that would fail, take option 2:
Go to the menu Device - Create Partition Table - msdos and this
will destroy everything on the USB disk,
including the partitions with their silly names.
Note: If you would want to do this from the command line the hard way, use parted
instead of gparted
. ;-)
edited 2 hours ago
answered 2 hours ago
Fabby
26.3k1360159
26.3k1360159
2
... or fairly easy via the command line withtune2fs
forext2/ext3/ext4
file systems. (+1 by the way)
– sudodus
24 mins ago
add a comment |
2
... or fairly easy via the command line withtune2fs
forext2/ext3/ext4
file systems. (+1 by the way)
– sudodus
24 mins ago
2
2
... or fairly easy via the command line with
tune2fs
for ext2/ext3/ext4
file systems. (+1 by the way)– sudodus
24 mins ago
... or fairly easy via the command line with
tune2fs
for ext2/ext3/ext4
file systems. (+1 by the way)– sudodus
24 mins ago
add a comment |
JeQFBu is a new contributor. Be nice, and check out our Code of Conduct.
JeQFBu is a new contributor. Be nice, and check out our Code of Conduct.
JeQFBu is a new contributor. Be nice, and check out our Code of Conduct.
JeQFBu is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1103569%2fhow-do-i-change-the-label-reported-by-lsblk%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
3
Possible duplicate of How do I rename a USB drive?
– George Udosen
1 hour ago