Operating System - Linux
1819901 Members
2433 Online
109607 Solutions
New Discussion юеВ

Re: How to find out which bootloader (grub/lilo) was used during the installation

 
GnanaShekar
Regular Advisor

How to find out which bootloader (grub/lilo) was used during the installation

Hi,

We have a few redhat servers in the lab.
How to find out which bootloader (grub/lilo) was used during the installation.

Thanks & Regards
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: How to find out which bootloader (grub/lilo) was used during the installation

Shalom,

There should be a short display statement at boot.

ll /boot/grub/grub.conf

if its there, you are probably using grup.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ivan Ferreira
Honored Contributor

Re: How to find out which bootloader (grub/lilo) was used during the installation

You can also see your installation log, for example, on Red Hat Based distros, you will see an anaconda-ks.cfg file in the /root directory.

You can also use:

dd if=/dev/hda bs=512 count=1 2> /dev/null | strings | grep GRUB.

If you see the workd GRUB in the results of the command, then GRUB was installed, in this example, in the MBR of the first IDE disk. You must replace your device according to your system (/dev/hda, /dev/sda).
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
GnanaShekar
Regular Advisor

Re: How to find out which bootloader (grub/lilo) was used during the installation

Hi,

Looks like one of my system does not have any boot loader. Please suggest.

# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdb4 8256952 5882788 1954736 76% /
/dev/sda1 101588 5131 96457 6% /boot/efi
none 4123104 0 4123104 0% /dev/shm
/dev/sdb5 130299864 13027464 110653552 11% /home

# dd if=/dev/sda bs=512 count=1 2> /dev/null | strings | grep GRUB
# dd if=/dev/sda bs=512 count=1 2> /dev/null | strings | grep -i GRUB
# dd if=/dev/sda bs=512 count=1 2> /dev/null | strings | grep -i lilo

I have just upgraded this server using yum, but the system is continuing to boot using an old kernel version. Need to change this and for this I need to know the boot loader

Please suggest.
GnanaShekar
Regular Advisor

Re: How to find out which bootloader (grub/lilo) was used during the installation

# pwd
/boot
# ls -lR efi
efi:
total 2
drwxr-xr-x 4 root root 1024 Jun 20 15:50 efi
drwxr-xr-x 2 root root 1024 Apr 10 2005 MSUtil

efi/efi:
total 2
drwxr-xr-x 4 root root 1024 Apr 10 2005 Microsoft
drwxr-xr-x 2 root root 1024 Jun 20 15:50 redhat

efi/efi/Microsoft:
total 2
drwxr-xr-x 2 root root 1024 Apr 10 2005 EFIDrivers
drwxr-xr-x 2 root root 1024 Apr 10 2005 winnt50

efi/efi/Microsoft/EFIDrivers:
total 323
-rwxr-xr-x 1 root root 330240 Mar 25 2003 fpswa.efi

efi/efi/Microsoft/winnt50:
total 726
-rwxr-xr-x 1 root root 338 Apr 10 2005 Boot0006
-r-xr-xr-x 1 root root 742400 Mar 25 2003 ia64ldr.efi

efi/efi/redhat:
total 3920
-rwxr-xr-x 1 root root 1330456 Jun 20 15:50 initrd-2.4.21-32.EL.img
-rwxr-xr-x 1 root root 2682175 Apr 16 2005 vmlinuz-2.4.21-32.EL

efi/MSUtil:
total 155
-r-xr-xr-x 1 root root 158720 Mar 25 2003 nvrboot.efi
#
Huc_1
Honored Contributor

Re: How to find out which bootloader (grub/lilo) was used during the installation

Depending on what you did use

you can find the grub config file in
/boot/grub/menu.lst

and the lilo file /etc/lilo.conf ... if my memory serve me well !!

Just have a look one these files in there you should see a line for boot of your old kernel ... adapt this to new kernel

Beware on grub you just need to modify menu.lst and reboot for it to take effect...

But on lilo you need to run run the lilo command after you have modify the lilo.conf

...also maybe the commang man grub and man lilo will show what used to be installed ...usualy you have one of these not both...

Hope this helps you out

Jean-Pierre


Smile I will feel the difference
GnanaShekar
Regular Advisor

Re: How to find out which bootloader (grub/lilo) was used during the installation

Hi,

None of those files are present.

# pwd
/etc
# ls -l lilo.conf
ls: lilo.conf: No such file or directory

# cd /boot/grub
# pwd
/boot/grub
# ls -l
total 12
-rw-r--r-- 1 root root 11182 Sep 11 2003 splash.xpm.gz
#

Regards,
-GnanaShekar-
Huc_1
Honored Contributor

Re: How to find out which bootloader (grub/lilo) was used during the installation

Is this a new install from scratch ?

if not do you have a backup ? from where you can find out what the prior upgrade situation looked like ?

... perhaps it is time to take a backup... before you make to many trys/changes !!?

you can always install grub BUT beware not to loss your present boot info . (safe your data if it is of some value to you)

keep us informed

Jean-Pierre
Smile I will feel the difference
Alan_152
Honored Contributor

Re: How to find out which bootloader (grub/lilo) was used during the installation

The quick/dirty way to determine your bootloader would be to boot the machine and see what kind of boot prompt (grub or elilo) you get...