Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How to check what bootloader my System is using?

Such as Lilo or Grub or Grub2. How can I check it?

share|improve this question
    
lilo was used early on in linux. usually or most currently it is GRUB 2 –  Ringtail Feb 24 '12 at 22:24

3 Answers 3

Download bootscript and install http://bootinfoscript.sourceforge.net/

This boot_info_script is a bash script which searches all hard drives attached to the computer for information related to booting. Its primary use is for troubleshooting booting problems. For instructions see http://bootinfoscript.sourceforge.net

share|improve this answer
    
Thanks BlueXrider, I will give it a try~ –  Anders Lind Feb 24 '12 at 22:21

Assuming your boot disk is /dev/sda (it usually is), you can look at your boot sector to see what your computer starts with:

sudo file -s /dev/sda

This shows some information about what's at the beginning of /dev/sda (your hard disk — often the boot disk if you have several). For example, mine begins with

/dev/sda: x86 boot sector; GRand Unified Bootloader, stage1 version 0x3, …

showing that I have Grub 2 (which is the default bootloader on Ubuntu these days).

Another place to look is what scripts run when you install the kernel. One or more of these scripts should register the newly installed kernel with the bootloader. These scripts live in /etc/kernel/postinst.d.

Usually, the two methods will give the same result. They won't if you have multiple operating systems and Ubuntu's bootloader is not the one that loads first, but rather is invoked by some other operating system's bootloader.

share|improve this answer
    
Errm, but you know it is Grub2 by some more information which you didn't include it here, right? Because I have the same start as you, but later in this line I see "GRUB version 0.97". –  greenoldman Nov 7 at 7:51
    
@greenoldman I think you're right. I don't remember why I wrote this. I may have thought that the stage1 version indicated the Grub version, at least with enough precision to distinguish between Grub 0.9x and 1.9x, but version 3 exists in both 0.9x and 1.9x. –  Gilles Nov 7 at 15:18

If

file -s /dev/sda

does not work, try

file -sk /dev/sda
share|improve this answer

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.