Solved

Uninstalling LILO

Posted on 2003-10-23
11
578 Views
Last Modified: 2013-12-06
I am quite disappointed that Mandrake Linux setup didn't give me the option of not installing a bootloader (unlike Red Hat).

Is the best way to get rid of LILO fdisk /mbr, or is there a better way?
0
Comment
Question by:Jorpho
  • 3
  • 3
  • 2
  • +2
11 Comments
 
LVL 1

Expert Comment

by:mlinford
ID: 9608154
You looking to install something else like grub?
0
 
LVL 1

Author Comment

by:Jorpho
ID: 9608368
No, I just find Lilo to be too intrusive.  I really don't mind using a bootdisk when I want to run Mandrake.

(There's no other way to boot off of logical partitions, is there?)
0
 
LVL 1

Expert Comment

by:mlinford
ID: 9608487
Well I assume then that you are otherwise loading windows?
If that is the case, fixmbr is most likely the best path, if you trust your MBR to windows.

Personally, I dont trust windows, nor do I *ever* let it mess with my mbr.  I wont let it touch my partitions except when it initially installs (there is a reason why people recomend installing windows first.  linux is good at spoting other os's on other partitions.  Windows is not.  Its quite good at messing things up).  

I would remove the linux partition from LILO (leaving the windows partition only) and then set the wait time to zero so it quickly loads into windows.

All of this can be done very easily by editing hte lilo.conf file in /etc/lilo.conf.  Then run lilo and it should add the windows partition only and you're set.  I think there is also a config program (liloconfig) that you can load, although im not sure if thats in mandrake.

If someday you give up windows you can then change it back.

0
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 1

Expert Comment

by:AgelmarJagad
ID: 9609450
If for some reason you decide that you don't want LILO anymore then boot up to a windows boot floppy or the like and run the command 'FDISK /MBR' and your MBR will be 'fixed' to boot to windows.
0
 
LVL 5

Expert Comment

by:willy134
ID: 9610099
windows xp has the recovery console (when you boot from the insall cd).

This console has a function called fixmbr which has saved me many times.  I also disagree that I would rather not have mandrake not install the bootloader.  I usually switch hardrive order in the bios or use the bootdisk.
0
 
LVL 1

Author Comment

by:Jorpho
ID: 9610305
Unfortunately, I do not have Windows XP.  

Perhaps someone can suggest a nice, quick Windows MBR manager of some sort?  It does occur to me that it is convenient to be able to boot from logical partitions.
0
 
LVL 1

Expert Comment

by:AgelmarJagad
ID: 9610503
If you don't have XP the best way that I know of to get rid of LILO is fdisk /mbr.  You might look through the boot managers here:
http://www.tucows.com/boot95_default.html 
and see if there are any to your liking.
0
 
LVL 1

Author Comment

by:Jorpho
ID: 9611004
Actually, those are all shareware.

By "MBR manager", I mean, is there a utility out there that can save and restore the MBR to and from files on the hard drive?
0
 
LVL 1

Expert Comment

by:AgelmarJagad
ID: 9611564
The only thing that I know of that would be capable of doing something like that is the linux utility dd.  dd can be used to make raw images of disks and individual sectors.  If you wanted to copy your mbr into a file you should try something like 'dd if=/dev/hda of=my_mbr bs=512 count=1'.  This should copy the first 512 bytes of /dev/hda (your mbr) to the files my_mbr.  If you wanted to write that back to the mbr you would use 'dd if=my_mbr of=/dev/hda bs=512 seek=0'.  Be very very very very very careful with this as it is quite possible that you could totally destroy your mbr (or other data) in the process (you could use fdisk /mbr if necessary, but I wouldn't want to rely on that).  I have not actually tested this but it is theoretically valid, again be careful.
0
 
LVL 20

Accepted Solution

by:
Gns earned 20 total points
ID: 9613485
If you don't like that Mandrake writes to MBR, then donät let it. Let it write it's boot record to a partition boot record instead... And simply never use it.

Lilo should have made a backup copy of the original MBR (a file something like /boot/boot.0800 or similar, 512 bytes in size). You can restore this to the MBR in three ways (more or less:-):
lilo -u
lilo -U
dd if=/boot/boot.0800 of=/dev/hda
In the first two, lilo writes the file back, either checking (-u)/not checking (-U) the timestamp info.
In the last case, I'm assuming your "first drive" is your primary IDE master. If you feel like it (and don't want to check the size/content of the file) you could "play it safe" and add the options "bs=512 count=1" to the dd command.
I might add that I've often used the method AgelmarJagad outlines, and it works briliantly well. A very common use is to have ntldr (the nt loader of windows nt/2k/xp) chainload a partition boot record, so that stupid windoze utils (like defrag, chkdsk...) can operate on the "system volume" ... by mangling the MBR ... without risking the safe boot of linux:-).

-- Glenn
0
 
LVL 20

Expert Comment

by:Gns
ID: 9613504
.... and AFAIK ntldr (still) needs read this from a file... Look for the Linux+NT-Loader mini-HOWTO on http://www.tldp.org ...

-- Glenn
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to have a cron job run until a condition is met 12 67
How to find Linux Server's last patch date 9 54
wipe a usb using python 5 48
number in printf 13 27
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question