[conspire] Creating Home Partition

Rick Moen rick at linuxmafia.com
Fri May 4 15:43:03 PDT 2007


Quoting Edmund J. Biow (biow at sbcglobal.net):

> >
> > Date: Thu, 3 May 2007 17:20:29 -0700 From: Rick Moen
> > <rick at linuxmafia.com>
> >
> > The article shows it being created as a logical partition. However
> >   
> >> > when I do it using gparted the 2 choooses are primary and extended and
> >> > logical is grayed out. 
> >> > Hdb1  Kanotics 17gb
> >> > Hdb2  Swap     500 mb
> >> > Hdb3  Ubuntu   20gb
> >> >   I read that logical partitions are contained within extended
> >> > partitions. Should I use primary or extended  for the free space.
> >>     
> >
> > Since you're aiming to have only four filesystems total, on that
> > physical drive, make life easy for yourself, and stick to primary.
> >   
> 
> My quibble about just creating a fourth primary partition is that it
> doesn't leave as much flexibility to monkey with the file system later
> as creating an extended partition and then a single logical partition.

At that point, you park one of the existing partitions' data somewhere, 
blow it away, make an extended partition in its place, and subdivide it
into however many new partitions you want.

> Also, a 40 GB drive is pretty tight for 2 operating systems and user
> files (he says typing this on his laptop with XP, SUSE 10.2 & Xubuntu
> Edgy in 40 GB).

Ja.  Me, I stick to one OS per system, generally speaking.

> You might want to move to a larger drive in the
> future.  Seems like a fast, easy way to do that would be to 'dd
> if=/dev/hdb of=/dev/hdc' which seems to go a little more quickly than
> rsync and copies over the master boot record and grub.

Um, that wouldn't be good, because that would prevent you from using the
extra space, because it would copy over the smaller drive's image
verbatim, including the bounds on allocated disk space.

As I keep saying, "dd" is almost never the right tool.

> But if you have four primary partitions you can't do much with the
> extra space on the newer, bigger drive.  However if you have an
> extended partition it seems to me that you'd be able to just define a
> new logical partition to use the extra space that the new drive
> provides (though I haven't tried this yet).

Nope.  Doesn't work that way.  Basically, an extended partition denotes
a beginning and ending cylinder, same as a primary one.  The sole
structural difference inherent in an extended-partition entry relative
to a primary-partition one is that it has a flag set (in one of the
underused bits out of the 16 bytes available in each of the partition
tables 4 x 16 byte entries) that is interpreted as "Please look in the
first sector of the expanse of cylinders I describe:  You'll find a
secondary partition table there, that explains how I'm further divvied
up into logical drives."

So, all you can do within that secondary partition table is carve up the 
extended partition's allocated space.  And, if you "dd" a small drive's 
structure onto a large drive, the partition's cylinder limits will
remain the same as before.  Bad idea.  Really bad way to initialise a
larger drive.

> I've never messed up a partition using a partition resizer,
> though I'm sure it happens all the time (back up your data).

"Back up your data" is exactly _why_ I think nondestructive partition
resizers are dumb.  Given that you've made a safety copy of your data on
other media, and your confidence that the safety copy is reliable, why
not just blow away the wrong-sized partition, make replacement ones,
then copy the safety copy's data back?






More information about the conspire mailing list