[wellylug] Help - Confusing partitions
Cliff Pratt
enkidu at cliffp.com
Sun Feb 18 11:48:34 NZDT 2007
Carl Turney wrote:
> Hi Folks,
>
> OPTIONAL BACKGROUND INFO:
>
> I'm a relative newbie to LINUX, running Fedora Core 5 myself. With
> help from a Wizard in Melbourne, I set up a fast, thorough, easy, and
> neat backup system, using removable IDE hard disks. (Basically it
> involved partitioning, initialising, and Grubbing a second physical
> drive, then using elegant -tar- commands (once) to create a backup
> copy, followed by regular -rsync- commands to keep the backup
> up-to-date. A bit of manual editing of configuration files is also
> required. If anyone is interested, I can email you my step-by-step
> notes on this.) Actually, I have =two= backup drives, and alternate
> between both of them, because a "lightning strike" can happen in the
> middle of a backup, killing both disks.
>
> It works perfectly, and I've even used it to migrate to larger
> drives/partitions. A "complete restore" takes ~5 minutes, including
> powering down, finding & inserting the backup disk, and booting up.
>
> THE SITUATION:
>
> New to Welly, my landlady/housemate is Lyndsay (on this list). I'm
> starting to set up the same backup scheme with her Ubuntu 5.10
> system, which was set up by Peter Black (possibly on this list?)
> about a year ago. But the partitioning and usage of the original
> (working) Ubuntu hard disk has me confused. Here...
>
> (fdisk report:)
>
> Disk /dev/hda: 40.0 GB, 40020664320 bytes 255 heads, 63
> sectors/track, 4865 cylinders Units = cylinders of 16065 * 512 =
> 8225280 bytes
>
> Device Boot Start End Blocks Id System /dev/hda1
> * 1 1216 9767488+ 83 Linux /dev/hda2
> 1420 1543 996030 82 Linux swap / Solaris /dev/hda4
> 1544 4852 26579542+ f W95 Ext'd (LBA) /dev/hda5
> 1544 4852 26579511 83 Linux
>
> (df report:)
>
> Filesystem 1K-blocks Used Available Use% Mounted on
> /dev/hda1 9614116 1897216 7228528 21% / tmpfs
> 258244 0 258244 0% /dev/shm tmpfs
> 258244 12588 245656 5% /lib/modules/2.6.12-10-386/volatile
> /dev/hda5 26162008 3348468 21484568 14% /home
>
> FINALLY... MY QUESTIONS:
>
> (1) Is it important that there is no hda3 partition?
>
A disk can normally have up to 4 primary partitions or 1 to 3 primary
partitions and one extended partition with as many logical partitions as
you like. (I've vague memories of BSD violating this rule, somehow).
If there is an extended partition the partition are numbered primary one
to three and extended four, with any logical partitions from 5 up, even
if (as is the case here) when there are fewer than three primary
partitions. So, no, it is not important that there is no hda3.
>
> (2) Should I expect any difficulty in creating an hda4 partition
> without creating an hda3 first, using fdisk?
>
No, the extended partition will be hda4. I think there has to be one
primary partition at least, though.
>
> (3) Is hda5 truly a =logical= LINUX partition, created within a
> =physical= Windows partition, hda4? (Note same start & stop
> cylinders.)
>
It's not Windows, it's 'extended'. There is no OS at this level. The
extended partition contains logical partitions.
>
> (4) Could the logical hda5 be created using LINUX's fdisk, as I
> seriously doubt that any genuine Micro$oft Windows utility would
> offer creation of a logical LINUX partition?
>
Yes, if you create an extended partition, then a logical partition
within it, the first one will be hda5. This is true of Windows fdisk
too, except that the partition type won't be Linux.
>
> (5) Would Ubuntu be able to "seamlessly" work, if I bypassed the
> Windows hda4 partition altogether?
>
It's nothing to do with Windows. Yes, you can create the disk with no
extended partition, and just root, swap and home all as primary partitions.
>
> (6) What possible benefits are there to such a "logical within a
> physical" setup, in the original (working) hard disk?
>
If you want more than four partitions, you have to use an extended
partition, eg:
/dev/hda1 primary
/dev/hda2 primary
/dev/hda3 primary
/dev/hda4 extended, contains the following
/dev/hda5
/dev/hda6
....
The fact that /dev/hda2 and /dev/hda3 may be missing confuses those new
to disk partitioning. In your setup there is no advantage in the
extended partition.
Cheers,
Cliff
More information about the wellylug
mailing list