How does Grub keep track of disks?
AIUI, grub consists of two parts. Stage 1 is placed in the MBR of a disk or partition, stage 2 is somewhere on disk.
It's the BIOS that determines which MBR is loaded, from there on, it is Grub.
Grub's stage 1 has to store, somewhere in the MBR, where stage 2 is. Stage 2 has to store, somewhere on disk, where the kernel, the initrd, and the root partition is.
The question is, how are these stored?
Does stage 1 record the disk by ID, or by device number?
Suppose I have a slave IDE disk I'm configuring to be my primary boot drive. It's currently /dev/hdb, and stage2 is in /dev/hdb1. If I write stage1 to the MBR, telling it to find stage 2 on /dev/hdb1, will it be able to do so, when I swap the drive jumpers, and that drive is now /dev/hda?
|