cfdisk - logical partition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
you are presented with examples of disks (partitioned probably with anaconda).
The "logical" partitions in question are shown by cfdisk (this is a cfdisk's
view of partitions), so the question first has to be directed to cfdisk about
correctness of reading, interpreting, and displaying partition info.
Is this a bug ? If yes, then only in cfdisk's display, but not as a result
of interpreting table data saved by some partitioning tool ?

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.

4 Primary   105076736*  192425983*     0    87349248*Extended (05)
None

Should it be "None" like the Unusable partition between 3 and 2 ?
Is that space mapped ("logical") or not ?
Will an installer (e.g. anaconda which uses parted) know about it ?

# cfdisk -Ps
Partition Table for /dev/sda

               First       Last
 # Type       Sector      Sector   Offset    Length   Filesystem Type (ID)
Flag
-- ------- ----------- ----------- ------ ----------- -------------------- ----
 1 Primary           0    71682029     63    71682030 HPFS/NTFS (07)
Boot
 3 Primary    71682030   100978904*     0    29296875*Linux (83)
None
   None      100978905*  100980735*     0        1831*Unusable
None
 2 Primary   100980736*  105076735*     0     4096000*Linux swap / So (82)
None
 4 Primary   105076736*  192425983*     0    87349248*Extended (05)
None
 5 Logical   105076736*  192425983*  2048#   87349248*Linux (83)
None
   Logical   192425984*  192426569      0         586*Free Space
None

# fdisk -l

Disk /dev/sda: 98.5 GB, 98522403840 bytes
255 heads, 63 sectors/track, 11978 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa8a8a8a8

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        4462    35840983+   7  HPFS/NTFS
/dev/sda2            6286        6541     2048000   82  Linux swap / Solaris
/dev/sda3            4463        6286    14648437+  83  Linux
Partition 3 does not end on cylinder boundary.
/dev/sda4            6541       11978    43674624    5  Extended
/dev/sda5            6541       11978    43673600   83  Linux

Partition table entries are not in disk order

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.
How comes it is called "logical" if it violates the rule of contiguousness ?

# 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

# fdisk -l

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xe686f016

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1           8       64228+  de  Dell Utility
/dev/sda2   *           9       13661   109667722    7  HPFS/NTFS
/dev/sda3           38308       38913     4867695   db  CP/M / CTOS / ...
/dev/sda4           13662       38307   197968995    f  W95 Ext'd (LBA)
/dev/sda5           13662       13923     2104483+  82  Linux swap / Solaris
/dev/sda6   *       13924       16534    20972826   83  Linux
/dev/sda7           16535       38307   174891591   83  Linux

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
 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

Regards,
JB
--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux