LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-15-2003, 08:58 PM   #1
Samsara
Member
 
Registered: May 2003
Distribution: Ubuntu, Mac OS X Tiger
Posts: 481

Rep: Reputation: 32
script to tell lilo from grub?


How can I tell which boot manager is currently being used? This is for writing a script that will execute an action depending on which bootloader is in use.

Thanks,

Samsara

PS: If the project is a success, you'll hear more about it
 
Old 08-15-2003, 09:10 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
I know you can use the dd command to read the boot blocks of a drive, So if you can compare the boot blocks you can identify the Program.

something like:

dd if=/dev/hda of=~/bbfile bs=100 count=2

Gets you the some of the boot block look around see what you get.

You could for your script read it in on stdin\stdout.

Beware that Grub puts its name deeper into the file than Lilo. so Lilo may still show up at the beginning, still check for Grub further on.

Last edited by leonscape; 08-15-2003 at 09:13 PM.
 
Old 08-15-2003, 09:21 PM   #3
Samsara
Member
 
Registered: May 2003
Distribution: Ubuntu, Mac OS X Tiger
Posts: 481

Original Poster
Rep: Reputation: 32
thanks. that sounds helpful. I'll give it a go

Samsara
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Booting of raw ISO from GRUB/LILO (though preferably GRUB) Orkie Linux - Software 28 12-15-2013 09:37 PM
Switching from grub to lilo, messed up Lilo.conf, rescuing via Knoppix. SonicGT Debian 2 08-21-2005 01:15 PM
LILO to GRUB ninadb Slackware 3 09-16-2004 10:55 AM
Lilo vs Grub - PROBLEM with lilo nelsonnery Linux - Software 2 09-09-2004 11:09 AM
LILO to GRUB shooter Linux - General 3 06-02-2002 04:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration