Results 1 to 21 of 21
-
06-18-2003, 10:00 AM #1Web Hosting Master
- Join Date
- Dec 2001
- Location
- Netherlands
- Posts
- 849
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 ?
.
# experienced Cloud/OpenStack Architect
#
# Feel free to PM me for any info or help to build your cloud.
-
06-18-2003, 11:19 AM #2Disabled
- 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 #3WHT 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 #4Web 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 remotelyRobin Balen
Gyron Internet Ltd - http://gyron.net/
UK colocation, managed hosting and connectivity services with 100% uptime SLAs
-
06-18-2003, 05:16 PM #5Web Hosting Master
- Join Date
- Nov 2001
- Location
- Ann Arbor, MI
- Posts
- 2,979
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 #6Registered User
- Join Date
- Jan 2001
- Location
- Vienna, Austria
- Posts
- 2,531
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 #7Web 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 installedRobin Balen
Gyron Internet Ltd - http://gyron.net/
UK colocation, managed hosting and connectivity services with 100% uptime SLAs
-
06-18-2003, 08:03 PM #8Web Hosting Master
- Join Date
- Nov 2001
- Location
- Ann Arbor, MI
- Posts
- 2,979
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?
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 #9Web Hosting Master
- Join Date
- Dec 2002
- Posts
- 1,304
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 #10Web 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 #11Web Hosting Master
- Join Date
- Dec 2001
- Location
- Netherlands
- Posts
- 849
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...
Last edited by admin0; 06-19-2003 at 02:38 AM.
.
# experienced Cloud/OpenStack Architect
#
# Feel free to PM me for any info or help to build your cloud.
-
06-19-2003, 06:36 AM #12WHT 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 #13Web Hosting Master
- Join Date
- Dec 2002
- Posts
- 1,304
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 #14WHT 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 #15Web Hosting Guru
- Join Date
- Dec 2001
- Location
- QLD, Australia
- Posts
- 285
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
-
06-19-2003, 03:36 PM #16Retired Moderator
- Join Date
- Jan 2003
- Posts
- 9,049
It works Stuart the man
Like us on Facebook to qualify for discounts!
http://www.sprintserve.net
Offering: | Internap FCP Bandwidth! | Rebootless Kernel Updates! | Magento Optimized Hosting | Wordpress Hosting |
Services: | Managed Multiple Cores 64bit Servers | Server Management |
-
06-19-2003, 10:22 PM #17WHT Addict
- Join Date
- Nov 2002
- Posts
- 151
Yeah Stuart - that's good, saves a step (and a big doh!).
But cat corrupted my terminal.
strings /tmp/boot.img is nicer.
-
06-19-2003, 10:34 PM #18Web Hosting Master
- Join Date
- Nov 2001
- Location
- Ann Arbor, MI
- Posts
- 2,979
I'll give stuart 35% credit and heyzuess 65% credit for that one.
Though in theory, looking at the kickstart file would have worked in many circumstances.
Heyzuess's idea started out good, but then I was thinking, "and put it on a floppy and boot from it"? That's just too hard. Which is why I initiallly disregarded his or her idea.
EDIT: WWIT?Last edited by bitserve; 06-20-2003 at 12:31 AM.
-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-19-2003, 10:45 PM #19Web Hosting Guru
- Join Date
- Dec 2001
- Location
- QLD, Australia
- Posts
- 285
Originally posted by heyzuess
Yeah Stuart - that's good, saves a step (and a big doh!).
But cat corrupted my terminal.
strings /tmp/boot.img is nicer.
Were you using Windows at the time?
Stuart
-
06-19-2003, 11:17 PM #20WHT Addict
- Join Date
- Nov 2002
- Posts
- 151
No, a gnome-terminal on the local box (not ssh'd into anywhere) so it's not too big of a deal - mother always said not to cat binary files....
I always seem to go about things the odd way - but it was a recycled tip anyways.
Everyone gets 1000 points!
-
12-04-2003, 04:19 AM #21New Member
- Join Date
- Sep 2002
- Posts
- 4
Ctrl-V, Escape, C, Enter.
That should reset your terminal if you've garbled it.
Regards,
Robert.