how not to initialize HD
JB
jb.123abc at yahoo.com
Fri Aug 6 13:55:47 UTC 2010
Gregory Hosler <ghosler <at> redhat.com> writes:
> ...
Hi,
FYI. This is from the dev team member.
From: Karel Zak <kzak at ...>
Subject: Re: cfdisk - logical partition
Newsgroups: gmane.linux.utilities.util-linux-ng
Date: 2010-08-06 13:18:37 GMT (35 minutes ago)
On Fri, Aug 06, 2010 at 01:26:27PM +0200, J B wrote:
> Example 1.
> ==========
> The last item (Free space) is "logical"
>
> Logical 192425984* 192426569 0 586*Free Space
> None
>
> but clearly outside of extended partition's range.
This is feature. The free space around extended partition is always
marked as logical if the number of all partitions is greater than 4
(it means you cannot create a primary partition).
Don't forget that cfdisk allows to create logical or primary
partitions only. The extended partition is created/modified
automatically for all logical partitions. The extended partition is
completely hidden in the default output (interactive mode).
> 4 Primary 105076736* 192425983* 0 87349248*Extended (05)
> None
>
> Should it be "None" like the Unusable partition between 3 and 2 ?
I don't think so.
> Is that space mapped ("logical") or not ?
cfdisk is able to use the free space for logical partitions only.
From partition table point of view the space is invisible.
> Will an installer (e.g. anaconda which uses parted) know about it ?
I don't know (try to use parted, you will see) ... it depends on
libparted. I think that smart partitioning tool should be able to
detect gaps in layout and reuse the free space.
> Example 2.
> ==========
> One more "rule to follow" with regard to partitions:
> http://www.lissot.net/partition/partition-03.html
> ...
> Unlike primary partitions, logical partitions must be contiguous.
> Each logical partition contains a pointer to the next logical partition, ...
>
> Between partitions 2 and 4 there is a free space marked as "logical".
>
> Logical 219463964* 219463964 0 1*Free Space
> None
>
> It is clearly outside of the Extended partition range.
that's the same situation like in your Example 1.
> How comes it is called "logical" if it violates the rule of contiguousness ?
No, cfdisk will update the first sector of the extended partition if
you create a logical partition from the free space. The final ext
partition will be contiguous.
> # cfdisk -Ps
> Partition Table for /dev/sda
>
> First Last
> # Type Sector Sector Offset Length Filesystem Type (ID)
> Flag
> -- ------- ----------- ----------- ------ ----------- -------------------- ----
> 1 Primary 0 128519 63 128520 Dell Utility (DE)
> None
> 2 Primary 128520 219463963* 0 219335444*HPFS/NTFS (07)
> Boot
> Logical 219463964* 219463964 0 1*Free Space
> None
> 4 Primary 219463965 615401954 0 395937990 W95 Ext'd (LBA) (0F)
> None
> 5 Logical 219463965 223672994 63 4209030 Linux swap / So (82)
> None
> 6 Logical 223672995 265618709 63 41945715 Linux (83)
> Boot
> 7 Logical 265618710 615401954 63 349783245 Linux (83)
> None
> 3 Primary 615401955 625137344 0 9735390 CP/M / CTOS / . (DB)
> None
> Example 3.
> ==========
> This example is by Michael Schwendt <mschwendt <at> gmail.com> .
> These are his comments.
>
> You might want to examine the cfdisk source code to find out. cfdisk does
> not claim it would be a valid partition. It just prints a partition type
> for the free space, and that already could be a bug. Happens here, too:
>
> First Last
> # Type Sector Sector Offset Length Filesystem Type (ID) Flag
> -- ------- ----------- ----------- ------ ----------- -------------------- ----
> 1 Primary 0 390625* 1# 390626*Linux
(83) Boot
> 2 Primary 390626* 781250* 0 390625*Linux
(83) None
> 3 Primary 781251* 39062500* 0 38281250*Linux
(83) None
> Logical 39062501* 39070079 0 7579*Free
Space None
this is correct, you cannot create a primary partition (all positions
are used) and the space is possible to add to the existing extended
partition (part 4.)
> 4 Primary 39070080 976768064 0 937697985 W95 Ext'd (LBA) (0F) None
> 5 Logical 39070080 78124094 63 39054015 Linux
(83) None
> 6 Logical 78124095 117194174 63 39070080 Linux
(83) None
> 7 Logical 117194175 156248189 63 39054015 Linux (83) None
> 8 Logical 156248190 195318269 63 39070080 Linux (83) None
> 9 Logical 195318270 203125859 63 7807590 Linux swap / So (82) None
> 10 Logical 203125860 976768064 63 773642205 Linux LVM
> (8E) None
Karel
--
Karel Zak <kzak at ...>
http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo at ...
More majordomo info at http://vger.kernel.org/majordomo-info.html
JB
More information about the users
mailing list