Ubuntu - disk management behaviour

Daniele Guerrieri d.guerrieri at gmail.com
Fri Jul 22 04:58:34 UTC 2011

> Which release of Ubuntu are you using?

> In recent releases, grub's used "/dev/disk/by-id/" rather than "/dev/"
> to define grub devices.

> The fact that you can boot from your HD or from your USB even though
> they're named differently shows that Ubuntu doesn't care about the
> "/dev/" names, doesn't it?

yes, my bad :)
in fact i was confused, but also an usb live key needs to be bootable
when the drive letter changes (once sda, another time sdb), probably
in the boot loader installed onto usb key there's uuid too;

But if i look in grub.cfg i see:
. set root='(/dev/sdb, msdos1)'
. search --no-floppy --fs-uuid --set=root a47791f4-e9e2-47be-9f64-348573fe2796

Why does set root before searching with uuid?

>Yes, that's how it is, but that is due to the bios rather than grub and that's why the grub2 >menu entries always use uuid so the boot is always correct (unless you manually modify it >to /dev/sdxy and (hdx,y), which you shouldn't). But if want to manually modify, use uuid or >label.
Ok, The uuid does not change if external changes occur, isn't it?

For example, if i had boot partition on sda7, then i decided to remove
sda2 (should i do it from a "live" usb system or may i do it from the
"installed" system itself? i think it's better not to reorder
partitions while running, or at least partprobe won't return 0, am i
correct?), and subsequently i fixed partition order, the boot
partition would become sda6; in this case, the uuid will remain the
same so that i wouldn't have boot issues?

>Regards - Goh Lip

Thank you both for the answers!


More information about the ubuntu-users mailing list