You are not logged in.
Hey Folks,
I've always wondered how GRUB [and other bootloaders] deal with changing devices.
For example:
I install GRUB and my System on /dev/sda. Then, let's say, I use this disk as external USB drive and plug in another master HDD.
Would GRUB still load? Or do I have to change something?
And if I had to change something, what if the USB drive sometimes is /dev/sdx and another time /dev/sdy when starting the PC?
I'm wondering because GRUB uses <hd0,1> and other tags for the disks. So, when GRUB is looking for hd0,1, isn't it looking for /dev/sda1, or do I overlook something?
Offline
...or do I overlook something?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
That is why you use UUIDs everywhere instead of hardcoded device paths. You can tell grub to search which disk contains a partition with a given uuid so there is no need to hardcode device paths.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
I know about the possibility of using UUIDs for fstab. However until right now I thought GRUB just handels disks in it's own way (since it uses hd0 instead of /dev/sda, etc.). So thanks for the input.
But still: If I use a default grub config and change the device order, should it load fine?
The Wiki says: "By default grub-mkconfig determines the UUID of the root filesystem for the configuration. To disable this, uncomment GRUB_DISABLE_LINUX_UUID=true."
I know, I could check that very easily on my own, but unfortunately I don't have a running system right now.
Offline