1

I would like to rename the disks in my system, so that I can comfortably differ between all the removable drives I have. I know that it is possible to assign different labels to single partitions, but I haven't read anything about renaming the actual drive itself.

The Debian installation image however managed to relabel the drive as seen below:

lsblk
NAME                  LABEL                  SIZE MAJ:MIN RM TYPE MOUNTPOINT
sdd                   Debian 9.0.0 amd64 n 115,3G   8:48   1 disk 
├─sdd2                NTFS_36GB             33,5G   8:50   1 part 
├─sdd3                FAT32_16GB            14,7G   8:51   1 part 
└─sdd1                EXT4_72GB             67,1G   8:49   1 part 

(I created and relabeled the Partitions myself)

So I would like to know how that works and how I can change the disklabel (/dev/sdx), not the label of the partitions (/dev/sdxy), myself.

And as far as I'm concerned this is not a duplicate, because I am NOT looking for a way to rename the drives partitions (which is what I already did), but the DRIVE ITSELF (see output of lsblk seen above: The drive is called "Debian 9.0.0 amd64 n", the partitions are called " FAT32_16GB" and so on.)

I would appreciate any help I can get.

Update:

Output of sudo file -s /dev/sdd:

/dev/sdd: DOS/MBR boot sector ISO 9660 CD-ROM filesystem data (DOS/MBR boot sector) 'Debian 9.0.0 amd64 n' (bootable); partition 1 : ID=0xee, start-CHS (0x0,0,1), end-CHS (0x3ff,254,63), startsector 1, 241827839 sectors, extended partition table (last)

Output of lsblk --output NAME,UUID,PARTUUID:

NAME                  UUID                                   PARTUUID
sdd                   2017-06-17-13-08-59-00                 
├─sdd2                2D530D7137CBDA43                       afc5a866-4b80-463d-9a01-d196a333dadd
├─sdd3                FD8F-3B99                              132b5e3d-3607-4327-a89e-c6b311f2c1cf
└─sdd1                5c8a0658-bcfb-41ba-8145-a1475e6ca4c7   cc2c2983-4cc5-4228-9cc3-5401b7d21803

Output of sudo fdisk -l /dev/sdd:

Disk /dev/sdd: 115,3 GiB, 123815854080 bytes, 241827840 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
Disklabel type: gpt
Disk identifier: 32C4D45A-8930-4D9F-8C2B-1CD08A292466
  • The two partition table formats currently enjoying wide use, MBR and GPT, don't support drive labels and neither do the tools that deal with them. However, you can use Udev rules to create symbolic links with hand-picked names to the device nodes based on model/serial names/numbers. If that's what you want please leave a comment so I can write a proper answer once this question is reopened. – David Foerster Jul 28 '17 at 11:03
  • Well that's odd. Wonder what that installation image did there then... Would be great if you could show me how to do so, that would definitely help me. Thank you! –  Jul 29 '17 at 13:37
  • Is this a MBR or GPT partition table? What's the output of sudo file -s /dev/sdd? (GPT assigns a drive GUID that is a more reliable way to uniquely identify drives than serial numbers and model names.) – David Foerster Jul 29 '17 at 14:04

0 Answers0