LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 01-13-2004, 11:57 PM   #1
RobertRBuce
LQ Newbie
 
Registered: Jan 2004
Location: Boise, Idaho
Posts: 2

Rep: Reputation: 0
How to remove LILO and restore Windows Bootloader


I'm adding this because there seems to be a rather large amount of people having this same problem...How to remove the LILO bootloader and return to the windows bootloader and therefore windows. Nobody seems to be giving very definitive answers, are giving overly-complicated drawn out processes, or are just giving the same tired answers on how to restore the MBR.
If you are/were using Windows 2000 and/or Windows XP then the whole FDISK thing is useless since both of those versions of windows don't even have it. Plus, if you installed your system using the NTFS instead of the FAT16 or FAT32, then simply using an old windows 98 boot disk won't work either, as it will not recognize the file system.

The method outlined below is for people using Windows 2K or XP and will restore your original bootloader that was in place before you decided to checkout the LINUX OS. It assumes that you have already removed the LINUX partitions, or have converted the LINUX partitions back to windows based partitions believing that this would remove the LILO bootloader.

NOTE: LINUX simply isn't for everyone. While it does have a pretty GUI and may be more stable, it still requires a completely different understanding of computers than the "average" PC user is equipped with, and can be a pain in the ass if you want to simply install a driver update or something like that.

The easiest way for people who are more familiar with Windows than Linux to remove the LILO bootloader and restore the Original bootloader installed and setup by Windows is to use the original Windows Installation CD.

Follow these instructions:

If you have both Windows 2000 and Windows XP installed, then you should probably try using the Windows 2000 setup disk first. If you don't have it, then just use the WinXP setup disk (meaning original CD)

Restart Computer with Windows CD in drive and boot into the Windows installation. Make sure your BIOS has it's boot order setup to check the CD drive first.

At the first prompt it should be asking you if you wish to install a new copy of windows or repair the currently installed copy...pick the Repair option.

Next it will ask if you want to use the console or the emergency repair....pick the console.

Next it will take you into a general DOS prompt and ask for which copy (assuming you have multiple installations of Windows) then it will ask for the administrator password...enter the appropriate answers for both.
(if you are using the Win2k setup, then pick the location of the Win2k installation. If you are using the WinXP setup, then pick the WinXP installation location....assuming you have both installed)

You should now be at a Dos prompt that looks something like this - C:WINNT> (the drive letter and directory may vary)

at this point type in FIXMBR then press enter.

It will give a warning about possibly losing all data and/or partition info.

Assuming your MBR isn't corrupted and just simply needs LILO removed...you can ignore this warning and press Y then enter.

It should rather quickly tell you that the MBR has been fixed.

Now type EXIT and enter to restart the system
(remove the windows installation disk before the system reboots)

Your system should now be back where you wanted it to be...with no more LILO, and booting from the standard windows bootloader.

This should point out a possible flaw in the design thinking of the LILO bootloader. It would be much simpler if the bootloader had a built-in uninstall feature that could be easily accessed through the main menu.
The average PC user is not looking for a more complicated computer experience, rather they are looking for a simpler one. The basic philosophy being that the programming should be left to the programmers...I want my point and Click.

I know that this may flame more than a few computer savvy types that the average user insists on being this way...but, you cannot change the general PC public or their expectations.

Most people looking to remove LINUX and/or LILO were most likely just checking out what all the hype about LINUX was, and when they discovered how much different and complicated it can be...it's back to windows. This in no way is to say that LINUX is a bad OS...it's just a bit more complicated and much more different than windows, which most PC users are familiar with by now. LILO tends to make it seem like the user is being forced into keeping LINUX and that is rather upsetting to most.
 
Old 01-14-2004, 12:18 AM   #2
priest_judas
Member
 
Registered: Dec 2003
Distribution: Slackware 9.0
Posts: 32

Rep: Reputation: 15
I wont read all this, I only read the title... sorry..

to restore windows boot loader to mbr, simply load windows and execute the following command at M$ DoS

fdisk \mbr
 
Old 01-14-2004, 12:34 AM   #3
Guru3
Member
 
Registered: Sep 2003
Location: //home/sweden
Distribution: RedHat 9, Fedora Core 1
Posts: 360

Rep: Reputation: 31
Or, you can use a windows 98 boot disk, it works equally well. I'll also add that the windows boot loader in not stored in the master boot record, but on the first sector of the primary partition. If you also were to install lilo on the first sector of one of the first four partitions, and left the mbr alone, you could set which os to boot by changing the primary partition... (I also did not read, your topic was decriptive enough.)
 
