[Nottingham] Which Bootloader?

Jon Masters jonathan at jonmasters.org
Mon Mar 8 17:52:53 GMT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Johannes Kling wrote:

|   Is there a generic way to check which bootloader a machine is using
| if both LILO and GRUB are installed and configured

Short answer is no.

There is the Linux Multiboot standard and various other mechanisms for
passing information from a bootloader or firmware in to the kernel on
Intel x86 but there is no standard way of telling the kernel which
bootloader actually bootstrapped it. Yes this is a real problem.

What should happen is that the kernel should be passed this within the
multiboot_info struct which contains other advisory information, but it
is not being done at the moment and even if it is fixed it will not make
your problems instantly resolved.

This is a real problem which some of us are moaning about and looking to
fix on other architectures, and no doubt x86 will catch up eventually.
Actually I had not properly considered this for the bi_records ppc
rewrite so am greatful that you mentiond it :P.

As a workaround you can look at the configuration files for both loaders
(of course there are others but nobody uses them) and find one or two
possible bootsector locations to be compared (if you are really unlucky
then the previous admin will have put the configuration elsewhere).

| rebooting? I tried "dd if=/dev/hda bs=512 count=1 | strings" with some
| success on some systems

I think LILO tends to shove the string LILO near the start of the bsect.
This is not an ideal way of doing it but for example hexedit shows:

00000000   FA EB 20 01  B5 01 4C 49  4C 4F 16 05  E3 DD E1 3F  ..
...LILO.....?

On my desktop but nothing intelligable for a grub based loader (which is
a sane thing for an official GNU bootloader to do, oh yes).

It all sucks but when you see me this week or next week get out the
larting stick and remind me to get this fixed in Multiboot.

Cheers,

Jon.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFATLLpeTyyexZHHxERApYsAJ9f8kDdASlnL+7OHbBYH1r9i82IfwCdFmq1
YUR5OHpyU0uREHoietr0fZE=
=yqIZ
-----END PGP SIGNATURE-----




More information about the Nottingham mailing list