Help - Search - Members - Calendar
Full Version: Removing Windows
Linuxhelp > Support > Technical Support

apologies if this has been covered elsewhere but I've done some extensive googling and can't find a decent guide.

i have a win xp/fedora dual boot system (2 physical disks and GRUB as the bootloader) and would just love to get rid of both xp and GRUB to leave me with a fedora system using both disks. without losing all the data i've shifted from xp into fedora. i've no experience of fdisk or configuring GRUB and need to get it right first time.

help anyone? will treat to beer if you're in the london area...
This is the kind of problem I love to help with ... (removing Windows completely from the PC) cool.gif

Grub is still required to boot to Fedora ... so you don't want to get rid of that ohmy.gif (You can set the timeout to 0, remove the XP entry from /boot/grub/grub.conf). You currently probably have something like this in grub.conf:

title Windows XP
   rootnoverify (hd1,0)
   chainloader +1

Just remove (or put a # in front of) everything (including the title line) associated with WinXP. Now you should have a /boot/grub/grub.conf that looks something like this:

# grub.conf generated by anaconda
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/hda4
#          initrd /initrd-version.img
title Fedora Core (2.4.22-1.2115.nptl)
    root (hd0,0)
    kernel /vmlinuz-2.4.22-1.2115.nptl ro root=LABEL=/ rhgb
    initrd /initrd-2.4.22-1.2115.nptl.img
#title Windows XP
#    rootnoverify (hd1,0)
#    makeactive
#    chainloader +1

(your root(hd0,0) might be different ... the one you have is correct, don't change it)

After your first reboot, if everything works, change the timeout to timeout=0 (or 1 or 2) if you don't want to spend alot of time at the grub selection screen.

Now all you have to do is delete the windows partition (I assume you have moved everything you want to keep to the fedora partitons)...if so, do the command:

fdisk -l

to list all your partitions .... you may have to do

fdisk -l /dev/hda


fdisk -l /dev/hdb


When you find the windows partiton, you should know it's drive (/dev/hda, /dev/hdb, etc) and it's partition number (hda1, hdb1, etc.)

Now issue the command:

fdisk /dev/hdX

(where X is the windows drive...)

You should now be in fdisk .... type the command m to see a menu ... then type p to print the partition table It should look something like this:

  Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1          17      136521   83  Linux
/dev/hda2              18         267     2008125   82  Linux swap
/dev/hda3             268        7297    56468475   7  HPFS/NTFS

In the above example, I want to delete /dev/hda3 ... so I would use the command d for delete (and press enter) then when asked for a partition, I would use again press p to make sure we are deleting the correct partition ... it should now look like this:

  Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1          17      136521   83  Linux
/dev/hda2              18         267     2008125   82  Linux swap

So we can create a new partition by using n ... it will ask for the partition number .. in my case I will use 3. It will then default to the start sector ... confirm it, and the end sector(confirm it). Now a p should show this:

  Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1          17      136521   83  Linux
/dev/hda2              18         267     2008125   82  Linux swap
/dev/hda3             268        7297    56468475   83  Linux

If it does not, you have yet to write any changes to the partition table ... at this point a Ctrl-c will take you to the command prompt with no changes....but if all is well, use the command w to write the table and exit.

Now you need to create a file system on your new partiton ... in my example it is /dev/hda3 ... yours may be different...

Since the other partitions on fedora should be ext3, that is what I would recommend for this new partiton as well.

My partition was /dev/hda3, yours may be different... (please make sure you format the correct partiton)....

so for me...I would use the following command to build an ext3 filesystem on /dev/hda3:

mke2fs -j /dev/hda3

When the filesystem make is complete you need to mount your new ext3 partition ...

For testing, create a directory called /mnt/test like this:

mkdir /mnt/test

now do the command:

df -h

to see the current mounted partitions....mine looks like this:

Filesystem            Size  Used Avail Use% Mounted on
/dev/hdb1              11G  3.6G  6.6G  36% /
/dev/hda1              99M  8.0M   86M   9% /boot
none                  378M     0  378M   0% /dev/shm

Now lets mount the new partition:

mount /dev/hda3 /mnt/test

And do another df -h (here is mine now)

Filesystem            Size  Used Avail Use% Mounted on
/dev/hdb1              11G  3.6G  6.6G  36% /
/dev/hda1              99M  8.0M  86M   9% /boot
/dev/hda3              18G  1.0M  18G  100% /mnt/test
none                  378M     0  378M   0% /dev/shm

I only made one big partition ... you can make as many as you want with can also mount it anywhere you want, just create the directory first...

You can make an entry into /etc/fstab to auto mount the new directory(s) as well.
worked perfectly hughesjr. i salute you
Glad it worked out!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.