1

In Ubuntu 12.04, I have added three old HDD after formatting and encrypting them with disk util.

They work fine, no issues of functioning, however I don't know how to change the order they appear in the left pane of Nautilus.

I see this:

500GB Encrypted. 320Gb Encrypted. 320GB Encrypted.

I don't use them very often but when I do I have to try the password for each one before i get the right pass with the right disk.

So let's say I want to list them by size, can it be done before I try the password? Or, instead of "500Gb Encrypted" can it be changed to something else? (like 1st, 2nd, 3rd)

Thank you guys.

8
  • 1
    label your file system and nautilus will display the label rather then "500 Gb Encrypted". Labeling the filesystem varies by file system (vfat vs ntfs vs ext4 ve etc). See also bbs.archlinux.org/viewtopic.php?id=94153
    – Panther
    Nov 30, 2014 at 2:42
  • Thanks for your response; I read that thread but still not sure how to proceed. During the formatting of the HDD I gave them a specific name, but it only appears once I input the password. I want give them a name so i know which pass is for which HDD. Nov 30, 2014 at 2:57
  • What file system(s) are you using ? ext 4 ? ntfs ?
    – Panther
    Nov 30, 2014 at 2:57
  • ext4. Also the HDD I want to fix is NOT the one that has the OS on it. I use it for storage. Nov 30, 2014 at 3:09
  • Tried the command from thread to change the name to "RED" and got this: alex@myubuntu:~$ sudo e2label /dev/sdg RED e2label: Bad magic number in super-block while trying to open /dev/sdg Couldn't find valid filesystem superblock. Nov 30, 2014 at 3:11

1 Answer 1

1

Maybe you can try writing udev rules like this.

KERNEL=="sd*", ENV{ID_FS_UUID}=="your-disk1-uuid", ENV{ID_FS_LABEL}="Disk_1", ENV{ID_FS_LABEL_ENC}="Disk_1"
KERNEL=="sd*", ENV{ID_FS_UUID}=="your-disk2-uuid", ENV{ID_FS_LABEL}="Disk_2", ENV{ID_FS_LABEL_ENC}="Disk_2"
KERNEL=="sd*", ENV{ID_FS_UUID}=="your-disk3-uuid", ENV{ID_FS_LABEL}="Disk_3", ENV{ID_FS_LABEL_ENC}="Disk_3"
3
  • That might be a valid answer. It would be more understandable though if you'd explain a bit what these rules do. For someone not (very) familiar with udev.
    – Nephente
    Oct 4, 2015 at 16:32
  • 1
    These rules let you assign 'virtually' a label to a selected partition by its uuid, since it is not possible to assign a label on an encrypted partition. So the label is not stored on the partition itself.
    – MB4E
    Oct 4, 2015 at 19:40
  • This would be a far better answer if you added a few bits of information: (1) You find the UUID with the command sudo blkid /dev/sdaXXX, where XXX is the partition number you see in the Disks utility. This is different from the UUID that you get from right click-properties after mounting the disk. (2) You have to replace your-disk1-uuid with the disk's UUID (3) You have to put those command in a file named something.rules in /etc/udev/rules.d (directory writable by root only). Feb 10, 2016 at 13:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .