partman-auto creates faulty partition table on netboot with preseed

Bug #574232 reported by joschi
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
debian-installer (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: debian-installer

I'm trying to set up an unattended installation of Ubuntu 10.04 with the netboot kernel (http://archive.ubuntu.com/ubuntu/dists/lucid/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/). When using a custom partition scheme, the Debian installer or more precisely partman-auto always produces a faulty partition table.

Besides several custom partition schemes I've tried out the partition scheme described in the example preseed file (https://help.ubuntu.com/9.10/installation-guide/example-preseed.txt):

d-i partman-auto/expert_recipe string \
      boot-root :: \
              40 50 100 ext3 \
                      $primary{ } $bootable{ } \
                      method{ format } format{ } \
                      use_filesystem{ } filesystem{ ext3 } \
                      mountpoint{ /boot } \
              . \
              500 10000 1000000000 ext3 \
                      method{ format } format{ } \
                      use_filesystem{ } filesystem{ ext3 } \
                      mountpoint{ / } \
              . \
              64 512 300% linux-swap \
                      method{ swap } format{ } \
              .

Unfortunately it also produces an incorrect partition table on the disk. The installation process itself is working and the installed system eventually boots and is working, as far as I can tell. But fdisk and cfdisk are still complaining:

# fdisk -l /dev/sda

Disk /dev/sda: 17.2 GB, 17179869184 bytes
255 heads, 63 sectors/track, 2088 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a1cdd

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 5 37888 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 5 2089 16736257 5 Extended
/dev/sda5 5 2013 16121856 83 Linux
/dev/sda6 2013 2089 613376 82 Linux swap / Solaris

cfdisk even refuses to start at all:

# cfdisk /dev/sda

FATAL ERROR: Bad primary partition 1: Partition ends in the final partial cylinder

parted on the other hand does not complain about the cylinder boundary of /dev/sda1:

# parted /dev/sda p
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 17.2GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
 1 1049kB 39.8MB 38.8MB primary ext4 boot
 2 40.9MB 17.2GB 17.1GB extended
 5 40.9MB 16.5GB 16.5GB logical ext4
 6 16.6GB 17.2GB 628MB logical linux-swap(v1)

This problem only occurs during a netboot installation with the kernel and initrd of Ubuntu 10.04. When using the one provided for Ubuntu 9.10 (http://archive.ubuntu.com/ubuntu/dists/karmic/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/) everything works as expected and a correct partition table is generated during the installation.

Revision history for this message
joschi (jochen+launchpad-schalanda) wrote :
Revision history for this message
joschi (jochen+launchpad-schalanda) wrote :

/var/log/syslog of one of the installer runs.

Revision history for this message
joschi (jochen+launchpad-schalanda) wrote :

Probably related to Bug #561573 and Bug #551965

Appending partman/alignment=cylinder as kernel boot parameter solved the problem for me.

Revision history for this message
Luis Mondesi (lemsx1) wrote :

It took me some time to realize that this was the solution for my RAID preseed problem as well:

Bug #591909

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.