Ubuntu fstab changes

A couple of weeks ago, I had a look at /etc/fstab for some reason. I was a little surprised to see that things have changed. Where partitions were labeled /dev/hda1 etc., now they look like this:-

# /dev/sda5 -- converted during upgrade to edgy
UUID=2350b9c8-c62a-4c50-b494-6c7db3438192 / ext3 defaults,errors=remount-ro 0 1

This confused me a bit, but I did not do anything about it. What worried me was how would I know which drive or partition was being referred to. I let this go until a discussion that mentioned /etc/fstab came up on my local LUG mailing list.

Well it would appear that the idea behind the change is that with the latest drive technologies, there are so many possible drive connections, what with multiple SATA, IDE, RAID etc, a new method of drive and partition naming was needed. The UUID referred to above is taken from the actual partition. Therefore, drives can be moved around without having to edit /etc/fstab each time.

To find out where these partitions are, or what the UUID of a partition may be, a quick look at /dev/disk should be the place to start.

I am not an authority on this. I am just writing this primarily as a memory aid for myself. If I have missed anything important, please add a comment below.

3 thoughts on “Ubuntu fstab changes

  1. Nice item on the changes in fstab. I admit I was a little lost when seeing this apparent garbage in my file. I am sure the pros will outweigh the cons, but for now, it’s kind of a pain to enter that UUID number when a simple /dev/hda1 would suffice!

  2. just landed here via google after looking for RAID setup information, but i thought i’d point out that the UUID changes don’t just affect /etc/fstab. they will also need to go into /boot/grub/menu.lst e.g.:

    [code]
    title Linux 2.6.20
    root (hd0,2)
    kernel /boot/vmlinuz-2.6.20 root=UUID=e9c7a9a6-2600-4d94-bca1-3a110553fc33 ro quiet splash
    initrd /boot/initrd.img-2.6.20
    quiet
    savedefault
    boot
    [/code]

    a quick way of seeing what maps to what is:
    [code]fatcat[pb] ls -l /dev/disk/by-uuid/
    total 0
    lrwxrwxrwx 1 root root 10 2007-02-16 09:51 1a34d018-dbc3-4313-bcc2-8ae0c03b1ab0 -> ../../hda1
    lrwxrwxrwx 1 root root 10 2007-02-16 09:51 5f4dd93e-54ec-493c-9983-7af7a1a2ead2 -> ../../hdc1
    lrwxrwxrwx 1 root root 10 2007-02-16 09:51 77e1b034-034c-4fa9-8f6a-bd9428c9b991 -> ../../hdc2
    lrwxrwxrwx 1 root root 10 2007-02-16 09:51 7d176ac0-4c1a-46a9-86c4-88adbd77477c -> ../../hda2
    lrwxrwxrwx 1 root root 10 2007-02-16 09:51 e9c7a9a6-2600-4d94-bca1-3a110553fc33 -> ../../hda3
    lrwxrwxrwx 1 root root 10 2007-02-16 09:51 f1c47b43-46ec-43bf-b4bd-571d678cf406 -> ../../hdc3
    [/code]

    ostensibly rather clunky, but i guess future proof…

  3. Thnx a bunch sheepshearer: ls -l /dev/disk/by-uuid worked for me 🙂 (I just needed to find the mappings)

Comments are closed.