Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-05-2005, 04:44 PM   #1
Registered: Oct 2003
Posts: 249

Rep: Reputation: 30
how to remove the winXP boot loader?


a few weeks ago i installed gentoo on my box
then i installed winXP
this means now i have the winXP boot loader
because it's time to switch completely to linux i want to remove the whole windows stuff
but i have a little problem

i'm booting my installed gentoo using the gentoo CD

bootloaderoptions: gentoo root=/dev/hde3

and gentoo boots (yeah, that's cool ;-) )

now i want to replace the winXP boot loader with my lilo boot loader (i don't use grub because grub caused serious problems because grub thought my kernel was too big? but it doesn't matter, lilo worked before winXP)
because i think i just have to use the same configuration i used before setting up WinXP i only did:


rebooted and voila THE XP boot loader comes up???

rebooting again
booting with gentoo CD
trying this:
/sbin/lilo -v

it sais that the MBR of /dev/hde has been updated

the same stuff again
booting with gentoo CD

/sbin/lilo -M /dev/hde
/sbin/lilo -M /dev/hdg

(i have 2 40Gb harddisks primary on /dev/hde (=gentoo) secondary on /dev/hdg (=XP))

AND I SEE THE DAMN XP boot loader!!!

so my question:
how can i remove the fu..... XP boot loader?


Last edited by Thinking; 10-05-2005 at 05:02 PM.
Old 10-05-2005, 06:21 PM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
OK. Let's review lilo a bit. If you give the command: /sbin/lilo, with no parameters, it will write to the MBR of the disk it's on. If you have a system with xp on the master (read primary) disk, and Linux on the slave (read secondary) disk, when you give the /sbin/lilo command, lilo writes to the MBR of the secondary disk, not the primary!

So. How to fix this. First, determine where (which disk) xp is installed; that's obviously the primary. Then do /sbin/lilo <the disk xp is on> to write lilo to the MBR of that disk, and not the disk Linux is on.

From the contents of your post, lilo probably did install to the MBR of hde, but hde is not the primary, it's the secondary, Xp is on hdg, and since the xp bootloader keeps coming up, hdg is the primary.

Try /sbin/lilo /dev/hdg, or something along those lines to put lilo on the MBR of the primary hard drive.
Old 10-05-2005, 07:55 PM   #3
LQ Guru
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,078
Blog Entries: 4

Rep: Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182
I would suggest using grub as the bootloader of choice, but the principles in either case are basically the same. What you need to accomplish is:
  1. Rewrite the master boot record (MBR), which currently points to the XP loader, so that it points to another boot loader, be it Lilo or Grub.
  2. Arrange for XP to be invoked -- basically starting with its boot loader as though the "real" boot loader did not exist at all -- when that (ick!) operating-system is selected.
There are copious notes about how to start-up XP correctly with an alternate boot loader.

Even if you get yourself into a sticky-spot, the system can always boot from a CD-ROM, and this is why a Knoppix CD (which you download and burn...) is particularly useful. So if you find yourself with a munged MBR, you can fix it.
Old 10-07-2005, 03:10 AM   #4
Registered: Oct 2003
Posts: 249

Original Poster
Rep: Reputation: 30
i did fdisk on the XP hard disk and removed the bootable flag

then /sbin/lilo -b /dev/hde
/sbin/lilo -b /dev/hdg

and no i have my lilo back


Last edited by Thinking; 10-07-2005 at 03:13 AM.
Old 10-08-2005, 08:43 PM   #5
LQ 5k Club
Registered: Oct 2003
Location: Australia
Distribution: Devuan
Posts: 5,476

Rep: Reputation: Disabled
do you have raid


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 do I remove the windows boot loader? sureshot324 Linux - Software 2 10-27-2005 02:29 PM
remove boot loader mchitrakar Linux - Software 1 10-12-2005 06:22 AM
How can I remove Grub boot loader? TechSonic Linux - Newbie 7 08-06-2005 04:11 PM
How do I remove old kernels from boot loader? XryanX Fedora 7 04-26-2004 12:30 PM
recover winxp boot loader sapilas Linux - General 2 03-08-2004 01:42 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:43 AM.

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