[LBo] chainloading GRUB boot
Jisao
dimark at securenet.net
Mon Jun 12 06:11:06 CEST 2006
Anita Lewis wrote:
> On 06/11/2006 08:12 PM Jisao wrote:
>
>> title ETCH Debian Linux, kernel 2.6.8-2-386
>> chainloader (hd0,8)+1
>>
>> title SID Debian Linux, kernel 2.6.8-2-386
>> chainloader (hd0,9)+1
>>
>> title Kanotix 2005-4 Linux
>> chainloader (hd0,10)+1
>>
> <snip>
>>
>> (Just a side comment: you can see I am fond of chainloading. I find
>> it simplifies my life as I don't have to look for and document the
>> kernel and initrd.)
>
> When you do this using chainloading, do you have to do anything
> special with the partitions.
No, no need to prepare anything special.
> Do you need to install GRUB in the partition rather than the MBR for
> those that you chainload?
Yes, absolutely.
> Do you need to make those partitions bootable?
Nope. Just select: "install in partition" when installing grub, and the
rest will be done automagically.
> Could you give us a little explanation of how this works?
I can try, but it will be in laymen's term. I hope you don't mind the
simplistic explanation.
Grub "somehow" knows where to look for bootloaders in OSes when there is
one. It recognizes Windows bootloader 100% of the times (in my
experience), and other grub bootloaders installed in partitions (my
experience lately). I do not know how well or if it picks up LILO.
The first time you install a grub bootloader in the MBR, it writes
information there, one of which is where the "default" grub files are
(where it points to).
After that first install, if you add other OSes with their own
bootloaders (fully configured properly thanks to the auto-install) in
other partitions, you have to point to that default grub where the new
bootloaders you installed are. You specify which drive, and which
partition. For the sake of human sanity, a line is also put to indicate
what OS it is.
So when you reboot, grub in the MBR loads and reads (my interpretation
of it):
"For windows, go in partition X on drive 1, and execute the bootloader
there. All the proper information you need to start windows will be there.
For Suse, go in partition Y on drive 1, and execute the bootloader
there. All the proper information you need so start Suse will be there.
For Kanotix, go in partition Z on drive 2, and execute bootloader there.
All the proper information you need to start Kanotix will be there."
And so on and so forth. I interpret chainload as "after you read
bootloader in MBR, go and read bootloader in partition at mentioned
location".
So all you have to write in the original bootloader, pointing to
partitions. After that, you can change the contents of the partitions
until the cows come home, and you don't have to change much in the
original bootloader. Much simpler when you keep reinstalling. (I got
the chainloading tips from Kano, the main developer of Kanotix on the
#kanotix channel).
The downside: you slow down your boot up sequence because you load 2
bootloaders, and you have to select twice (or let 2 default choices happen).
Hope this helps.
>
> Thanks,
> Anita
>
Jisao
More information about the QnA
mailing list