Re: fdisk partition reorder fails

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

 



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
--
To unsubscribe from this list: send the line "unsubscribe util-linux" 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