Old 01-14-2004, 12:35 AM   #4
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Re: How to remove LILO and restore Windows Bootloader

Quote:
Originally posted by RobertRBuce
The method outlined below is for people using Windows...

This should point out a possible flaw in the design thinking of the LILO bootloader. It would be much simpler if the bootloader had a built-in uninstall feature that could be easily accessed through the main menu....I want my point and Click.
Good little tutorial. Maybe the mods will move it to the Windoze Forum

When you installed Windoze (did you do your own install or did someone do it for you?), did it give you a "built-in uninstall feature that could be easily accessed through the main menu?" Uh hum... Linux distros have not been written for the disgruntled Windoze user to "check out."

Linus Torvalds wrote the first Linux kernel because he was using Minix, and the man who wrote it wasn't interested in collaborating with others to make changes or improvements to Minix. So, he wrote Linux. It had nothing whatsoever to do with Windoze

If you were using Windoze 3.11 when Windoze 95 came out (most of us here were), then you had to learn some different things. And those of us who have assembled and repaired comps for years have had to learn many different things in each new distribution of Windoze.

One beauty of Linux is that you don't have to pay for it (except the bandwidth and media used), and you can fix what's broken (something you as the user can't do in Windoze).

So, when you get a Windoze Forum to make this tutorial a sticky, you might want to add for the "point-and-click crowd" who don't want to read, or learn the nuances and new lingo of Linux, they can just pop a Live-CD such as Knoppix (Debian based) or the Slackware Live-CD into their CD-ROM, and it won't even touch their hard drive. Then they can compare how Linux runs more efficiently from a CD-ROM than any Windoze distro does from a hard drive.

See you around.


Last edited by Bruce Hill; 01-14-2004 at 12:36 AM.
 
Old 01-14-2004, 01:46 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I'm not at my home computer right now. Isn't there a backup made of the original MBR stored in the /boot directory? Isn't there a lilo option that will restore this to the MBR. If not, use the dd command.

If Windows XP was installed in a stock computer, people will not know the administrative password. You can't even log in as administrator, unless you boot up into the safe mode.
 
Old 01-14-2004, 02:19 AM   #6
MrOuija
Member
 
Registered: Jan 2004
Location: California
Distribution: SuSE10.1, Ubuntu Edgy, Fedora 7
Posts: 30

Rep: Reputation: 15
Right on

Would you also happen to know how to get linux to boot from NTLDR when the drive that NTLDR is loaded on is a RAID mode 0 array? I've tried several ways with no luck- I always get GRUB Hard Disk Error or LI01010101001010101 depending on which boot loader I try to use. I've even tried splitting the Linux HDD (non-RAID) so it has a 100mb FAT32 partition that I tried putting the linux.lin bootloader file on- however, I can't seem to find a way to point NTLDR at any drive but the root NT partition.
 
Old 01-14-2004, 03:47 AM   #7
RobertRBuce
LQ Newbie
 
Registered: Jan 2004
Location: Boise, Idaho
Posts: 2

Original Poster
Rep: Reputation: 0
I'm not even going to bother with the first 3 responses. They need to thoroughly read the post, then decide whether they are trying to help with a solution to a problem, or just blowing a bunch of rhetorical smoke up people's butts, and/or whether they even really know anything about the Windows OS's in the first place, regardless of how annoying these OS' can occasionally be.

forums such as this are supposed to be about helping solve problems regardless, not about "my OS is better than your OS"...who cares! If it works for you then go with it.

Jschiwal - Yes, there is a backup of the MBR...this is what FDISK(in Windows 98 or before), and FIXMBR(in Windows 2000 or later) depends upon. If the backup has become corrupted...It's time to reformat, or attempt to rebuild the MBR with a third party repair tool.
However, just because LILO reports a bunch of numbers, and doesn't boot anything, doesn't mean the MBR backup is hosed.
Also, under FIXMBR at least...the admin password is pretty important to know...without it you have problems in many admin situations using windows. You might consult the MS website for a solution for this, or the owners' manual that came with the computer or computer restore CD.

MrOuija - Sorry, I don't have a system with RAID in it, so i can't help you myself...maybe someone else here in this forum might see your post and will be gracious enough to assist. I am using an old system.

Final note: I am rather disturbed at the fact that so many LINUX users profess to be so familiar with Windows and all of it's problems, and yet nobody up to this point was able to answer as I have with what should have been a fairly obvious answer to anyone that even tried looking into it, and knows anything about the most recent releases of the Windows OS.
Everyone up to now has been saying use FDISK, or use Windows 98 boot disk....these DO NOT WORK under Windows NT based platforms, and most Windows users aren't using Windows 98 or less anymore.
I can say that I am an advanced user, but not a master...so, before anyone else starts tooting their horn about how they "know" windows sucks....maybe you should prove it...and be more helpful with real answers and not simple guesses.
 
Old 01-14-2004, 04:26 AM   #8
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Quote:
Originally posted by RobertRBuce
Final note: I am rather disturbed at the fact that so many LINUX users profess to be so familiar with Windows and all of it's problems, and yet nobody up to this point was able to answer as I have with what should have been a fairly obvious answer to anyone that even tried looking into it, and knows anything about the most recent releases of the Windows OS.
Everyone up to now has been saying use FDISK, or use Windows 98 boot disk....these DO NOT WORK under Windows NT based platforms, and most Windows users aren't using Windows 98 or less anymore.
I can say that I am an advanced user, but not a master...so, before anyone else starts tooting their horn about how they "know" windows sucks....maybe you should prove it...and be more helpful with real answers and not simple guesses.
If you'll search the LQ forums, you'll see that the problem of restoring the MBR of W2K and XP has been answered correctly. I think you're just trying to get folks stirred up. I'm not really familiar with all the terms, yet, but that may be what they call a "troll." Maybe someone more knowledgable than I will address that.

And you didn't answer my question, either. I'll rephrase it, so that it's both more appropriate to your complaint, and easier to read ->
Quote:
When you installed Windoze NTLDR bootloader, did it give you a "built-in uninstall feature that could be easily accessed through the main menu?"
You can remove LILO from the NTLDR like this ->
Quote:
run /sbin/lilo -u /dev/hda
from Linux, which will uninstall LILO and restore the MBR to its pre-LILO state.
Someone who didn't like LILO, and had a lot of Windoze savvy, would have the Windoze NTLDR do the booting of both the Windoze OS and Linux. And there are threads here on LQ explaining how to do that, also.

You have the right to say mostly whatever you want, here. However, I don't think many people appreciate you being critical of Linux users. I certainly don't.
These Linux users have helped me a whole lot!

 
Old 01-14-2004, 04:44 AM   #9
scott_R
Member
 
Registered: Jul 2003
Location: Brighton, Michigan, USA
Distribution: Lots of distros in the past, now Linux Mint
Posts: 748

Rep: Reputation: 31
RobertRBuce:

You are very correct, and I myself have been guilty of this. That said, it says something about Linux users. Either they have all given up around win98, or win98 was the last MS OS worth wasting your time with.

Only mostly kidding on that statement. Still, what you offer is most valuable, up to date knowledge on other OSs. One thing to keep in mind, before you get too harsh on us, however, is the circumstances around the question itself. Why, oh why, can't 'fdisk /mbr' still fix windows? Why can't MS 98 read ntfs partitions? Yes, we all understand that MS wants people to move to "the next version", but NTFS has been around for years, and is readable to most other OSs, yet not MS's own.

So, while bad answers are less than worthless, sometimes unasked questions are even worse. I don't mean this as anything against you, as you've obviously computer literate enough to understand Linux's value. All I'm saying is perspective is important.

That said, thank you for updating the less Windows-fluent of us on the more appropriate fixes for these kinds of problems.

P.S., As for my "ancient" credentials, I still tend to fix major Windows crashes with hand extracts...
 
Old 01-14-2004, 06:38 AM   #10
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
'fdisk /mbr' does indeed work with win2k/xp, even if there's only ntfs partitions. Think about it, the mbr contains 2 parts, the bootstrap code and the partition table, the 'fdisk /mbr' command merely restores(or installs) the standard bootstrap code section, which loads the patition with the bootable flag defined in the partition table, back into the MBR. It works on its own and does not need to be able to read or write to the partitions.
To prove my theory I did a test on my other machine with winXP installed on a single NTFS partition. First I booted with knoppix, zeroed out my mbr with 'dd if=/dev/zero of=/dev/hda bs=446 count=1' then rebooted the box. As expected the machine halts when it tries to boot from the harddrive, I didn't even get something like"missing operating system" or "error loading operating system" because that's actually handled by the mbr bootstrap code which is gone. I then proceeded to set the bios to boot from the fdd, inserted my win98se, boot, executed 'fdisk /mbr', pulled out the floppy disk and did the three finger salute, viola its back to normal.

Last edited by Demonbane; 01-14-2004 at 10:59 AM.
 
Old 01-14-2004, 08:26 AM   #11
je_fro
Member
 
Registered: Nov 2002
Location: /texas/austin/home/desk
Distribution: Gentoo
Posts: 341

Rep: Reputation: 30
fdisk /mbr from a win98 floppy always worked for me...I have ntfs, fat, fat32, you name it.
 
Old 01-14-2004, 10:48 AM   #12
Guru3
Member
 
Registered: Sep 2003
Location: //home/sweden
Distribution: RedHat 9, Fedora Core 1
Posts: 360

Rep: Reputation: 31
Maybe a little off topic...

The only thing which I have not been able to do with fdisk and a win98 boot disk, is I have not been able to remove extended linux partitions, but that's not that important to me. The trusty win98 boot disk has never let me down, even when partition magic has screwed things up. It is simply not that hard to remove linux from a system and the process tends to be over complicated... And yes, linux isn't for everyone, but it is getting closer. I know a lot of families which are planning to switch to linux shortly, and more of the youth will be educated in the linux os from a younger age. But the master boot record... fdisk /mbr and there you go. Yes, fixmbr does the same thing, but on most computers a win98 boot diskette is still quicker then loading of a win2k or winxp cdrom, or, at least it is on all of mine.
 
Old 10-19-2009, 10:13 PM   #13
vivekgk
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Rep: Reputation: 0
Newbie Alert!

I realise that this thread is really old, but I hope someone will reply.

I recently installed Ubuntu 9.04 on my system, on a seperate hard disk. However, the bootloader was installed on my primary windows drive and not the drive I assigned for Ubuntu. I like to keep my OSs completely seperate and choose the boot drive using the bios option. Is there any way I can remove the bootloader from the windows partition sda (running Windows 7 beta 7100, incidentally) and on to the drive sdb?

Here's what I have installed. My main drive is a 500GB SATA on the first controller on the board (sata0), with Windows 7. It shows up as sda under linux. Secondly, there's a 160GB SATA on the second controller sata1, with Ubuntu on a 50GB partition that was automatically set up (use free space on disk). It shows up as sdb. Lastly, I have an older 40GB PATA drive that I use to run Windows XP, for older software and games, that shows up as hda. I used that pop-up menu option on the bios (F8 while booting) to select the drive to boot, and I liked it because it gave me flexibility to add/remove OSs without affecting the others.

I'd simply remove LILO, but the problem is that I've already set up Ubuntu just the way I like it, and don't want to have to reinstall and download/install all the updates again.
 
Old 10-19-2009, 11:09 PM   #14
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,501

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
Try this, I believe win 7 uses same bootloader as vista. This would be on drive sda, whatever it's called in windows.

To FIX VISTA MBR: Boot up from Vista Installation DVD and select Repair Your Computer option (its below Install Icon). Select Windows Vista -- Command Prompt.
Execute this at command prompt:
Code:
bootrec.exe /fixmbr
bootrec.exe /fixboot

If you don't have an installation DVD/CD go to this site to download EasyBCD to repair your mbr:

http://neosmart.net/dl.php?id=1

I'd recommend reading the instructions first on this page:

http://neosmart.net/wiki/display/EBC...r+with+EasyBCD

The above should allow you to boot windows from sda.

Ubuntu usually uses Grub bootloader, did you install Lilo in place of Grub? Can't help you with Lilo, haven't used it for years.
 
Old 10-20-2009, 05:08 AM   #15
vivekgk
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Rep: Reputation: 0
Quote:
Originally Posted by yancek View Post
Ubuntu usually uses Grub bootloader, did you install Lilo in place of Grub? Can't help you with Lilo, haven't used it for years.
Thanks for the help. I'll try that. I have GRUB, not LILO. Oops! No wonder this thread is so old!
 
  


Reply

Tags
boot, ubuntu



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
Windows 2000 Bootloader vs. Mandriva LILO Bootloader Dregnan Mandriva 7 12-03-2007 09:55 PM
Remove Linux, Restore WINXP Bootloader costasm Linux - General 2 07-31-2004 07:41 AM
How can i restore lilo after re-installing windows? elean Linux - General 3 06-14-2004 07:29 PM
How to remove Linux and restore Windows on Dual boot using Grub TheBaffledKing Linux - Newbie 13 04-14-2004 05:47 AM
Remove Mandrake from system; Restore Windows dindivanam Mandriva 5 12-21-2003 07:40 AM

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

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