Activity log for bug #232175

Date Who What changed Old value New value Message
2008-05-20 11:52:01 David Balažic bug added bug
2008-05-27 23:57:11 Colin Watson parted: status New Incomplete
2008-05-27 23:57:11 Colin Watson parted: assignee kamion
2008-05-27 23:57:11 Colin Watson parted: importance Undecided High
2008-05-28 09:05:44 Colin Watson parted: status Incomplete Confirmed
2008-05-28 10:07:37 Colin Watson parted: status Confirmed Triaged
2008-05-28 11:16:08 Colin Watson bug assigned to parted
2008-05-28 11:19:47 Colin Watson parted: status Triaged In Progress
2008-05-28 11:22:28 Bug Watch Updater parted: status Unknown New
2008-05-29 17:15:06 Launchpad Janitor parted: status In Progress Fix Released
2008-05-30 12:07:53 Colin Watson description Binary package hint: parted I have two partitions on /dev/sdc, but parted (and also gparted) claims there is one, covering the whole device. fdisk and sfdisk get it correctly. Also the kernel reads it correctly (as I can mount both). ubuntu$ dpkg-query -l parted ||/ Name Version Description +++-======================-======================-============================================================ ii parted 1.7.1-5.1ubuntu9 The GNU Parted disk partition resizing program ubuntu$ dpkg-query -l util-linux ||/ Name Version Description +++-======================-======================-============================================================ ii util-linux 2.13.1-5ubuntu1 Miscellaneous system utilities $ fdisk -l /dev/sdc Disk /dev/sdc: 1027 MB, 1027416576 bytes 64 heads, 32 sectors/track, 979 cylinders Units = cylinders of 2048 * 512 = 1048576 bytes Disk identifier: 0x00000000 Device Boot Start End Blocks Id System /dev/sdc1 * 1 716 733168 6 FAT16 /dev/sdc2 717 979 269312 6 FAT16 $ parted /dev/sdc GNU Parted 1.7.1 Using /dev/sdc Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) print Disk /dev/sdc: 1027MB Sector size (logical/physical): 512B/512B Partition Table: loop Number Start End Size File system Flags 1 0.00kB 1027MB 1027MB fat32 This was on a fresh install from Ubuntu 8.04 i386 Desktop CD. When a FAT file system is written to a whole disk device, it appears rather like a DOS partition table in some ways. libparted therefore needs to detect this situation and explicitly bail out of treating it as a DOS partition table. However, its detection is a bit broken at the moment and has some false positives. Specifically, if the disk previously had a FAT file system covering its entire extent, but then had a partition table written to it, it can happen that the FAT signature is left around and confuses libparted. Both the Linux kernel and fdisk use a more reliable method, namely checking the boot indicator byte of all four partitions in the primary partition table to ensure that each one is either 0 or 0x80. libparted should be in sync with these. I sent a patch upstream (http://lists.alioth.debian.org/pipermail/parted-devel/2008-May/002243.html and thread) which has been accepted, and I uploaded this to intrepid as parted 1.7.1-5.1ubuntu10. Attached is the diff between 1.7.1-5.1ubuntu9 in hardy and the proposed 1.7.1-5.1ubuntu9.1.
2008-05-30 12:07:53 Colin Watson title parted gets partitions wrong Partition tables sometimes misdetected as single large FAT file system
2008-05-30 12:08:33 Colin Watson parted: status New Triaged
2008-05-30 12:08:33 Colin Watson parted: assignee kamion
2008-05-30 12:08:33 Colin Watson parted: importance Undecided High
2008-05-30 12:08:33 Colin Watson parted: milestone ubuntu-8.04.1
2008-05-30 12:08:53 Colin Watson bug added attachment 'parted_1.7.1-5.1ubuntu9.1.debdiff' (hardy-proposed patch)
2008-05-30 12:31:29 Colin Watson bug added attachment '232175' (user's boot sector)
2008-05-30 12:35:37 Colin Watson description When a FAT file system is written to a whole disk device, it appears rather like a DOS partition table in some ways. libparted therefore needs to detect this situation and explicitly bail out of treating it as a DOS partition table. However, its detection is a bit broken at the moment and has some false positives. Specifically, if the disk previously had a FAT file system covering its entire extent, but then had a partition table written to it, it can happen that the FAT signature is left around and confuses libparted. Both the Linux kernel and fdisk use a more reliable method, namely checking the boot indicator byte of all four partitions in the primary partition table to ensure that each one is either 0 or 0x80. libparted should be in sync with these. I sent a patch upstream (http://lists.alioth.debian.org/pipermail/parted-devel/2008-May/002243.html and thread) which has been accepted, and I uploaded this to intrepid as parted 1.7.1-5.1ubuntu10. Attached is the diff between 1.7.1-5.1ubuntu9 in hardy and the proposed 1.7.1-5.1ubuntu9.1. When a FAT file system is written to a whole disk device, it appears rather like a DOS partition table in some ways. libparted therefore needs to detect this situation and explicitly bail out of treating it as a DOS partition table. However, its detection is a bit broken at the moment and has some false positives. Specifically, if the disk previously had a FAT file system covering its entire extent, but then had a partition table written to it, it can happen that the FAT signature is left around and confuses libparted. Both the Linux kernel and fdisk use a more reliable method, namely checking the boot indicator byte of all four partitions in the primary partition table to ensure that each one is either 0 or 0x80. libparted should be in sync with these. I sent a patch upstream (http://lists.alioth.debian.org/pipermail/parted-devel/2008-May/002243.html and thread) which has been accepted, and I uploaded this to intrepid as parted 1.7.1-5.1ubuntu10. Attached is the diff between 1.7.1-5.1ubuntu9 in hardy and the proposed 1.7.1-5.1ubuntu9.1. TEST CASE: This is a bit tricky to set up. The most obvious way is probably to replicate the reporter's partition table on a loopback device. To do this, download http://launchpadlibrarian.net/14818962/232175, then: dd if=/dev/zero of=parted-test bs=1024 count=$((1100*1024)) dd if=232175 of=parted-test bs=512 count=1 conv=notrunc parted -s parted-test print With the old libparted1.7-1, this erroneously prints: Disk /home/cjwatson/parted-test: 1153MB Sector size (logical/physical): 512B/512B Partition Table: loop Number Start End Size File system Flags 1 0.00kB 1153MB 1153MB fat32 The new one correctly prints: Disk /home/cjwatson/parted-test: 1153MB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 16.4kB 751MB 751MB primary boot 2 751MB 1027MB 276MB primary Please also check that parted still understands your own partition table correctly: 'sudo parted -s /dev/sda print', replacing /dev/sda with each of whichever disk devices you have. Regression potential: We'll have to watch out for new partitioner bugs of the form "partitions on this disk not recognised at all". However, given that we're now in sync with the Linux kernel, I suspect that it's more likely that any regressions would be FAT file systems erroneously detected as partition tables (i.e. the other way round). It might be worth trying this out with USB sticks.
2008-05-30 13:57:09 Martin Pitt parted: status Triaged Fix Committed
2008-05-30 13:57:09 Martin Pitt parted: milestone ubuntu-8.04.1
2008-05-30 17:29:16 Steve Langasek parted: milestone ubuntu-8.04.1
2008-06-10 03:17:54 Steve Langasek parted: status Fix Committed Fix Released
2009-12-02 01:57:23 Launchpad Janitor branch linked lp:ubuntu/parted
2009-12-02 02:04:16 Launchpad Janitor branch linked lp:ubuntu/hardy-proposed/parted
2015-02-27 14:18:37 dino99 parted: importance Unknown Undecided
2015-02-27 14:18:37 dino99 parted: remote watch Parted tracker #14
2015-02-27 14:18:58 dino99 parted: status New Invalid