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
add comment

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
add comment

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
add comment

If

file -s /dev/sda

does not work, try

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

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.