Suppose I have a situation like I have installed /etc and /boot in two separate partition which belongs to an USB device , and the rest of the system / and /home in the HDD. Now my question is I need to statically route the USB device in my fstab , but the problem is there is no certainty that the USB will always take say /dev/sdb or /dev/sdc , so my approach would be to use BLKID.
Here I am confused as to whether the BLKID of a particular Hardware Device ( With a static Hardware ID) always the same? if not what is the work around in the situation?
How are BLKID's Assigned ?
An article modestly called UUIDs and Linux: Everything you ever need to know states that UUID's of disk devices are stored in superblocks, so they are persistent and can be used in /etc/fstab (in place of /dev device references). An example entry in fstab might look like
If you want to change the UUID of an ext2 partition,
tune2fs(for example) provides the means. Eg:Also see the
blkidman page and to see a list of disk devices organized by UUID, sayls -l /dev/disk/by-uuid.