Deleting a Linux Partition

soFly

Distinguished
Feb 16, 2006
3
0
18,510
Ok so I now have 2 operating systems, windows and linux. I haven't used the linux in 1 month so I would like to remove it.
I was so proud I got it installed properly but now I cannot remove it.

Back then, I made the partition with Partition Magic. I tried removing the partition with the "Remove Partition" tool from Partition Magic.
Everything went well so far. I applied the changes. So my system is rebooting. After the reboot (from here everything goes bad) I get this black screen that says:
GRUB
and lots of commands.. I had to press TAB to get a list of all available commands. Since I don't have a program to screenshot there I don't have any.

I tried lots of things. After a while I gave up and booted from the DVD that has linux on it. And reinstalled it over the old one. Now everything goes fine. Windows slowed down a bit, but whatever. But PLEASE help me.

How do I remove the partition and get 1 disk again.

To those who want to help, thanks! To all the others, also thanks!

Highest regards !

soFly
 
Put debug.exe on a W98 boot floppy. Debug is in 98 in Windows - Command folder. Get help from someone who still has 98 on their comp.

At the "A" prompt, type the following, hitting Enter at the end of each line, and those are all zeroes, NOT THE LETTER O:

debug (this will give you a - (minus sign) cursor.

f 200 L200 0
a 100
mov ax,301
mov bx,200
mov cx,1
mov dx,0080
int 13
int 3
(hit Enter again here)
g=100
q

Remove the floppy; pop in your XP cd, reboot to happy install.
 
Thanks, but windows is already installed, if I add my windows cd and install it? All my files will be gone?
 
I'm sorry! Don't follow my post if there's lots of stuff on the XP partition you would feel bad about missing.

Debug will kill everything on the drive.

PM this guy linux_0. He is the resident Linux specialist. He might be able to solve the removal of just the Linux.
 
You can either boot from a win98se boot floppy or boot floppy disk image and run

fdisk/mbr

OR

boot from a Linux rescue CD

delete the linux partition, create a new 128MB partition in it's place and create an ext3 FS on it then:

fdisk -l /dev/hda # will print out your partitions

fdisk /dev/hda # /dev/hda = primary master PATA HDD /dev/sda = 1st SATA HDD

# in fdisk
# p = print
# d = delete partition
# n = create new partition
# w = write
# q = quit
# m = help
# l = partition types

If you make a mistake DO NOT hit w to write :!:
just quit and try again

# hit p to print the partitions
# hit d to delete the linux partition
# type in the partition number of the linux partition (type 83)
# hit n to create a new partition
# hit enter at all the prompts except when prompted for the partition size
# type in +128M for the size
# TYPE is 83 Linux native

If you make a mistake DO NOT hit w to write :!:
just quit and try again

fdisk -l /dev/hda # will print out your partitions

when you are done with fdisk

mkfs -t ext3 /dev/hda? # where ? is the partition number of the 128MB linux partition you made

mkdir grub
cd grub

echo 'title dos
rootnoverify (hd0,0)
chainloader +1
' > grub.conf ;

sync

shutdown -rf 0
 
Windows will not be deleted as long as you do not alter your windows partitions in any way.

However making a mistake in DOS fdisk or Linux fdisk can cause data loss so I would advise you to backup your data if possible.

If you have Knoppix or another Linux Live CD you can boot from it and backup your critical data to a USB flash drive, CD-R, DVD-R, external HDD or other storage device.

Running fdisk/mbr from a DOS or windows 98SE boot floppy or boot CD should not destroy anything but you should still be careful.