From: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
To: util-linux <util-linux@vger.kernel.org>, Karel Zak <kzak@redhat.com>
Subject: Re: fdisk: reorder (cmd) bug with logical partitions.
Date: Mon, 01 Jul 2013 11:49:06 -0300 [thread overview]
Message-ID: <51D196E2.8000605@yahoo.com.ar> (raw)
In-Reply-To: <519BEF55.1090309@yahoo.com.ar>
[-- Attachment #1: Type: text/plain, Size: 5897 bytes --]
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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 555 bytes --]
prev parent reply other threads:[~2013-07-01 14:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-21 22:04 fdisk: reorder (cmd) bug with logical partitions Gerardo Exequiel Pozzi
2013-07-01 14:49 ` Gerardo Exequiel Pozzi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51D196E2.8000605@yahoo.com.ar \
--to=vmlinuz386@yahoo.com.ar \
--cc=kzak@redhat.com \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.