How do I change the “label” reported by lsblk?












2














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?










share|improve this question









New contributor




JeQFBu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 3




    Possible duplicate of How do I rename a USB drive?
    – George Udosen
    1 hour ago
















2














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?










share|improve this question









New contributor




JeQFBu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 3




    Possible duplicate of How do I rename a USB drive?
    – George Udosen
    1 hour ago














2












2








2







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?










share|improve this question









New contributor




JeQFBu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











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






share|improve this question









New contributor




JeQFBu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




JeQFBu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 1 hour ago









Zanna

49.9k13130237




49.9k13130237






New contributor




JeQFBu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 3 hours ago









JeQFBu

111




111




New contributor




JeQFBu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





JeQFBu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






JeQFBu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 3




    Possible duplicate of How do I rename a USB drive?
    – George Udosen
    1 hour ago














  • 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










2 Answers
2






active

oldest

votes


















4














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






share|improve this answer








New contributor




qwertz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.














  • 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





















3














The easy way is to start gparted and in the top right go to /dev/XdY:



enter image description here



The options are:





  1. 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:





  1. 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. ;-)






share|improve this answer



















  • 2




    ... or fairly easy via the command line with tune2fs for ext2/ext3/ext4 file systems. (+1 by the way)
    – sudodus
    24 mins ago













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.










draft saved

draft discarded


















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









4














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






share|improve this answer








New contributor




qwertz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.














  • 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


















4














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






share|improve this answer








New contributor




qwertz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.














  • 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
















4












4








4






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






share|improve this answer








New contributor




qwertz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









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







share|improve this answer








New contributor




qwertz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this answer



share|improve this answer






New contributor




qwertz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









answered 40 mins ago









qwertz

411




411




New contributor




qwertz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





qwertz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






qwertz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 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




    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















3














The easy way is to start gparted and in the top right go to /dev/XdY:



enter image description here



The options are:





  1. 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:





  1. 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. ;-)






share|improve this answer



















  • 2




    ... or fairly easy via the command line with tune2fs for ext2/ext3/ext4 file systems. (+1 by the way)
    – sudodus
    24 mins ago


















3














The easy way is to start gparted and in the top right go to /dev/XdY:



enter image description here



The options are:





  1. 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:





  1. 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. ;-)






share|improve this answer



















  • 2




    ... or fairly easy via the command line with tune2fs for ext2/ext3/ext4 file systems. (+1 by the way)
    – sudodus
    24 mins ago
















3












3








3






The easy way is to start gparted and in the top right go to /dev/XdY:



enter image description here



The options are:





  1. 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:





  1. 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. ;-)






share|improve this answer














The easy way is to start gparted and in the top right go to /dev/XdY:



enter image description here



The options are:





  1. 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:





  1. 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. ;-)







share|improve this answer














share|improve this answer



share|improve this answer








edited 2 hours ago

























answered 2 hours ago









Fabby

26.3k1360159




26.3k1360159








  • 2




    ... or fairly easy via the command line with tune2fs for ext2/ext3/ext4 file systems. (+1 by the way)
    – sudodus
    24 mins ago
















  • 2




    ... or fairly easy via the command line with tune2fs for ext2/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












JeQFBu is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

404 Error Contact Form 7 ajax form submitting

How to know if a Active Directory user can login interactively

Refactoring coordinates for Minecraft Pi buildings written in Python