Automatic partitioning corrupts GUID partition table (GPT)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
parted (Ubuntu) |
Fix Released
|
Critical
|
Colin Watson | ||
Oneiric |
Fix Released
|
Critical
|
Colin Watson |
Bug Description
With a functioning Oneiric installation on a MacBookPro6,2 I installed Oneiric again and chose the automatic partition resize option. This corrupted the partition table, preventing booting of either operating system. It also doesn't appear possible to repair the system, as no tools can read the partition table to mount / fix the situation.
TEST CASE
Install Oneiric on a GPT machine (e.g. a Mac) with an empty partition table. Start by creating a swap partition of the size of the RAM. Then create an ext4 (the default) partition for the remaining space, but leave ~1MB for the GPT / bios_grub partition. The installer (partman-efi?) will place the GPT / bios_grub partition in this free space. This system boots correctly.
Now install a second instance of Oneiric and select automatic resize of existing partitions, leaving the default settings (50% of space allocated to each system)
That resulted in this partition table (from sfdisk -l) :
Disk /dev/sda: 38913 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sda1 0+ 497- 498- 4000000+ 82 Linux swap / Solaris
start: (c,h,s) expected (0,0,35) found (1023,254,63)
end: (c,h,s) expected (497,249,43) found (1023,254,63)
/dev/sda2 * 497+ 20035- 19538- 156933594 83 Linux
start: (c,h,s) expected (497,249,44) found (1023,254,63)
/dev/sda3 20035+ 20035- 1- 977 ee GPT
/dev/sda4 20035+ 38408- 18374- 147583008 83 Linux
palimsest reports that the disk is unpartitioned.
gparted reports erros on the two ext4 partitions:
e2label: No such file or directory while trying to open /dev/sda2
Couldn't find valid filesystem superblock.
Couldn't find valid filesystem superblock.
dumpe2fs 1.41.14 (22-Dec-2010)
dumpe2fs: No such file or directory while trying to open /dev/sda2
gparted reports for the bios_grub partition:
Unable to detect file system! Possible reasons are:
- The file system is damaged
- The file system is unknown to GParted
- There is no filesystem available (unformatted)
- The device entry /dev/sda3 is missing
The problem is not the result of having two systems installed. If you install a system with the partitioning option to use the entire disk and then install another system that automatically resizes existing partitions, then both systems boot correctly.
I don't think there was too little space left from my manual partitioning of the initial system, because the initial operating system booted fine.
Maybe the problem is having the GPT / bios_grub partition at the end of the partition table, since the default is to place it at the beginning of the partition table (when installing with the partitioning option to use the entire disk).
Unfortunately, I can no longer access the logs, as I cannot mount the partitions.
This is the ISO ubuntu-
ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: ubiquity 2.7.17
ProcVersionSign
Uname: Linux 3.0.0-9-generic x86_64
Architecture: amd64
CasperVersion: 1.279
Date: Tue Aug 30 20:11:08 2011
LiveMediaBuild: Ubuntu 11.10 "Oneiric Ocelot" - Alpha amd64+mac (20110829)
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: ubiquity
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
Changed in ubiquity (Ubuntu): | |
importance: | Undecided → High |
Changed in ubiquity (Ubuntu): | |
importance: | High → Critical |
assignee: | nobody → Ubuntu Installer Team (ubuntu-installer) |
Changed in ubiquity (Ubuntu): | |
milestone: | none → ubuntu-11.10-beta-1 |
Changed in parted (Ubuntu Oneiric): | |
status: | New → Fix Committed |
I'm working on constructing my own test case. I rather suspect this is a parted bug, though; it reminds me of bug 757201.