Complex hard drive partitioning

Alan McKinnon alan at linuxholdings.co.za
Thu Jul 6 07:10:46 UTC 2006


On Wed, 2006-07-05 at 16:34 -0600, Ian Kabeary wrote:
> Hi there,
> I would like to install Ubuntu on my laptop (Satellite A70), (as the
> only other computer I have is an iMac and OS X is fine with me). The
> only thing is that I'll need to go into extended partitioning as this
> is what my scheme looks like now:

Don't get hung up on extended partitions - they are nothing more than a
dodge to get around MS-DOS 2's original brain dead idea that 4
partitions are enough. Everything from 4 and above goes into an extended
partition and the kernel knows what to do with it.
 
> ==100GB Hard drive==
> /dev/hda1 == WinXP == 20GB
> /dev/hda2 == boot // reiserfs == 2GB
> /dev/hda3 == swap == 4GB
> /dev/hda4 == reiserfs // gentoo linux == 72GB
> (Im at work so its all from memory, its very close though.)

/boot is about 4000% more than what you need, 100M is normally
enough :-)

But leave it as is for now, it will make your life so much easier if you
don't fiddle there. I'm going to assume you want 20G for Ubuntu, so hda4
needs to become 52G

> I _dont_ want to get rid of Gentoo because of Portage *Drools*, nor do
> I want to scrap Windows (Flash MX + Maple Story).
> Another hard drive for this laptop is out of my price range, so Id
> like to just put Ubuntu on as well. I dont mind reducing the size of
> my boot partition if it really is that huge, nor do I mind reducing my
> gentoo partition.

Step 1 is to back up the gentoo partition onto the external drive. You
might want to backup WinXP as well just in case.

You need to make hda4 an extended partition, and place gentoo and the
to-be-made ubuntu partitions in it. So boot off a LiveCD (you can't use
gentoo for this, as you need to modify it's /) and do the following:

using fdisk, delete hda4 and create a new extended partition of exactly
the same size. Then create a new logical partition taking up all
available space - this will be hda5 and will be exactly the same size as
hda4 was, your data will even remain intact.

Reducing the gentoo partition correctly is a little tricky - the file
system must be exactly the same size as the partition, it's not always
easy to get this right (some programs have different ideas on how big 1M
really is). So what I would do is 

- resize_reiserfs the gentoo partition down to 50G
- use fdisk to make hda5 about 52G
- resize_reiserfs hda5 again to fill the partition completely.
Resize runs very fast, this is not a long procedure

> Can someone tell me how to get Ubuntu (6.06) on to this hard drive?
> The only other option is to install onto my external 80GB drive, but
> when I tried it didn't work properly even after following a guide.

You should now have 20G free at the end of the disk which you can use as
you wish from the Ubuntu installer - remember to select advanced
partitioning - if you click yes,yes,yes,OK you might end up with Ubuntu
taking over the whole disk...


alan

> Thanks!!
> ~Ian 





More information about the ubuntu-users mailing list