LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   rearrange partitions and use unallocated space (https://www.linuxquestions.org/questions/linux-hardware-18/rearrange-partitions-and-use-unallocated-space-4175417913/)

Pedroski 07-21-2012 02:50 AM

rearrange partitions and use unallocated space
 
1 Attachment(s)
I had Fed 17 installed, but it was not working well. I installed Ubuntu 12.04, using 'replace existing Linux'. Ubuntu asked me to create a swap, and I clicked after the partition. That left me with the situation you can see in the screenshot. I didn't have time to do anything about it then. Apparently, you can only have 4 partitions, so I have 140GB unallocated. I would like to put Fedora on there now that I have time. It may have improved with time.

How can I best rearrange things? If I have to, I can reinstall Ubuntu, but I'd rather not.

pingu 07-21-2012 03:01 AM

Luckily this is not a big problem.
"you can only have 4 partitions," yes, but that is primary partitions.
What you can do is create an extended partition which acts as a container for lots of partitions (more exactly "logical volumes" but you can treat them as partitions).
So do this:
1. Delete /dev/sda4
2. Use all unallocated space, ~142GB, for extended partition.
3. Create new swap, then all partitions you want as logical volumes.
And finally, check that Ubuntu picks up the new swap, maybe you have to do it manually.

syg00 07-21-2012 03:15 AM

Quote:

Originally Posted by pingu (Post 4734315)
What you can do is create an extended partition which acts as a container for lots of partitions (more exactly "logical volumes" but you can treat them as partitions).

Nope, they are logical partitions within an extended. Logical volumes are are somethings else again, for LVM.

Other than that good advice that should help the OP. Fedora will find the (logical) swap o.k. but may reformat it, which will change its UUID. This will make Ubuntu unbootable, so keep an eye on the Ubuntu fstab before rebooting.

Pedroski 07-21-2012 03:18 AM

Thanks, I'll try it later. I'll try not to blow up my computer!

What was that about unbootable?? How to avoid such crises on this beautiful day??

pingu 07-21-2012 03:23 AM

Quote:

Originally Posted by syg00 (Post 4734329)
Nope, they are logical partitions within an extended. Logical volumes are are somethings else again, for LVM.

Oops, my mistake. Thanks for correcting.

Pedroski 07-21-2012 04:02 AM

Sorry, but if things go pear shaped on rearranging the partitions and installing Fed, I should:

1) Look in /etc/fstab for the UUID of the swap partition
2) Make sure that is the entry in Ubuntu's /etc/fstab (at the mo this is UUID=779573f9-b046-4017-ae6b-6f550994634c none swap sw 0 0) and if necessary insert the new UUID

Then Ubu will boot ok??

syg00 07-21-2012 04:06 AM

Quote:

Originally Posted by Pedroski (Post 4734331)
What was that about unbootable?? How to avoid such crises on this beautiful day??

Just check the UUID on the swap (using blkid maybe) is what Ubuntu expects it to be.

July in Nanjing - hmmm, that would be hot and steamy if I recall correctly. "Beautiful day" might be a stretch of the imagination ... :p

Edit: posts crossed "in-flight". Yep, maybe Fedora won't reformat it - but check just in case.

Pedroski 07-21-2012 04:10 AM

Thanks for that.
Definitely swelteringly hot, but sunny today, blue sky over my little mountain, 方山 (fangshan)

Pedroski 07-22-2012 07:03 PM

Post scriptum: I did the deed, worked fine. Fedora did reformat the swap partition, without informing or asking me. Afterwards it had a different UUID
But Ubuntu didn't falter: it took a bit longer booting, I suppose it noticed that the disk had been altered, and came back ok.


All times are GMT -5. The time now is 06:13 AM.