Change Name of External USB Drive
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Change Name of External USB Drive
It appears that Linux Mint doesn't allow changing the name of a USB-connected drive without formatting. This can be easily done in Windows with a right click. Mint "ghosts out" the "rename" option. I have gone into Properties and checked other ways but cannot find one. Am I missing the way to do this?
Thank you.
Thank you.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Linux Mint 20 Cinnamon/Xfce. Linux Mint enthusiast since spring 2012.
Re: Change Name of External USB Drive
Sadly you don't tell us what the filesystem is on the drive so I can only guess, so I could be wrong. I will guess it is Fat32 as that is common for this sort of drive. So I will assume that you want to change a usb drive formatted fat32, known to the kernel as /dev/sdc1(another guess) and to call it myusbdrive (a third guess).
1)
2)
3)
To check
4)
1)
Code: Select all
echo mtools_skip_check=1 >> ~/.mtoolsrc
Code: Select all
sudo umount /dev/sdc1
Code: Select all
sudo mlabel -i /dev/sdc1 ::myusbdrive
4)
Code: Select all
sudo mlabel -i /dev/sdc1 -s ::
Re: Change Name of External USB Drive
I thought that it was FAT32. Under Properties the file system type is shown as "msdos."
Thank you.
Thank you.
Linux Mint 20 Cinnamon/Xfce. Linux Mint enthusiast since spring 2012.
Re: Change Name of External USB Drive
Install GParted:
You need to logout and login again for it to show up in the Menu for some reason but you can launch it from the terminal:
Then unmount the device through gparted: Right Click > Unmount
Set the new label: Right Click > Label
Remount it
Code: Select all
sudo apt-get install gparted
Code: Select all
gksu gparted
Set the new label: Right Click > Label
Remount it
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Re: Change Name of External USB Drive
I installed GParted. When I right click on the drive and click Unmount, a small window about a "libparted bug found" pops up, saying something is corrupt with a table, but the main is OK, so it will be used instead. I ciick OK, and GParted closes. (and the drive in question unmounts) That's as far as I can get with it.
Thank you.
Thank you.
Linux Mint 20 Cinnamon/Xfce. Linux Mint enthusiast since spring 2012.
Re: Change Name of External USB Drive
Never, not once, did I ever have a problem with gparted so I've never received an error message. If the table it's referencing is the partition table that's another problem. You might want to plug the USB device in again and post the output of the following commands so people here can see what's up:
You might also want to tell us what operating system you are using:
Mint main or LMDE?
Version 13, 14 ?
Cinnamon, MATE, XFCE, .. ?
Code: Select all
sudo parted -l
Code: Select all
sudo blkid -c /dev/null
Code: Select all
sudo fdisk -l
Mint main or LMDE?
Version 13, 14 ?
Cinnamon, MATE, XFCE, .. ?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Re: Change Name of External USB Drive
Tim, you are perfectly welcome to try Altair4's solution to this if you prefer it, but mtools as described above is equally capable of renaming msdos devices, in fact that is what it is designed for:
Did you try it? If so did it fail?Mtools is a collection of tools to allow Unix systems to manipulate MS-DOS files
Re: Change Name of External USB Drive
Thank you both for your time and trouble. According to Software Manager, Mtools is installed; but where it is I cannot figure. It is not anywhere in the Menu.
Following altair4's suggestion, the Terrminal returns the following:
tim@tim-G31T-M ~ $ sudo parted -l
[sudo] password for tim:
Model: ATA Hitachi HDP72505 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 496GB 496GB primary ext4 boot
2 496GB 500GB 4282MB extended
5 496GB 500GB 4282MB logical linux-swap(v1)
Error: The backup GPT table is corrupt, but the primary appears OK, so that will
be used.
OK/Cancel? OK
Model: I-O DATA HDCR-U (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 20.5kB 1000GB 1000GB fat32 primary
tim@tim-G31T-M ~ $ sudo blkid -c /dev/null
/dev/sda1: UUID="bc05b019-d439-480d-bee9-73f599886f6f" TYPE="ext4"
/dev/sda5: UUID="a9c3e594-e67c-49dd-906a-fb54772b8f54" TYPE="swap"
/dev/sdb1: LABEL="IO DATA 1TB" UUID="5E62-7CAF" TYPE="vfat"
tim@tim-G31T-M ~ $ sudo fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00020639
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 968404991 484201472 83 Linux
/dev/sda2 968407038 976771071 4182017 5 Extended
/dev/sda5 968407040 976771071 4182016 82 Linux swap / Solaris
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 1 1953525167 976762583+ ee GPT
tim@tim-G31T-M ~ $
*** end of that mess ***
Note the Error message about the GPT table being corrupt. That is the same message that GParted gave me.
This is not a big problem. The other day I simply wanted to change the name of the drive, and could not do so in my Linux system (Mint Main 14 Cinnamon). I then plugged the drive into my notebok with Windows 7 and easily did it. I then wondered what would I have done without Windows. Little things like that bug me
I look forward to the day when I do not have to rely on Windows to do something because Mint can't. That will be nice.
Thanks again.
Following altair4's suggestion, the Terrminal returns the following:
tim@tim-G31T-M ~ $ sudo parted -l
[sudo] password for tim:
Model: ATA Hitachi HDP72505 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 1049kB 496GB 496GB primary ext4 boot
2 496GB 500GB 4282MB extended
5 496GB 500GB 4282MB logical linux-swap(v1)
Error: The backup GPT table is corrupt, but the primary appears OK, so that will
be used.
OK/Cancel? OK
Model: I-O DATA HDCR-U (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 20.5kB 1000GB 1000GB fat32 primary
tim@tim-G31T-M ~ $ sudo blkid -c /dev/null
/dev/sda1: UUID="bc05b019-d439-480d-bee9-73f599886f6f" TYPE="ext4"
/dev/sda5: UUID="a9c3e594-e67c-49dd-906a-fb54772b8f54" TYPE="swap"
/dev/sdb1: LABEL="IO DATA 1TB" UUID="5E62-7CAF" TYPE="vfat"
tim@tim-G31T-M ~ $ sudo fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00020639
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 968404991 484201472 83 Linux
/dev/sda2 968407038 976771071 4182017 5 Extended
/dev/sda5 968407040 976771071 4182016 82 Linux swap / Solaris
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 1 1953525167 976762583+ ee GPT
tim@tim-G31T-M ~ $
*** end of that mess ***
Note the Error message about the GPT table being corrupt. That is the same message that GParted gave me.
This is not a big problem. The other day I simply wanted to change the name of the drive, and could not do so in my Linux system (Mint Main 14 Cinnamon). I then plugged the drive into my notebok with Windows 7 and easily did it. I then wondered what would I have done without Windows. Little things like that bug me
I look forward to the day when I do not have to rely on Windows to do something because Mint can't. That will be nice.
Thanks again.
Linux Mint 20 Cinnamon/Xfce. Linux Mint enthusiast since spring 2012.
Re: Change Name of External USB Drive
mtools is a set of command line utilities, they have no gui, so they will not show up in the menu. They were meant to be used they way Viking777 described in his post. Will it work with partitions defined by GPT tables? I don't know - I've never tried. Viking777 no doubt knows however.According to Software Manager, Mtools is installed; but where it is I cannot figure. It is not anywhere in the Menu.
fdisk doesn't know how to handle GPT partition tables but ironically GParted does so I'm wondering what the extent of this corruption is that GParted fails on you. No doubt you have a lot of stuff on the disk so if it works then why try to "uncorrupt" it.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
Re: Change Name of External USB Drive
Actually I haven't tested mlabel with gpt partitioned disks so it might not work. One question springs to mind and that is why do you need a gpt partitioned disk on an external drive? It is not over 2 Tb so it doesn't need this and I don't really see how it benefits from it.
However if gpt is what you have or what you want then I have another solution for you - gdisk. It isn't installed by default, but it is the package manager, so install it and then run:
(Make sure your external disk is still called /dev/sdb first).
This will ask you for a command.
The command to change a partitions name is the letter c - so type that and press enter.
It will ask you which partition you want to rename - in this case you only have one so the answer is - 1 (in fact because you only have one partition it might not even ask you this).
It will then ask you to enter a name - your choice.
It will then ask you for another command. In order to proceed you press the letter w (for write) to quit you press the letter q. Nothing has been done until you press the letter w, all changes you have made are saved in memory until you press that key followed by enter.
But as you have already renamed your drive in windows you wont need to do this. But you can make a note of it for another time.
However if gpt is what you have or what you want then I have another solution for you - gdisk. It isn't installed by default, but it is the package manager, so install it and then run:
Code: Select all
sudo gdisk /dev/sdb
This will ask you for a command.
The command to change a partitions name is the letter c - so type that and press enter.
It will ask you which partition you want to rename - in this case you only have one so the answer is - 1 (in fact because you only have one partition it might not even ask you this).
It will then ask you to enter a name - your choice.
It will then ask you for another command. In order to proceed you press the letter w (for write) to quit you press the letter q. Nothing has been done until you press the letter w, all changes you have made are saved in memory until you press that key followed by enter.
But as you have already renamed your drive in windows you wont need to do this. But you can make a note of it for another time.
Re: Change Name of External USB Drive
No, there is no need; I'm just thinking about the future. Anyway, I would really like to avoid using the Terminal and commands unless it's really vital and a last resort. Anyway, I've got to put this on the back burner for now. Thank you again for your time. I do appreciate it.
Linux Mint 20 Cinnamon/Xfce. Linux Mint enthusiast since spring 2012.
Re: Change Name of External USB Drive
Really? In order to change drive label I need to manually mount/unmount drive, figure out its location, and copy paste mlabel command to do it? Or, even better, install a 3rd party tool (Gparted) to do it?
I hope you guys understand that this is not exactly user friendly. Windows, as someone mentioned it, solves this problem elegantly. This is a problem that should be addressed and fixed, in my opinion.
I hope you guys understand that this is not exactly user friendly. Windows, as someone mentioned it, solves this problem elegantly. This is a problem that should be addressed and fixed, in my opinion.
Re: Change Name of External USB Drive
Do you normally rely on seven year old forum threads in Windows?
It's true, though. Linux isn't Windows. If that's going to frustrate you, probably better to stick with Windows.
It's true, though. Linux isn't Windows. If that's going to frustrate you, probably better to stick with Windows.
Re: Change Name of External USB Drive
I hope you know this Thread is 7 years old...the intelligence of a Windows user just amazes me.Betalord wrote: ⤴Sun Aug 02, 2020 12:38 pm Really? In order to change drive label I need to manually mount/unmount drive, figure out its location, and copy paste mlabel command to do it? Or, even better, install a 3rd party tool (Gparted) to do it?
I hope you guys understand that this is not exactly user friendly. Windows, as someone mentioned it, solves this problem elegantly. This is a problem that should be addressed and fixed, in my opinion.
You can Re-Name an External HDD or Flash Drive without a Command or Gparted and has been the case for a long time.
See...
The secret is knowing how to do it.
Linux For Ever...Windows Never.
The Freedom To Choose Your Own Avatar Without Victimisation.
The Freedom To Choose Your Own Avatar Without Victimisation.