LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Free Space Partition (https://www.linuxquestions.org/questions/linux-newbie-8/free-space-partition-734583/)

pighunter 06-21-2009 12:12 PM

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

Uncle_Theodore 06-21-2009 12:27 PM

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...

pighunter 06-21-2009 03:30 PM

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

Uncle_Theodore 06-21-2009 04:30 PM

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!

pighunter 06-21-2009 04:45 PM

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

Uncle_Theodore 06-21-2009 04:56 PM

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.

pighunter 06-21-2009 06:59 PM

Yes, recently I had a very painful lesson confirming the necessity of backing up when creating partitions.

Jim


All times are GMT -5. The time now is 03:37 PM.