Re: fdisk: reorder (cmd) bug with logical partitions.

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

 



Looks like this message was ignored. Resending as remainder.


On 05/21/2013 07:04 PM, Gerardo Exequiel Pozzi wrote:
> Hello
> 
> 
> The reorder cmd (x->f) does not work propertly. A fdisk session example
> for better description is attached.
> 
> See how the last partion "coco9" that should be "coco6" after re-order,
> keeps with the same name, but with start-sector and end-sector with
> incorrect values and outside the upper limit of the extended "coco4" and
> the disk "coco" itself.
> 
> 
> Good luck!
> 
> 
> $ uname -a
> Linux exequiel 3.8.13-64 #1 SMP PREEMPT Fri May 17 18:52:27 ART 2013
> x86_64 GNU/Linux
> $ cat pepe
> # partition table of /dev/sda
> unit: sectors
> 
> /dev/sda1 : start=     2048, size=   131072, Id=83, bootable
> /dev/sda2 : start=   133120, size= 41943040, Id=83
> /dev/sda3 : start= 42076160, size= 41943040, Id=83
> /dev/sda4 : start= 84019200, size=3823009968, Id= 5
> /dev/sda5 : start= 84021248, size=  8388608, Id=82
> /dev/sda6 : start= 92411904, size=  8388608, Id=83
> /dev/sda7 : start=100802560, size=  8388608, Id=83
> /dev/sda8 : start=109193216, size=  8388608, Id=83
> /dev/sda9 : start=117583872, size=  8388608, Id=83
> /dev/sda10: start=125974528, size=1258291200, Id=83
> /dev/sda11: start=1384267776, size=2097152000, Id=83
> /dev/sda12: start=3481421824, size=425607344, Id=83
> $ truncate --size 2000398934016 coco
> $ sfdisk coco < pepe
> <...>
> $ fdisk coco
> Welcome to fdisk (util-linux 2.23).
> 
> Changes will remain in memory only, until you decide to write them.
> Be careful before using the write command.
> 
> 
> Command (m for help): p
> 
> Disk coco: 2000.4 GB, 2000398934016 bytes, 3907029168 sectors
> Units = sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disk label type: dos
> Disk identifier: 0x00000000
> 
> Device Boot      Start         End      Blocks   Id  System
>  coco1   *        2048      133119       65536   83  Linux
>  coco2          133120    42076159    20971520   83  Linux
>  coco3        42076160    84019199    20971520   83  Linux
>  coco4        84019200  3907029167  1911504984    5  Extended
>  coco5        84021248    92409855     4194304   82  Linux swap / Solaris
>  coco6        92411904   100800511     4194304   83  Linux
>  coco7       100802560   109191167     4194304   83  Linux
>  coco8       109193216   117581823     4194304   83  Linux
>  coco9       117583872   125972479     4194304   83  Linux
>  coco10      125974528  1384265727   629145600   83  Linux
>  coco11     1384267776  3481419775  1048576000   83  Linux
>  coco12     3481421824  3907029167   212803672   83  Linux
> 
> Command (m for help): d
> Partition number (1-12, default 12): 9
> Partition 9 is deleted
> 
> Command (m for help): d
> Partition number (1-11, default 11): 8
> Partition 8 is deleted
> 
> Command (m for help): d
> Partition number (1-10, default 10): 7
> Partition 7 is deleted
> 
> Command (m for help): d
> Partition number (1-9, default 9): 6
> Partition 6 is deleted
> 
> Command (m for help): p
> 
> <...>
> 
> Device Boot      Start         End      Blocks   Id  System
>  coco1   *        2048      133119       65536   83  Linux
>  coco2          133120    42076159    20971520   83  Linux
>  coco3        42076160    84019199    20971520   83  Linux
>  coco4        84019200  3907029167  1911504984    5  Extended
>  coco5        84021248    92409855     4194304   82  Linux swap / Solaris
>  coco6       125974528  1384265727   629145600   83  Linux
>  coco7      1384267776  3481419775  1048576000   83  Linux
>  coco8      3481421824  3907029167   212803672   83  Linux
> 
> Command (m for help): n
> All primary partitions are in use
> Adding logical partition 9
> First sector (92411904-3907029167, default 92411904):
> Using default value 92411904
> Last sector, +sectors or +size{K,M,G} (92411904-125972479, default
> 125972479):
> Using default value 125972479
> Partition 9 of type Linux and of size 16 GiB is set
> 
> Command (m for help): p
> 
> <...>
> 
> Device Boot      Start         End      Blocks   Id  System
>  coco1   *        2048      133119       65536   83  Linux
>  coco2          133120    42076159    20971520   83  Linux
>  coco3        42076160    84019199    20971520   83  Linux
>  coco4        84019200  3907029167  1911504984    5  Extended
>  coco5        84021248    92409855     4194304   82  Linux swap / Solaris
>  coco6       125974528  1384265727   629145600   83  Linux
>  coco7      1384267776  3481419775  1048576000   83  Linux
>  coco8      3481421824  3907029167   212803672   83  Linux
>  coco9        92411904   125972479    16780288   83  Linux
> 
> Partition table entries are not in disk order
> 
> Command (m for help): x
> 
> Expert command (m for help): f
> Done.
> 
> Expert command (m for help): r
> 
> Command (m for help): p
> 
> <...>
> 
> Device Boot      Start         End      Blocks   Id  System
>  coco1   *        2048      133119       65536   83  Linux
>  coco2          133120    42076159    20971520   83  Linux
>  coco3        42076160    84019199    20971520   83  Linux
>  coco4        84019200  3907029167  1911504984    5  Extended
>  coco5        84021248    92409855     4194304   82  Linux swap / Solaris
>  coco6       125974528  1384265727   629145600   83  Linux
>  coco7      1384267776  3481419775  1048576000   83  Linux
>  coco8      3481421824  3907029167   212803672   83  Linux
>  coco9      4387379200  4420939775    16780288   83  Linux
> 
> Command (m for help): v
> Logical partition 9 not entirely in partition 4
> Remaining 12282 unallocated 512-byte sectors
> 
> 
> 
> 


-- 
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1

Attachment: signature.asc
Description: OpenPGP digital signature


[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