LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to safely rid myself of an xp partition? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-safely-rid-myself-of-an-xp-partition-473102/)

kateshine 08-11-2006 06:01 PM

how to safely rid myself of an xp partition?
 
Hello,
I'm not only new to Linux, but relativley new to advanced computing (I definitely consider just using Linux advanced, to give you an idea where I'm coming from). So, please forgive me for asking what is most likely a very elementary question:

Be it that it may that I am new to Linux, I feel I am ready to get rid of my XP partition. When I installed Ubuntu it did a fantastic job of basically partitioning it for me, and I'm quite pleased to say I'd really just rather just get rid of Microsoft. My question is, how do I go about safely formatting the Windows partition, and is it possible to reconnect it to the Ubuntu partition?

I actually have two Widows partitions, one for use and one for Recovery (which I've never touched). I'd like to keep the Recovery partition, in case something goes really wrong with Linux...but to be totally (and embarrassingly) honest, I don't really know what to do with it, anyway...

I realize this is a bit more like an introduction that a quesiton, in some regards, but I'd also like to add that I'm absolutely bowled over by the Linux community. Thanks for your help.
kate

AAnarchYY 08-11-2006 06:23 PM

the tool your looking for is cfdisk, it can erase, create, and modify partitions. Its even curses based to make it a bit easier.

bulliver 08-11-2006 06:32 PM

Hi kateshine,

"new to advanced computing" or not, you are very brave to dive strait in to the deep end, as most novices will dual boot for a while. Good on you!

In any event, if we assume here that your XP partition is the first one then it will be called /dev/hda1 under linux. To be sure we can use the fdisk program to dump your partition table. Here is sample run from my system:
Code:

[me@mine]# fdisk -l /dev/hda
Disk /dev/hda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/hda1  *          1          7      56196  83  Linux
/dev/hda2              8        1224    9775552+  83  Linux
/dev/hda3            1225        3657    19543072+  83  Linux
/dev/hda4            3658      24321  165983580    5  Extended
/dev/hda5            3658        5482    14659281  83  Linux
/dev/hda6            5483        5544      497983+  83  Linux
/dev/hda7            5545        6152    4883728+  83  Linux
/dev/hda8            6153        6760    4883728+  83  Linux
/dev/hda9            6761        7369    4891761  83  Linux
/dev/hda10          7370        7978    4891761  83  Linux

In my case I have no windows partitions, but you will be able to pick it out as it will not have "Linux" under the system column. Having identified which partition, we can now reformat it using fdisk, or if the interface is too cryptic some prefer cfdisk, which is the same basic app but more user friendly.

Now, here is where I don't remember (please chime in someone if you know) but you either have to delete the partition, then create a new one in the same spot, or perhaps you can simply change the partition's system id (to 83/Linux) then write a new Linux filesystem to it.

Now you must decide where you want to mount the new empty filesystem/partition. For example, you may want to have your /home directories on a separate partition, so you would need to backup and archive whatever is currently on your /home (using tar) so you may do something like:
Code:

# mv /home /home.bak
# tar czf home.tar.gz home.bak/

Now you mount your new partition at /home and untar your backed up home directory. Now your /home is separate rather than being a part of '/'. You can of course pick a different directory mountpoint if you wish.

Anyway, that is a lot for you to digest, and I am sure you will not understand it all on first pass. That is OK. I suggest starting with 'man fdisk' to see how that program works.

Also, I can not recommend enough that you pick yourself up a good beginnijng Linux book to help out with the thousands of questions you will surely have. My pick would be "Running Linux" by Matt Welsh et al. This is the book I cut me teeth on...

If you cannot or don't want to get a dead tree book then there are also tonnes of documentation on the web. Try:
http://www.tldp.org/LDP/intro-linux/html/index.html (excellant introduction)
http://rute.2038bug.com/rute.html.gz (good, though a bit dated)

Above all, use LQ.org for any question/concerns you cannot address elsewhere. If you have some more specific questions about the points I have brought up feel free to ask away, as there are many people ready to help here...

Good Luck!

PS: found this on the site: might help with background on how Linux partitions work, and how to use fdisk:
http://www.linuxquestions.org/linux/...a_Linux_System

kateshine 08-12-2006 04:18 PM

thanks!
 
Thank you for your help...you're right, it's a bit much to digest...I think I'll need that luck :) I'm kind of wondering whether it might be easier at this point to just back up everything I need and run a full reinstallation....or maybe that would be opening an entirely different can of worms.

Thanks again,
Kate

bulliver 08-12-2006 04:28 PM

Quote:

might be easier at this point to just back up everything I need and run a full reinstallation
Well, that's just the thing...if you know what you are doing it is not hard at all, but if you don't it can seem impossible. If you want to go the reinstall route then go ahead, as at this point it is certainly easier, but don't be afraid to learn either.

What I noticed about Linux is that at first everything seems cryptic, awkward and strange, but once you "get it" it makes so much sense you can't believe anybody would do things differently...


All times are GMT -5. The time now is 04:41 PM.