Take the 2-minute tour ×
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.

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
1  
@jippie Arch, and I think it doesn't matter ... –  warl0ck Dec 16 '12 at 12:12

1 Answer 1

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

 
discard

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.