LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-18-2007, 12:08 PM   #1
Micik
Member
 
Registered: Dec 2004
Distribution: Red hat linux 9
Posts: 142

Rep: Reputation: 15
Modify LILO loader


Hello,
I had problems with my installation of Red Hat 9 and I have reinstalled the system. Now everything works fine, except on thing:
Before reinstall, I had configured dual boot with labels linux and win_XP, now when turning ON the computer I have four choices: linux (old), 2 40 80 (new), win_xp (old) and DOS (new).

I want to delete new choices that were added to the boot list. When I chose to boot first option (linux) and modify lilo. conf in such way to remove parts that matches new added entries and restart the computer nothing changes I still have same four options.

How to overcome this problem?

Should I only change lilo.conf or something else?

Thanks
 
Old 11-18-2007, 01:11 PM   #2
peart
Member
 
Registered: Nov 2003
Distribution: Arch
Posts: 31

Rep: Reputation: 16
It sounds like you only modified lilo.conf. Did you run lilo after modifying the file?
 
Old 11-18-2007, 01:27 PM   #3
Slokunshialgo
Member
 
Registered: Jan 2006
Distribution: Ubuntu 9.04, Fedora 10
Posts: 76

Rep: Reputation: 17
Yeah, Lilo is a bit different from Grub in that aspect. It saves all the required boot info to the Master Boot Record (MBR), so the configuration files are never needed. Grub, however, works by saving a reference to the configuration file, so you change the file, and it changes the boot options.

To change Lilo, you gotta run the lilo command as root, as Peart said, which will re-write it to the MBR.
 
Old 11-20-2007, 04:22 PM   #4
Micik
Member
 
Registered: Dec 2004
Distribution: Red hat linux 9
Posts: 142

Original Poster
Rep: Reputation: 15
Thank you very much guys, running lilo command solved my problem. I didn't know it is so important. Can you tell me more what is happening when I run lilo command? If bytes of data are written to MBR when lilo command is performed?
 
Old 11-21-2007, 12:15 AM   #5
Slokunshialgo
Member
 
Registered: Jan 2006
Distribution: Ubuntu 9.04, Fedora 10
Posts: 76

Rep: Reputation: 17
Well, I've never looked into it overly much, but I believe what it does is wipe the current MBR, and writes the required boot code, including which OS is where, and how to use them. So, when you run lilo, yes, data is being written to the MBR.
 
Old 11-21-2007, 12:31 PM   #6
Micik
Member
 
Registered: Dec 2004
Distribution: Red hat linux 9
Posts: 142

Original Poster
Rep: Reputation: 15
Thank you very much for your help.
 
Old 11-21-2007, 01:02 PM   #7
onebuck
Moderator
 
Registered: Jan 2005
Location: Midwest USA, Central Illinois
Distribution: SlackwareŽ
Posts: 12,899
Blog Entries: 27

Rep: Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186Reputation: 2186
Hi,

Quote:
Originally Posted by Micik View Post
Thank you very much guys, running lilo command solved my problem. I didn't know it is so important. Can you tell me more what is happening when I run lilo command? If bytes of data are written to MBR when lilo command is performed?
You can always use the 'man' command to find out about a particular command. At the cli do a 'man lilo' and you get;

Code:
excerpt from 'man lilo';

LILO(8)                                                                

NAME
       lilo - install boot loader

SYNOPSIS
       Main function:

        /sbin/lilo - install boot loader

       Auxiliary uses:

        /sbin/lilo -A - activate/show active partition
        /sbin/lilo -E - edit header or update a bitmap file
        /sbin/lilo -I - inquire path name of current kernel
        /sbin/lilo -M - write a Master Boot Loader on a device
        /sbin/lilo -q - query map
        /sbin/lilo -R - set default command line for next reboot
        /sbin/lilo -T - tell more about specified topic
        /sbin/lilo {-u|-U} - uninstall LILO boot loader

DESCRIPTION
 lilo  installs  a  boot loader that will be activated the next time you
       boot your system. The default configuration  file  /etc/lilo.conf  (see
       'man  lilo.conf')  will contain most options, but many, including those
       which override the configuration file, may be specified on the  command
       line.
You should do the 'man lilo' to get the complete discription. I did not post the options in the above.

You can edit the 'lilo.conf' with 'vi' as root then to test before the write of the lilo.conf file. As root do from the cli;

Code:
~#vi lilo.conf                       #edit lilo.conf, if need be
~#lilo -v -t -b /dev/your_device     #sda, hda this will only test 
~#lilo -v -b /dev/your_device        #this will write MBR to your_device
Remember, 'man' is your friend.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to modify lilo under win98 leandrog_h Linux - Server 2 10-13-2006 09:46 AM
replace lilo loader with windows loader Mickaletto Linux - Newbie 9 11-25-2005 07:26 PM
How to modify Grub boot loader MEI God MEPIS 2 10-27-2005 02:13 PM
LILO loader corrupt...i think Scrag Linux - General 2 06-28-2004 10:47 AM
Modify lilo.conf when not logged in as root BadBigShot Linux - Newbie 7 03-27-2004 12:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:32 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration