On Friday 14 March 2008 11:56 pm, Agnello George wrote:
Grub is almost an os with a shell and fs reader. once stage2 is loaded it can recognise partitions and most filesystems.
So let me guess when we install linux we have the follow in the partition table
in hd0 we have / /boot swap
and hd1 we have / /boot swap
and in hd0 we have the grub.conf file located in /boot/grub/grub.conf
and in hd1 we have the grub.conf file located in /boot/grub/grub.conf
so ultimately which conf file is read ??
only the grub.conf from the grub root partition you specified when installing grub, which is different from your distro root partition.
eg. at the grub shell you do root (hd0,0) setup (hd0)
this will setup grub in hd0 mbr and read menu.lst (the default grub menu file) from hd0,0/boot/grub/menu.lst, in which you will have entries like root (hd0,0) kernel /vmlinuz root=/dev/hda1 yak yak #kernel from /dev/hda1 boot
root (hd0,1) kernel /vmlinuz root=/dev/hda2 yak yak # kernel from /dev/hda2/ boot
root (hd0,0) kernel /vmlinuz-latest root=/dev/hda2 #kernel from /dev/hda1 with root file system from hda2. u better have all modules compiled in or a copy of (/dev/hda1)/lib/2.xx.yy/ in (/dev/hda2)/lib
And ofcourse you can boot any combo of disks n partitions from the grub shell