create_primary_partitions sometimes attempts to create last partition larger than free space

Bug #287571 reported by Mathias Gug
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
partman-auto (Debian)
Fix Released
Unknown
partman-auto (Ubuntu)
Fix Released
High
Colin Watson

Bug Description

Binary package hint: partman-auto

Preseeding an expert_recipe fails on amd64 with the message "Can't have a partition outside the disk!".

The vm guest has two block devices of 2Gb each.

The partition part of the preseed file is the following:

# The method should be set to "raid".
d-i partman-auto/method string raid
# Specify the disks to be partitioned. They will all get the same layout,
# so this will only work if the disks are the same size.
d-i partman-auto/disk string /dev/sda /dev/sdb

# Next you need to specify the physical partitions that will be used.
d-i partman-auto/expert_recipe string multiraid :: 400 500 100000000
0 raid $primary{ } method{ raid } . 64 256 200% raid $primary{ } method{ r
aid } .

# Last you need to specify how the previously defined partitions will be
# used in the RAID setup. Remember to use the correct partition numbers
# for logical partitions.
# Parameters are:
# <raidtype> <devcount> <sparecount> <fstype> <mountpoint> # <devices> <sparedevices>
# RAID levels 0, 1 and 5 are supported; devices are separated using "#"
d-i partman-auto-raid/recipe string 1 2 0 ext3 / /dev/sda1#/dev/sdb1 . 1 2 0 swap - /dev/sda2#/dev/sdb2 .

# This makes partman automatically partition without confirmation.
d-i partman-md/confirm boolean true
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true

mdadm mdadm/boot_degraded boolean true

The exact same pressed used with the i386 installer works.

Tags: iso-testing
Revision history for this message
Mathias Gug (mathiaz) wrote :

I've attached the log of partman.

Revision history for this message
Mathias Gug (mathiaz) wrote :

And here is the syslog of the installation until the installer stopped.

Colin Watson (cjwatson)
Changed in partman-auto:
status: New → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

Workaround: remove $primary{ } from those two partitions. That'll switch you onto a different code path which doesn't have the same bug.

summary: - expert_recipe fails with "Can't have partition outside the disk" message
- on amd64 while working on i386
+ create_primary_partitions sometimes attempts to create last partition
+ larger than free space
Revision history for this message
Colin Watson (cjwatson) wrote :

We'll need to fix this, as it will bite the default partitioning recipes once we switch to using swap files.

Changed in partman-auto (Ubuntu):
assignee: nobody → Colin Watson (cjwatson)
importance: Undecided → High
status: Confirmed → In Progress
Changed in partman-auto (Debian):
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package partman-auto - 87ubuntu1

---------------
partman-auto (87ubuntu1) karmic; urgency=low

  * Resynchronise with Debian. Remaining changes:
    - Adjust default partition sizes for Ubuntu.
    - Accept autopartitioning automatically rather than showing
      choose_partition.
    - Drop priority of partman-auto/choose_recipe question to medium.
    - Offer resize_use_free autopartitioning method.
    - Add support for partman-auto/method=loop via partman-auto-loop.
    - Drop the bootable flag from i386/amd64 recipes; it can break existing
      Windows installations when autopartitioning only free space rather
      than a whole disk.
    - Remove explicit $primary{ } specifiers from standard recipes. We only
      need them to be primary if no other primary partitions exist already.
    - Make biggest_free respect the selection made in partman-auto/disk.
    - Exclude devices containing the installation medium from automatic
      partitioning.

partman-auto (87) unstable; urgency=low

  * Add support for writing sizes as a number plus a percentage of RAM, e.g.
    "2000+50%". This is useful when doing automatic partitioning with the
    expectation of creating swap files.
  * If we're creating primary partitions and find that we've reached the end
    of the recipe, use "full" rather than "beginning" as the place passed to
    NEW_PARTITION, thereby avoiding rounding problems and matching the
    process for creating logical partitions (closes: #516347, LP: #287571).

  [ Updated translations ]
  * Hindi (hi.po)

 -- Colin Watson <email address hidden> Tue, 14 Jul 2009 23:08:15 +0100

Changed in partman-auto (Ubuntu):
status: In Progress → Fix Released
tags: added: iso-testing
Changed in partman-auto (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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