hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : how2check: lilo or grub -- remotely
Reply

Forum Jump

how2check: lilo or grub -- remotely

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 06-18-2003, 10:00 AM
admin0 admin0 is offline
Web Hosting Master
 
Join Date: Dec 2001
Location: Netherlands
Posts: 769

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 ?



__________________
███ Remote Hands/Cloud Setup @ Europe
███ DevOps for Hosting Comapanies
███ Cloud Consultancy and Setups
███ since 1997

Reply With Quote


Sponsored Links
  #2  
Old 06-18-2003, 11:19 AM
serial serial is offline
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.

Reply With Quote
  #3  
Old 06-18-2003, 01:15 PM
heyzuess heyzuess is offline
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.

Reply With Quote
Sponsored Links
  #4  
Old 06-18-2003, 04:18 PM
robinbalen robinbalen is offline
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

Reply With Quote
  #5  
Old 06-18-2003, 05:16 PM
bitserve bitserve is offline
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!

Reply With Quote
  #6  
Old 06-18-2003, 05:38 PM
Angel78 Angel78 is offline
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?

Reply With Quote
  #7  
Old 06-18-2003, 06:40 PM
robinbalen robinbalen is offline
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

Reply With Quote
  #8  
Old 06-18-2003, 08:03 PM
bitserve bitserve is offline
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!

Reply With Quote
  #9  
Old 06-18-2003, 09:18 PM
innova innova is offline
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"

Reply With Quote
  #10  
Old 06-18-2003, 09:40 PM
microsol microsol is offline
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.

Reply With Quote
  #11  
Old 06-19-2003, 02:32 AM
admin0 admin0 is offline
Web Hosting Master
 
Join Date: Dec 2001
Location: Netherlands
Posts: 769
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...



__________________
███ Remote Hands/Cloud Setup @ Europe
███ DevOps for Hosting Comapanies
███ Cloud Consultancy and Setups
███ since 1997


Last edited by admin0; 06-19-2003 at 02:38 AM.
Reply With Quote
  #12  
Old 06-19-2003, 06:36 AM
heyzuess heyzuess is offline
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.

Reply With Quote
  #13  
Old 06-19-2003, 10:51 AM
innova innova is offline
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"

Reply With Quote
  #14  
Old 06-19-2003, 10:53 AM
MarlboroMan MarlboroMan is offline
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

Reply With Quote
  #15  
Old 06-19-2003, 03:20 PM
Perlboy Perlboy is offline
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

__________________
Seekbrain.com - Personal Blog
Wordpress48 - Professional Wordpress Installs in 48 hours, guaranteed.

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Managing a Completely Remote Workforce Web Hosting News 2014-05-01 08:25:34
WHIR Events Woos Washington, DC Five Years in a Row Blog 2013-08-23 09:06:46
Researchers Urge System Admins to Check for New Apache Web Server Backdoor Malware Web Hosting News 2013-05-01 11:35:53
Windows Azure SSL Slip-up Brings SSL Checker Tools Business Blog 2013-02-26 12:25:08
C7 Data Centers Division FuseApp Launches Virtual Colocation Services Web Hosting News 2012-10-18 12:01:10


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?