public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Ruediger Meier <sweet_f_a@gmx.de>
To: util-linux@vger.kernel.org
Subject: Re: fdisk partition reorder fails
Date: Wed, 2 Apr 2014 23:54:05 +0200	[thread overview]
Message-ID: <201404022354.05958.sweet_f_a@gmx.de> (raw)
In-Reply-To: <533C4911.4020406@yahoo.com.ar>

On Wednesday 02 April 2014, Gerardo Exequiel Pozzi wrote:
> Looks like similar to this[#1] that I reported some time ago.
>
> [#1] http://www.spinics.net/lists/util-linux-ng/msg08005.html

I've translated Gerardo's example into a reproducable command lines. Do 
this only on filesystems which support sparse files. Here I've skipped 
any output for readability:

## create a partition table with a "hole" between partition 5 and 6
$ rm -f testdisk
$ truncate -s 2199023255552  testdisk
$ sfdisk testdisk  <<EOF
unit: sectors
testdisk1 : start=     2048, size=   131072, Id=83
testdisk2 : start=   133120, size= 41943040, Id=83
testdisk3 : start= 42076160, size= 41943040, Id=83
testdisk4 : start= 84019200, size=3823009968, Id= 5
testdisk5 : start= 84021248, size=  8388608, Id=83
testdisk6 : start=125974528, size=1258291200, Id=83
testdisk7 : start=1384267776, size=2097152000, Id=83
testdisk8 : start=3481421824, size=425607344, Id=83
EOF
[... output skipped ...]


## add another partition and print before and after sorting (don't
## write, so this line can be used repeatedly)
$ echo -e "n\n\n\np\nx\nf\nr\np\n" | fdisk testdisk
[... output skipped ...]


## See that fdisk is not even able to write the partitions correctly
## after adding the 9th partition without sorting. Maybe this is part
## of the bug
$ echo -e "n\n\n\np\nw\n" | fdisk testdisk
$ fdisk -l testdisk

cu,
Rudi

  reply	other threads:[~2014-04-02 21:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-02 16:49 fdisk partition reorder fails Olaf Hering
2014-04-02 17:00 ` Olaf Hering
2014-04-02 17:29 ` Gerardo Exequiel Pozzi
2014-04-02 21:54   ` Ruediger Meier [this message]
2014-04-18  9:53 ` Karel Zak

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=201404022354.05958.sweet_f_a@gmx.de \
    --to=sweet_f_a@gmx.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox