LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-08-2007, 11:15 AM   #1
mark001
LQ Newbie
 
Registered: Sep 2004
Posts: 27

Rep: Reputation: 15
uninstalling window xp on dual boot


Hi,
I have dual boot window xp and fedora 6 on my pc.
I want to uninstall window xp and keep fedora 6.
How can I do this?
many thanks.
 
Old 09-08-2007, 11:23 AM   #2
Gethyn
Member
 
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 10.04/10.10, Debian 5, CentOS 5
Posts: 900

Rep: Reputation: 32
You can get rid of it by formatting the XP partitions and editing your bootloader configuration so that it doesn't show XP as an option any more. You can then mount the partitions for use under Linux. If you'd like more detailed instructions on how to do these steps, try searching and ask if you get stuck.

It's probably also possible to delete the XP partitions, and expand some Linux partitions to take up the extra space without the need for extra mount points, but it's not something I've ever tried to do.
 
Old 09-08-2007, 11:41 AM   #3
mark001
LQ Newbie
 
Registered: Sep 2004
Posts: 27

Original Poster
Rep: Reputation: 15
hi,Gethyn
thank you for your info.
as I am very new to linux,what steps do I need to do to format window xp parition?
regards.
 
Old 09-08-2007, 01:44 PM   #4
Gethyn
Member
 
Registered: Aug 2003
Location: UK
Distribution: (X)Ubuntu 10.04/10.10, Debian 5, CentOS 5
Posts: 900

Rep: Reputation: 32
Before I start, are you sure that you want to remove Windows? Even if you're determined to make the switch away from Windows, it's often useful to keep a Windows install available as a backup in case of problems while you learn your way around Linux, this helped me out a lot while I was learning. Once you have more experience then it's safer to delete the partition.

Be very careful when doing this, you don't want to wipe out important data or your Linux install while it's running!

If you're sure you want to do it now, the first thing to do is figure out which partitions Windows is using. The best way to do this is probably by looking at the partition table. Bring up a command line, and issue the command 'fdisk -l' as root. This will list all the hard drives you have connected up, and how they are partitioned. Here's some sample output from my computer.
Code:
user@localhost:~$ sudo fdisk -l
Password:

Disk /dev/hda: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        4660    37431418+  83  Linux
/dev/hda2            4661        4865     1646662+   5  Extended
/dev/hda5            4661        4865     1646631   82  Linux swap / Solaris
Each hard drive will have an entry that starts "Disk", followed by information about the drive and its partitions. As you can see, I have a single hard drive which is divided into 3 partitions, which are /dev/hda1, /dev/hda2 and /dev/hda3. I don't actually have Windows, so can't show you a direct example of a Windows entry, but hopefully you get the idea. Windows partitions will be marked something like NTFS or FAT32 under the System column. Most likely you'll only have one Windows partition, and it'll be in /dev/hda1 (or possibly /dev/sda1), but without seeing your setup I wouldn't know for sure. Make a note of the Device(s) of the Windows partitions.

