
06-18-2003, 10:00 AM
|
|
Web Hosting Master
|
|
Join Date: Dec 2001
Location: Singapore
Posts: 747
|
|
how2check: lilo or grub -- remotely
Hi,
How do I determine if the bootloader in the system is lilo or grub when both the config files are present ?

__________________
███ .
███ .. ...
███
███ fulltime sysadmin since 1997!
|

06-18-2003, 11:19 AM
|
|
Disabled
|
|
Join Date: Feb 2003
Posts: 344
|
|
Good question. Basically when you update your boot loaders config file and write the MBR, then that boot loader takes over. I know that's not the answer you're looking for, but maybe it helps.
You could always reboot the machine and watch the boot process through a remote console device.
|

06-18-2003, 01:15 PM
|
|
WHT Addict
|
|
Join Date: Nov 2002
Posts: 151
|
|
You could copy the boot sector to a file, using a command like this:
dd if=/dev/hda of=/tmp/boot-img.mbr bs=512 count=1
then download that file locally and use dd to write it to a floppy.
boot off the floppy at your local workstation.
I haven't tried it yet myself, but ran into the same problem before and thought of doing this to check.
|

06-18-2003, 04:18 PM
|
|
Web Hosting Master
|
|
Join Date: Aug 2002
Location: UK
Posts: 1,040
|
|
Interesting idea with dd.
Last time a client asked us to check we got an on-site tech to watch the display output when we rebooted the box remotely 
__________________
Robin Balen
Gyron Internet Ltd - http://gyron.net/
UK colocation, managed hosting and connectivity services with 100% uptime SLAs
|

06-18-2003, 05:16 PM
|
|
Web Hosting Master
|
|
Join Date: Nov 2001
Location: Ann Arbor, MI
Posts: 2,978
|
|
I would ask the person who installed it. 
__________________
-Mark Adams
www.bitserve.com - Secure Michigan web hosting for your business.
Only host still offering a full money back uptime guarantee and prorated refunds.
Offering advanced server management and security incident response!
|

06-18-2003, 05:38 PM
|
|
Registered User
|
|
Join Date: Jan 2001
Location: Vienna, Austria
Posts: 2,530
|
|
Just a question:
When you do: cat /root/anaconda-ks.cfg | grep bootloader
and get
bootloader
as result, then you are using GRUB, right?
|

06-18-2003, 06:40 PM
|
|
Web Hosting Master
|
|
Join Date: Aug 2002
Location: UK
Posts: 1,040
|
|
I would ask the person who installed it.
This person didn't have a clue which was installed 
__________________
Robin Balen
Gyron Internet Ltd - http://gyron.net/
UK colocation, managed hosting and connectivity services with 100% uptime SLAs
|

06-18-2003, 08:03 PM
|
|
Web Hosting Master
|
|
Join Date: Nov 2001
Location: Ann Arbor, MI
Posts: 2,978
|
|
Quote:
Originally posted by Angel78
When you do: cat /root/anaconda-ks.cfg | grep bootloader
and get
bootloader
as result, then you are using GRUB, right?
|
That seems like a good way to tell, if that file is there.
I would just do a less on the file though, it's not like it's that long. It should indicate whether you specified a different bootloader. Smart thinking. 
__________________
-Mark Adams
www.bitserve.com - Secure Michigan web hosting for your business.
Only host still offering a full money back uptime guarantee and prorated refunds.
Offering advanced server management and security incident response!
|

06-18-2003, 09:18 PM
|
|
Web Hosting Master
|
|
Join Date: Dec 2002
Posts: 1,300
|
|
Lets play devils advocate
Why does it matter?
I use LiLo. It rules.
You can test a new kernel without fear of hosing your system that is 1500 miles away:
lilo -R <new_image_name>
Try that with grub! Mffff!
__________________
"The only difference between a poor person and a rich person is what they do in their spare time."
"If youth is wasted on the young, then retirement is wasted on the old"
|

06-18-2003, 09:40 PM
|
|
Web Hosting Master
|
|
Join Date: Jul 2001
Location: /dev/null
Posts: 1,219
|
|
But with grub you can define a fall-back kernel (the last working one for example) in the grub conf. This one would boot if there would be a problem with the current one for whatever reason. As far as I know this doesn't work with lilo.
|

06-19-2003, 02:32 AM
|
|
Web Hosting Master
|
|
Join Date: Dec 2001
Location: Singapore
Posts: 747
|
|
Thank you all for responding.
This is not a kernel upgrade issue, but just a question that someone asked me [to check my admin skills I guess, which in turn, all yours for this particular one..  ]
[b]cat /root/anaconda-ks.cfg | grep bootloader
bootloader
bootloader --useLilo
Is this the result of which it was at boot time, or at the current.
err.. what exactly am I looking at ?
The question is to tell him what bootloader will be used on his next reboot.
still waiting for that magic answer...

__________________
███ .
███ .. ...
███
███ fulltime sysadmin since 1997!
Last edited by admin0; 06-19-2003 at 02:38 AM.
|

06-19-2003, 06:36 AM
|
|
WHT Addict
|
|
Join Date: Nov 2002
Posts: 151
|
|
Use the dd method I suggested earlier - that will tell what is currently installed on the mbr, which will be the one that will be used on next boot.
Checking the anaconda-ks.cfg file just tells you what got installed. Your's looks like it was told to use Lilo - but that could have been changed.
|

06-19-2003, 10:51 AM
|
|
Web Hosting Master
|
|
Join Date: Dec 2002
Posts: 1,300
|
|
Lilo ALSO can use a "fallback" kernel.
Lilo -R <kernel image>
That kernel will ONLY be loaded at next boot. Therefore lets say your kernel is built wrong, you messed up, whatever. Cal the DC and ask for a hard reboot, and it will reboot with your ORIGINAL kernel in place.
__________________
"The only difference between a poor person and a rich person is what they do in their spare time."
"If youth is wasted on the young, then retirement is wasted on the old"
|

06-19-2003, 10:53 AM
|
|
WHT Addict
|
|
Join Date: Apr 2002
Location: Cornfield
Posts: 131
|
|
Check the current running kernel with
uname -a
Check both config files - see which one (LILO or GRUB) has the correct kernel listed as default boot. If BOTH do - screw it. Run lilo -v, then tell the customer they use LILO.
__________________
Fire extinguisher extraordinare
-------------------------------
FastServers.Net NOC Admin
|

06-19-2003, 03:20 PM
|
|
Web Hosting Guru
|
|
Join Date: Dec 2001
Location: QLD, Australia
Posts: 284
|
|
Hey there,
To identify if you're using lilo or grub.
1) dd if=/dev/hda of=/tmp/boot.img bs=512 count=1
2) cat /tmp/boot.img
It's lilo if it has something about "Missing io.sys". It's GRUB if it mentions GRUB.
Stuart
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| Postbit Selector |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|