[lug] Determining if Lilo or Grub is current bootloader

Hugh Brown hugh at math.byu.edu
Wed Jan 17 17:25:11 MST 2007

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
Hard Disk

I already know I was running grub, but if I didn't the above output 
would seem like a good indicator.


More information about the LUG mailing list