Można temu zaradzić montując partycje za pomocą UUID (Universally Unique Identifier).
Jak to zrobić ?
1) Sprawdzić jakie partycje mamy zamontowane:
test:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
#
proc /proc proc defaults 0 0
/dev/sda1 / ext3 errors=remount-ro 0 1
/dev/sda9 /home ext3 defaults 0 2
/dev/sda8 /tmp ext3 defaults 0 2
/dev/sda5 /usr ext3 defaults 0 2
/dev/sda6 /var ext3 defaults 0 2
/dev/sda7 none swap sw 0 0
/dev/hda /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
# /etc/fstab: static file system information.
#
#
proc /proc proc defaults 0 0
/dev/sda1 / ext3 errors=remount-ro 0 1
/dev/sda9 /home ext3 defaults 0 2
/dev/sda8 /tmp ext3 defaults 0 2
/dev/sda5 /usr ext3 defaults 0 2
/dev/sda6 /var ext3 defaults 0 2
/dev/sda7 none swap sw 0 0
/dev/hda /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
2) Wyświetlić atrybuty partycji znajdujących się w /etc/fstab
test:~# cat fstab | grep -v ^# | awk '{ system("blkid "$1)}'
/dev/sda1: UUID="d4cd3659-5e22-41c1-a440-db4012289974" TYPE="ext3"
/dev/sda9: UUID="96f1f6ba-d486-437d-ace3-b3bc90ff7593" TYPE="ext3"
/dev/sda8: UUID="2a3bc90d-1e59-4535-a722-0e1239a896e1" TYPE="ext3"
/dev/sda5: UUID="43e19d71-b2df-4d85-a2b2-8e24400b6f7f" TYPE="ext3"
/dev/sda6: UUID="5d615c76-22f8-4710-b530-0f16f164cce9" TYPE="ext3"
/dev/sda1: UUID="d4cd3659-5e22-41c1-a440-db4012289974" TYPE="ext3"
/dev/sda9: UUID="96f1f6ba-d486-437d-ace3-b3bc90ff7593" TYPE="ext3"
/dev/sda8: UUID="2a3bc90d-1e59-4535-a722-0e1239a896e1" TYPE="ext3"
/dev/sda5: UUID="43e19d71-b2df-4d85-a2b2-8e24400b6f7f" TYPE="ext3"
/dev/sda6: UUID="5d615c76-22f8-4710-b530-0f16f164cce9" TYPE="ext3"
3) Zamienic wpisy w /etc/fstab tak aby korzystać z UUID
test:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
#
proc /proc proc defaults 0 0
UUID=d4cd3659-5e22-41c1-a440-db4012289974 / ext3 errors=remount-ro 0 1
UUID=96f1f6ba-d486-437d-ace3-b3bc90ff7593 /home ext3 defaults 0 2
UUID=2a3bc90d-1e59-4535-a722-0e1239a896e1 /tmp ext3 defaults 0 2
UUID=43e19d71-b2df-4d85-a2b2-8e24400b6f7f /usr ext3 defaults 0 2
UUID=5d615c76-22f8-4710-b530-0f16f164cce9 /var ext3 defaults 0 2
/dev/sda7 none swap sw 0 0
/dev/hda /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
# /etc/fstab: static file system information.
#
#
proc /proc proc defaults 0 0
UUID=d4cd3659-5e22-41c1-a440-db4012289974 / ext3 errors=remount-ro 0 1
UUID=96f1f6ba-d486-437d-ace3-b3bc90ff7593 /home ext3 defaults 0 2
UUID=2a3bc90d-1e59-4535-a722-0e1239a896e1 /tmp ext3 defaults 0 2
UUID=43e19d71-b2df-4d85-a2b2-8e24400b6f7f /usr ext3 defaults 0 2
UUID=5d615c76-22f8-4710-b530-0f16f164cce9 /var ext3 defaults 0 2
/dev/sda7 none swap sw 0 0
/dev/hda /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
4) Na koniec jeszcze tylko zmiana w menu.lst dla gruba
title Debian GNU/Linux, kernel 2.6.26-2-amd64
root (hd0,0)
kernel /boot/vmlinuz-2.6.26-2-amd64 root=UUID=d4cd3659-5e22-41c1-a440-db4012289974 ro quiet
initrd /boot/initrd.img-2.6.26-2-amd64
title Debian GNU/Linux, kernel 2.6.26-2-amd64 (single-user mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.26-2-amd64 root=UUID=d4cd3659-5e22-41c1-a440-db4012289974 ro single
initrd /boot/initrd.img-2.6.26-2-amd64
root (hd0,0)
kernel /boot/vmlinuz-2.6.26-2-amd64 root=UUID=d4cd3659-5e22-41c1-a440-db4012289974 ro quiet
initrd /boot/initrd.img-2.6.26-2-amd64
title Debian GNU/Linux, kernel 2.6.26-2-amd64 (single-user mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.26-2-amd64 root=UUID=d4cd3659-5e22-41c1-a440-db4012289974 ro single
initrd /boot/initrd.img-2.6.26-2-amd64