LinuxQuestions.org
Review your favorite Linux distribution.
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 06-21-2009, 12:12 PM   #1
pighunter
Member
 
Registered: May 2009
Posts: 32

Rep: Reputation: 15
Free Space Partition


I have a dual boot system with two hard drives. Xp on first HD, Ubuntu on second Hd. I boot with Grub through the MBR of the first HD. My question is this, I have approx. 150GB of free space on drive 2, which I did not partition, and on which I would like to create an extended partition and install another distro, can I do this without trashing my present set-up? Everything is working and I don't want to cause myself unnecessary grief, but I would like to load another distro and learn more about linux.

On disk 2 I have 3 primary partitions and a swap partition, /root, /usr, /home, and /swap.

All partitions are ext3 with the exception of swap which is ext2.


Thanks for the help.


Jim
 
Old 06-21-2009, 12:27 PM   #2
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 69
Well, there's a contradiction in your post. How many primary partitions do you have on disk 2? You say you have three, but list four (swap is also a partition). Just llok at the output of

fdisk -l

to see how many partitions it lists.
If you have three, then it's easy to create another one, as a container for logical partitions and install Linux in them (watch for partition numbering, though! I hope your 150G are after the partitioned space). cfdisk is the command to do that.
If you have four, then you'll need to delete your swap partition and create a new container in its place, containing the entire free space. Then, recreate the swap partition as a logical one inside this container. You'll have to edit the /etc/fstab file in your exiting Linux installation to make it use the new swap partition. But several Linux unstallations can use the same swap.

PS. swap can't be ext2, you confused something...

Last edited by Uncle_Theodore; 06-21-2009 at 12:29 PM.
 
Old 06-21-2009, 03:30 PM   #3
pighunter
Member
 
Registered: May 2009
Posts: 32

Original Poster
Rep: Reputation: 15
Yes, confusion is an ongoing problem.

This is the result of fdisk -l
/dev/sdb1 1 6382 51263383+ 83 Linux
/dev/sdb2 6383 12758 51215220 83 Linux
/dev/sdb3 12759 19244 52098795 83 Linux
/dev/sdb4 19245 20149 7269412+ 5 Extended
/dev/sdb5 19245 20149 7269381 82 Linux swap / Solaris

It looks like I have an extended partition but I'm not exactly sure how to interpret this. What partition type is indicated by "82"?

Thanks,

Jim
 
Old 06-21-2009, 04:30 PM   #4
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 69
82 is a partition type used by Linux swap and, I guess, Solaris.
What you need to do is to extend your /dev/sdb4 to the end of the drive (I'm assuming the empty space is after it) and then recreate /dev/sdb5 inside of it and create some more partitions.

You can use cfdisk (a console program) or some GUI utilites like gparted.
Look in your /etc/fstab and make sure the "swap" entry points to the correct new swap partition after you're done.

Good Luck!
 
Old 06-21-2009, 04:45 PM   #5
pighunter
Member
 
Registered: May 2009
Posts: 32

Original Poster
Rep: Reputation: 15
One more question please. It it safer to manipulate the partitions from a LiveCD or from within Ubuntu, or does it make any difference?

Jim
 
Old 06-21-2009, 04:56 PM   #6
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 69
Well, you probably have to repartition using a live CD. Gparted comes with a bootable CD image, just check their website. Generally, using a live CD is better. Of course, backing up your information is a must, before you start playing with your partitions.
 
Old 06-21-2009, 06:59 PM   #7
pighunter
Member
 
Registered: May 2009
Posts: 32

Original Poster
Rep: Reputation: 15
Yes, recently I had a very painful lesson confirming the necessity of backing up when creating partitions.

Jim
 
  


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
partition space and disk space usage and free don't match nsic Linux - Newbie 3 02-22-2013 12:57 PM
can't partition free space from shrunken partition john_b Linux - Newbie 7 01-14-2006 04:43 AM
Partition Free Space - Move /home to the new partition gregkise Linux - General 5 12-16-2003 10:19 PM
Partition Free Space? Gerardoj Linux - General 16 06-02-2003 01:16 AM


All times are GMT -5. The time now is 04:11 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