[Parted-maintainers] Bug#349718: parted: last partition in EFI GPT
overlaps alternate table
Kalle Olavi Niemitalo
kon at iki.fi
Sun Jan 29 22:02:40 GMT 2006
Here is a recipe for reproducing the bug.
kalle at Astalo:/var/tmp/kalle$ yes | dd bs=1k count=1k of=part
1024+0 records in
1024+0 records out
1048576 bytes (1,0 MB) copied, 0,094344 seconds, 11,1 MB/s
kalle at Astalo:/var/tmp/kalle$ /sbin/parted part
GNU Parted 1.6.25.1
Copyright (C) 1998 - 2005 Free Software Foundation, Inc.
This program is free software, covered by the GNU General Public License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Using /var/tmp/kalle/part
(parted) mklabel gpt
(parted) quit
kalle at Astalo:/var/tmp/kalle$ hd part
00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000001c0 01 00 ee fe ff ff 01 00 00 00 ff 07 00 00 00 00 |................|
000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 aa |..............U.|
00000200 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...|
00000210 80 b4 dc 55 00 00 00 00 01 00 00 00 00 00 00 00 |...U............|
00000220 ff 07 00 00 00 00 00 00 22 00 00 00 00 00 00 00 |........".......|
00000230 de 07 00 00 00 00 00 00 5e 93 93 d8 11 48 8f 44 |........^....H.D|
00000240 87 60 aa 06 dd f4 3b b9 02 00 00 00 00 00 00 00 |.`....;.........|
00000250 80 00 00 00 80 00 00 00 86 d2 54 ab 00 00 00 00 |..........T.....|
00000260 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00004400 79 0a 79 0a 79 0a 79 0a 79 0a 79 0a 79 0a 79 0a |y.y.y.y.y.y.y.y.|
*
000fbc00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
000ffc00 79 0a 79 0a 79 0a 79 0a 79 0a 79 0a 79 0a 79 0a |y.y.y.y.y.y.y.y.|
*
000ffe00 45 46 49 20 50 41 52 54 00 00 01 00 5c 00 00 00 |EFI PART....\...|
000ffe10 cd a1 c9 83 00 00 00 00 ff 07 00 00 00 00 00 00 |................|
000ffe20 01 00 00 00 00 00 00 00 22 00 00 00 00 00 00 00 |........".......|
000ffe30 de 07 00 00 00 00 00 00 5e 93 93 d8 11 48 8f 44 |........^....H.D|
000ffe40 87 60 aa 06 dd f4 3b b9 de 07 00 00 00 00 00 00 |.`....;.........|
000ffe50 80 00 00 00 80 00 00 00 86 d2 54 ab 00 00 00 00 |..........T.....|
000ffe60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00100000
kalle at Astalo:/var/tmp/kalle$
The last_usable_lba value stored at 0x230 (LBA 0x1, offset 0x30)
and 0xffe30 (LBA 0x7ff, offset 0x30) is 0x7de. However, the
alternate partition_entry_lba value stored at 0xffe48 (LBA 0x7ff,
offset 0x48) is also 0x7de. The "usable" area thus overlaps the
alternative partition table.
This dump also shows that parted did not initialize the block
0xffc00..0xffdff (LBA 0x7fe) between the alternative partition
table (LBA 0x7de-0x7fd) and the alternative GPT header (LBA 0x7ff).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/parted-maintainers/attachments/20060130/0624a8b4/attachment.pgp
More information about the Parted-maintainers
mailing list