Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Without rebooting, is it possible to tell if the boot loader currently present was LILO. GRUB 0.97 or GRUB 1.9X?

I was thinking about reading MBR, but not sure about it. Just by checking the files on system, i.e /etc/lilo.conf doesn't testify anything

Any ideas?

share|improve this question
And if it's not in the MBR then that won't work anyways. – Ignacio Vazquez-Abrams Dec 16 '12 at 3:43
What distribution? – jippie Dec 16 '12 at 9:09
@jippie Arch, and I think it doesn't matter ... – warl0ck Dec 16 '12 at 12:12
up vote 6 down vote accepted

You can use grep on your MBR to figure out:

sudo dd if=/dev/sda bs=512 count=1 2>&1 | grep GRUB
sudo dd if=/dev/sda bs=512 count=1 2>&1 | grep LILO

Only one of those should return a match.

For more information and other ways to figure out, check this answer in askubuntu.

share|improve this answer
I wasn't expecting strings in the MBR, that was awesome! – warl0ck Dec 16 '12 at 12:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.