[lug] Determining if Lilo or Grub is current bootloader

Kevin Fenzi kevin at scrye.com
Wed Jan 17 17:26:10 MST 2007

On Wed, 17 Jan 2007 15:54:58 -0800 (PST)
horlenkarl at yahoo.com (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.

Brute force, but has always worked for me: 

dd if=/dev/hda bs=32k count=1 | strings | grep GRUB
if you get:

   1+0 records in
   1+0 records out

Then GRUB is the boot loader. If not, then lilo is the loader.

Note that you will need to replace /dev/hda above with your boot
drive... /dev/sda, etc. 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20070117/8c2161ab/attachment.pgp>

More information about the LUG mailing list