Discussion Locked

Removing Lilo and Mandrake Linux 8.2

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have an amd athlon xp2000+i have an 8 gig hd and 2 gig hd. I installed mandrake on the smaller drive. i am unexperienced really at linux and i just want to completely rid my system of linux so i can boot into win xp( installed on the 8 gig disk)i cant get into the windows boot menu because lilo takes precedence. I cant seem to find how to make a win xp boot disk. and the drive with win xp has data that i need so that limits my chance of formatting or removing disks. at now my copy of linux isnt working properly and i have assignments due soon i just want windows to work!

4 replies

by dmiles

The lilo program (not the complete LILO package), uses the command
line option -u to uninstall the LILO boot loader. You have to supply
the device name of the device you installed LILO on, for example:

lilo -u /dev/hda

This rewrites the original, pre-LILO master boot record back to the
first hard drive, from the boot record saved in /boot/boot.0300. If
you installed LILO to a partition as a secondary boot loader, for
example, /dev/hda1, lilo re-installs the original boot sector from the
save file /boot/boot.0301. Refer to the lilo manual page for details.
Thanks to Villy Kruse for reminding me to update this answer.

If you have an earlier version of LILO, you will have to use the DOS
(MS-DOS 5.0 or later, or OS/2) FDISK /MBR (which is not documented).
This will restore a standard MS-DOS Master Boot Record. If you have
DR-DOS 6.0, go into FDISK.EXE in the normal way and then select the
Re-write Master Boot Record option.

If you create a boot floppy during the Windows installation process,
make sure that it contains the programs FDISK.EXE, FORMAT.COM, and
SYS.COM, and use that to re-install MS-DOS on the hard disk.

If you don't have MS-DOS or DR-DOS, you need to have the boot sector
that LILO saved when you first installed it. You did keep that file,
didn't you? It's probably called boot.0301 or some such. Type:

dd if=boot.0301 of=/dev/hda bs=445 count=1

(or /dev/sda if you're using a SCSI disk). This may also wipe out your
partition table, so beware! If you're desperate, you could use

dd if=/dev/zero of=/dev/hda bs=512 count=1

This will erase your partition table and boot sector completely:

Note that the DOS MBR boots whichever (single!) partition is flagged
as "active." You may need to use fdisk to set and clear the active
flags on partitions appropriately.

by curacao_dejavu

gb and xp is on the 8 gb hardisk.
download a dos or windows boot disk at www.bootdisk.com.
use fdisk and format the 2 gb harddisk.
Then boot from the xp cdrom, and the setup , etc should be going as usual on the 2 gb harddisk and you are set.

Leopold

by bmitchel

WARNING!

Do not do a 'fdisk /mbr' with an older OS such as DOS 6.22 -- you may run into problems, as it does not properly support larger disks.

the previous answer that somebody gave of using the system recovery mode of Windows setup isn't such a bad idea. ;-)

by soliboy

For WinXP you will need to boot to a recovery console using the XP CD and use the FIXMBR and FIXBOOT commands to rewrite the MBR and boot sector (at least I had to when removing GRUB). Using a Win 98 boot disk and FDISK /MBR works fine with other Windows.

This discussion is closed to new replies.