[lug] Determining if Lilo or Grub is current bootloader

karl horlen horlenkarl at yahoo.com
Thu Jan 18 18:36:43 MST 2007


Thanks to all of those that replied.

FYI, all of the varieties of dd solutions proposed
work for both lilo and grub boot sectors (you will see
the string "lilo" or "grub" somewhere in the boot
sector).

--- Hugh Brown <hugh at math.byu.edu> wrote:

> karl horlen wrote:
> > I inherited a hd that has both an /etc/lilo.conf
> and a
> > /boot/grub/grub.conf. Each is configured to boot
> the
> > same kernel.
> > 
> > I can tell that the system is booting from grub
> versus
> > lilo by the initial boot screen that comes up. 
> > 
> > Is there another way to figure out which
> bootloader is
> > being used other than looking at the initial
> > bootscreen?  I know I can just reboot and check
> the
> > screen but I'm just curious if there is some way
> to
> > tell on an existing system without having to
> reboot.
> > 
> > I looked through all relevant logs in /var/log and
> > none of them seem to refer to 'grub'. 
> /proc/cmdline
> > doesn't offer any help either.  And because both
> grub
> > and lilo configs boot the same kernel and there
> are no
> > differences in with kernel parameters, I can't use
> > them to distinguish the boot.  
> > 
> > I haven't tried booting lilo on this system, but I
> > recall that lilo may spit out "Lilo...." in the
> dmesg
> > log file.  So the absence of that line in dmesg
> may be
> > a possible logfile solution.
> > 
> > thanks
> > 
> 
> 
> I don't know if this works for lilo, but I did the
> following (as root):
> 
> # dd if=/dev/hda of=mbr.img bs=512 count=1
> # strings mbr.img
> ZRrI
> D|f1
> GRUB
> Geom
> Hard Disk
> Read
>   Error
> 
> 
> I already know I was running grub, but if I didn't
> the above output 
> would seem like a good indicator.
> 
> Hugh
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List:
> http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667
> channel=#colug
> 



 
____________________________________________________________________________________
Get your own web address.  
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL



More information about the LUG mailing list