Persistent drive naming in Ubuntu - any ideas?

tankman1989

Active Member
Reaction score
5
It seems that Ubuntu has the habit of randomly changing the /dev/disk-id of the sata drives in my computer. This makes things difficult when setting up fstab and samba because the drives aren't the same from one boot to another. This really makes no sense to me as I've never had this problem before (maybe it's something with 12.04?)

What I want to do is have the same drive be identified as the same device each time, such as /dev/sda1 is always dev/sda1. I'm not swapping drives or anything so I don't know why this is an issue.

I know I can find out information about the drives by doing the following commands:
ls -la /dev/disk/by-uuid/ and ls -la /dev/disk/by-id.


The problem is I don't know what to do with this information once I find it. Do I use this in the FSTAB to identify the disk instead of say /dev/sda? Do I input the UUID instead of the /dev/sda1?

Any suggestions or ideas here are geratly appreciated!
 
Use the UUID in fstab, to mount those drives on start up to a specified location. That should solve you issues. :)
 
Back
Top