Next, you want to make sure that the Windows partitions aren't mounted (formatting a partition that's mounted is probably not a good idea!). To check this, use the command 'mount'. Here's another example on my system:
Code:
user@localhost:~$ mount
/dev/hda1 on / type ext3 (rw,noatime,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.20-16-generic/volatile type tmpfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
Most of this you can ignore, I'm not sure what all of it means, the only lines you want to look for are the ones that match the Windows partitions you identified earlier. Such a line would probably look something like:
Code:
/dev/hda1 on /media/windows type ntfs (ro,noexec,dmask=0222,nosuid)
If there are no lines matching the device name of your Windows partition, that means it isn't currently mounted, in which case all is okay. If there IS such a line, then next you need to unmount the partition. To do this, use the command (as root) 'umount <mount_point>', where <mount_point> is the directory the partition is currently mounted to. For the made up example above, you'd use the command
Code:
user@localhost:~$ sudo umount /media/windows
Once that's done, just verify that the partition umounted successfully by using the command 'mount' again.

Now that the partition is unmounted, it's safe to format it (making sure that you have already copied all the data you wanted off it first!). The command to do this varies depending on which filesystem you want to use. I recommend ext3 because it's straightforward, and I'll give you an example for that; if you want to try something more exotic you can read around. Here's a command to format the former Windows partition from the fake example as ext3:
Code:
user@localhost:~$ sudo mke2fs -j /dev/hda1
Subsitute /dev/hda1 for the correct partition location you found out earlier.

The format will probably take a minute or two and tell you some rather incomprehensible stuff about what it's doing. Once it's finished, you can check the partition using the command 'fdisk -l' as root again. This time, the line that previously said "NTFS" should now say "Linux".

All that remains now is to mount the partition under Linux and remove Windows from your boot manager. I'm a little tired of typing right now, so I'll leave it to you to have a search on how to do this and ask again if you get stuck. Here's a hint: if you want the partition to be automatically accessible every time you boot up the computer, you need to edit the file /etc/fstab. Your bootloader is probably grub, and the grub configuration is usually stored in /boot/grub/menu.lst. Be careful when editing these files, but there is plenty of information on what to do available if you search. If you have problems, please try and be specific about what the trouble is!

Last edited by Gethyn; 09-08-2007 at 01:47 PM.
 
Old 09-10-2007, 11:48 AM   #5
mark001
LQ Newbie
 
Registered: Sep 2004
Posts: 27

Original Poster
Rep: Reputation: 15
Hi,

The reason why I wanted to unintall window xp is because it
is behaving very funny, I think my pc might have been hacked
or having virus.

After I uninstall windows, I will do a fresh install,
don't know how to do that yet.

I think I should learn how to unintall windows while keeping
fedora 6. then, install a fresh copy of window xp.

I will try what you have told me.

p.s. thanks for the detail info.

Thanks.
 
Old 09-10-2007, 12:39 PM   #6
masterclassic
Member
 
Registered: Jun 2007
Distribution: Knoppix
Posts: 140

Rep: Reputation: 23
If you re-install win xp, it will overwrite the bootloader (grub) in the MBR, so you will need to re-install and configure grub too. Did you try to "repair" windows?
 
Old 09-10-2007, 08:33 PM   #7
noobiwan
LQ Newbie
 
Registered: Aug 2006
Location: SC, USA
Distribution: OpenSUSE10.3
Posts: 12

Rep: Reputation: 0
Quote:
Originally Posted by mark001 View Post
Hi,

The reason why I wanted to unintall window xp is because it
is behaving very funny, I think my pc might have been hacked
or having virus.
You might want check the Windows install for spyware as well. Spy-bot Search and Destroy is a good freebie for that.

http://www.spybot.com/en/index.html

Be careful of a spy-bot spoof site that calls their product SpyWare-bot. It's exactly that, spyware.

Uninstalling and re-installing should be considered as a last resort because it is such a PITA.
 
Old 09-12-2007, 12:48 PM   #8
mark001
LQ Newbie
 
Registered: Sep 2004
Posts: 27

Original Poster
Rep: Reputation: 15
HI, All,

I think if everything else failed, I should just do a back up for
Window and fedora 6, then format the window partition and Linux
partition and do a fresh insall for both. It is less of a PITA
for a newbie like myself.

Thanks for all the help from linux community.

Mark001
 
  


Reply


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
uninstalling ubuntu from a dual boot linux box ragoetz Linux - Software 1 04-02-2007 01:22 PM
Uninstalling SLES9 from dual boot with XP purva Linux - Newbie 1 10-12-2005 07:47 PM
Uninstalling Linux from a dual boot system Lee.H Linux - Newbie 6 11-12-2004 01:58 PM
Uninstalling on Dual Boot System spaaarky21 Mandriva 12 07-26-2004 12:35 PM
uninstalling mandrake 9.0 on dual boot with win xp Chrishas Mandriva 9 12-04-2003 06:16 PM


All times are GMT -5. The time now is 07:01 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration