Thursday, November 27, 2008

uuid fstab and grub menu.lst

So Finally uuids are there in my config files. They are absically the identifaication of ur partitions irrespective of the detected device points. They look weird but are very useful especially in case u r changing ur hardsisks places in ur cabinet or u have a raid controller sitting and u r not using raid configuration.
So here is the process:

  1. become root
  2. # blkid (will give u the uuid of machine)
  3. /dev/sda1: UUID="2f1b9e84-dc33-4649-bb78-634afb6deb0c" TYPE="ext3"
    /dev/sdb1: UUID="74bef01f-605c-4d29-9e26-928c3dbaf315" TYPE="ext3"


  4. open ur fstab (the original looks like this)
  5. # /etc/fstab: static file system information.
    #
    #

    proc /proc proc defaults 0 0
    /dev/sda1 / ext3 defaults,errors=remount-ro 0 1 errors=remount-ro 0 1
    /dev/sdb1 /home ext3 defaults 0 2
    /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0

  6. replace the /dev things of partions with uuid and remember to comment out lld lines fore referenfe purpose and dont delete them.

  7. here is new fstab

  8. # /etc/fstab: static file system information.
    #
    #

    proc /proc proc defaults 0 0
    #/dev/sda1 / ext3 defaults,errors=remount-ro 0 1
    UUID=2f1b9e84-dc33-4649-bb78-634afb6deb0c / ext3 defaults,errors=remount-ro 0 1
    #/dev/sdb1 /home ext3 defaults 0 2
    UUID=74bef01f-605c-4d29-9e26-928c3dbaf315 /home ext3 defaults 0 2
    /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0


  9. now move ur /boot/grub/menu.lst to /root for backup and on commnad line do #update-grub. here is the new menu.lst


  10. Go for reboot once if u r not using raid controller without raid configuration or 2-3 times reboot in case u r using one.

  11. U can make a backup grub cd/floppy or a live cd will be handy in case of any problems.

No comments: