LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 08-11-2006, 06:01 PM   #1
kateshine
LQ Newbie
 
Registered: Aug 2006
Location: DC-Balti area
Distribution: Ubuntu 12.04
Posts: 17

Rep: Reputation: 0
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
 
Old 08-11-2006, 06:23 PM   #2
AAnarchYY
Member
 
Registered: Sep 2004
Location: Carlisle, MA
Distribution: Debian 8
Posts: 419

Rep: Reputation: 30
the tool your looking for is cfdisk, it can erase, create, and modify partitions. Its even curses based to make it a bit easier.
 
Old 08-11-2006, 06:32 PM   #3
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
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

Last edited by bulliver; 08-11-2006 at 07:49 PM.
 
Old 08-12-2006, 04:18 PM   #4
kateshine
LQ Newbie
 
Registered: Aug 2006
Location: DC-Balti area
Distribution: Ubuntu 12.04
Posts: 17

Original Poster
Rep: Reputation: 0
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
 
Old 08-12-2006, 04:28 PM   #5
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
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...
 
  


Reply



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
Resize an ext3 partition safely Macky Slackware 2 01-08-2006 01:46 PM
How to safely re-partition squinn Linux - Newbie 3 08-23-2005 02:38 PM
Safely resizing NTFS partition jnsg Linux - General 9 01-12-2005 11:35 PM
How to safely get rid of windows caleb star Linux - Newbie 1 12-01-2003 11:39 AM
increasing my ex3 partition safely ?? abbasakhtar Linux - Newbie 4 10-05-2003 10:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:21 PM.

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
Open Source Consulting | Domain Registration