Boot Loader Detection: GRUB or LILO?

Doncho N. Gunchev mr700 at globalnet.bg
Tue Oct 28 06:36:45 UTC 2003


> On Tuesday 28 October 2003 01:39, Leonid Mamtchenkov wrote:
> * Mike Klinke <lsomike at futzin.com> [27-Oct-2003 23:28]:
> > On Monday 27 October 2003 23:07, Charles Curley wrote:
> > > Is there any way to detect which boot loader is the working one?
> >
> > Would this method be of any use? Use "dd" to read the MBR, assuming
> > that's where your boot loader resides.  I know that the word "GRUB"
> > will appear; for example:
> >
> > #dd ibs=512 count=1 if=/dev/hda | grep -i grub
> > Binary file (standard input) matches
> >
> > Someone else will have to pipe up about LILO though...
>
> LILO is also detectable:
>
> [root at monitorus2 root]# dd ibs=512 count=1 if=/dev/hda | grep LILO
> 1+0 records in
> 1+0 records out
> Binary file (standard input) matches
>
> If you will pipe "dd" output through "strings" before "grep", you will
> see "|lbaLILO", if LILO is installed or "GRUB", if GRUB is installed.
Yep, that's nice ;) In addition you might want to see if the boot loader is 
installed in /dev/hda | /dev/sda | /dev/whatever or in /dev/hda1 for example 
if this is a multiboot system (bsd, linux, window$). Long time ago ;))) I 
used the Win9x MBR with active partition /dev/hda1 where my /boot was (saved 
me a lot of pain when I had to reinstall win9x).

There are some more boot loaders I know of:
	aspldr - asploader - it uses some sort of dos booting -> mbr.sys, 
bootsect.sys, aspldr.sys, aspldrcd.sys and mouse.com. It's mbr.sys contains 
only 3 > 4 byte strings: "ro;^\uj", "VPP2" and "MBR Error". I have one 
ASPLinux arround so if ye are interested I can look further...
	sbm - Smart Boot Manager, which I saw in debian distro as far as I remember. 
It's a nice thing ;) can boot from CD on systems without CD-Rom boot support, 
can be installed on floppy and it can install itself on hdd later... used to 
love it year or two ago...
... and... maybe, this can be solved for fedora by simply putting an 
/etc/bootloader.conf with a single line bootloader="whatever" ;)... just an 
idea ;)

-- 
Regards,
  Doncho N. Gunchev





More information about the users mailing list