LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-30-2007, 02:24 AM   #1
sanjeevsk
LQ Newbie
 
Registered: Jul 2007
Posts: 8

Rep: Reputation: 0
how to identify the bootloader programmatically


My problem is that I have to add some setting in bootloader.config.The solution should be generic. For that i need to know the bootloader type programmatically so that i can add the settings.One way is to serach for file /etc/*.conf. Is there any other way to find out the boot loader
 
Old 07-30-2007, 07:08 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
GRUB would be identified by the menu.lst file in /boot/grub

I suppose you could also us dd to dump the MBR code and look for the characteristic bit patterns of each known boot loader.

What is your ultimate goal--eg why do you need to automate this?
 
Old 07-30-2007, 11:18 PM   #3
sanjeevsk
LQ Newbie
 
Registered: Jul 2007
Posts: 8

Original Poster
Rep: Reputation: 0
My purpose is to add vga specification (for frame buffer) in the boot loader.It should be part of my installer program.Now the installer has to identify whether it is LILO or grub or else.....
Then it will update vga data in the bootloader.conf file .
This is my purpose.Now can I add something in my boot loader using command (if yes then I can put those commands in my MakeFile)
What will be the best solution for this.
 
  


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
Windows 2000 Bootloader vs. Mandriva LILO Bootloader Dregnan Mandriva 7 12-03-2007 09:55 PM
Programmatically getting distro name sleeping Programming 15 12-08-2006 02:12 PM
programmatically wake up monitor dovkruger Programming 1 11-03-2005 04:27 PM
How can I disable the grub bootloader and enable the lilo bootloader? abefroman Linux - General 1 08-06-2005 08:53 AM
Set $PATH programmatically c_coder Programming 6 02-26-2004 07:40 AM

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

All times are GMT -5. The time now is 10:04 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