'part --onpart' not supported and results in inscrutable error

Bug #109475 reported by Bellarmine Open Source Society
2
Affects Status Importance Assigned to Milestone
kickseed (Ubuntu)
Confirmed
Medium
Unassigned
partman-auto (Ubuntu)
Confirmed
Wishlist
Unassigned

Bug Description

Steps to reproduce:
1. Before booting using the Ubuntu Feisty (7.04) Alternate Installation CD, hit F6 and add ks=http://yourwebserver.tld/path/to/your.cfg (see below)
2. Wait until the CD sets up the partitioner
3. At the partitioning menu, select "Manual"

your.cfg (I have only tested this using a web server that has successfully hosted many other system-config-kickstart generated files):
#Generated by Kickstart Configurator
#platform=x86

#System language
lang en_US
#Language modules to install
langsupport en_US
#System keyboard
keyboard us
#System mouse
mouse
#System timezone
timezone America/Los_Angeles
#Root password
rootpw --disabled
#Initial user
user [Changed for obvious reasons] --fullname "[Changed for obvious reasons]" --iscrypted --password [Changed for obvious reasons]
#Use text mode install
text
#Install OS instead of upgrade
install
#Use CDROM installation media
cdrom
#System bootloader configuration
bootloader --location=mbr --md5pass=[Changed for obvious reasons]
#Clear the Master Boot Record
zerombr yes
#Disk partitioning information
part / --fstype ext3 --size 40960 --onpart sda2
part /boot --fstype ext2 --size 128 --onpart sda1
part swap --size 1024 --onpart sda5
part /home/DOMAIN --fstype ext3 --size 10240 --onpart sda6
#System authorization infomation
auth --useshadow --enablemd5
#Network information
network --bootproto=dhcp --device=eth0
#Firewall configuration
firewall --disabled
#Do not configure the X Window System
skipx
#Package install information
%packages
@ ubuntu-desktop

Note, the [Changed for obvious reasons] parts need not be changed. I tested with the your.cfg listed above.

Two possible solutions and why they don't work:
1. Using "Guided - resize..." - Firstly, I don't want to resize the partition because all the machines in the lab were pre-partitioned. Secondly, the only partition I am even allowed to resize is partition #2 (/dev/sda2).
2. Using "Guided - use entire disk" or "Guided - use entire disk and set up LVM" - Again, I do not want to mess with the existing partition setups because otherwise existing working Windows setups would be wiped in the process.

fdisk -l /dev/sda shows:
Disk /dev/sda: 80.0 GB, 80032038912 bytes
255 heads, 63 sectors/track, 9730 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 16 128488+ 83 Linux
/dev/sda2 17 5238 41945715 83 Linux
/dev/sda3 5239 6674 11534670 5 Extended
/dev/sda4 * 6675 9730 24545280 7 HPFS/NTFS
/dev/sda5 5239 5361 987966 82 Linux swap / Solaris
/dev/sda6 5362 6674 10546641 83 Linux

Revision history for this message
Colin Watson (cjwatson) wrote :

The short answer is that partman-auto has no facility for reusing existing partitions yet, and thus you have to use 'clearpart'. This results in the known missing feature documented in https://help.ubuntu.com/6.10/ubuntu/installation-guide/i386/automatic-install.html, which results in your problem:

  "Restrictions of a partition to a particular disk or device, and specifications of the starting or ending cylinder for a partition."

Now. It is possible to work around this, if the system has been entirely pre-partitioned, all the partitions are on one disk, and you happen to know the installer very well. :-) I've attached a translation of your 'part' commands, which you can include in a %pre script. In addition, you will need to remove all your 'part' commands and add 'preseed partman/confirm boolean true'. You will also need to test this to death on a machine you don't care about. I've tested a variation in a VMware instance, but that isn't quite the same. If you need to vary the partitioning scheme in minor ways, I hope the syntax is reasonably clear; it's not entirely unlike partman recipes.

You cannot create any partitions using this workaround. Adding that would probably not be very much simpler than just adding proper support for this to partman-auto.

I hope that helps in the meantime ...

Changed in kickseed:
importance: Undecided → Medium
status: Unconfirmed → Confirmed
Changed in partman-auto:
importance: Undecided → Wishlist
status: Unconfirmed → Confirmed
Revision history for this message
Bellarmine Open Source Society (boss-bcp) wrote :

Hello Colin,

Thanks for the input. I tried merging the script as follows:
1) With %pre, but vanilla otherwise
2) With %pre, modifying partitions to partitions="/dev/sda1 /dev/sda2 /dev/sda5 /dev/sda6"
3) With %pre --nochroot, but vanilla otherwise
4) With %pre --nochroot, modifying partitions to partitions="/dev/sda1 /dev/sda2 /dev/sda5 /dev/sda6"

All of which failed for me.
Currently, it reaches the "Starting up the partitioner" stage and then continuously prints: "Please wait..." followed by "Detecting file systems..."
The progress bar starts at 0%, maxes out at 100%, and then restarts the whole process.

tail -n 200 /var/log/syslog displays the following three lines over and over:
<timestamp> partman: Reading all physical volumes. This may take a while...
<timestamp> partman: No matching physical volumes found
<timestamp> partman: No volume groups found

Do you have any suggestions on how I can stop this behavior and enforce proper partitioning without human interaction?

Revision history for this message
Bellarmine Open Source Society (boss-bcp) wrote :
Download full text (4.9 KiB)

Hello again.

I added set -x after the second #!/bin/sh. See the output below. The exit 1 concerns me. Any thoughts?

<timestamp> partman: No matching physical volumes found
<timestamp> partman: No volume groups found
<timestamp> partman: Reading all physical volumes. This may take a while...
<timestamp> main-menu[12076]: (process:16962): + .
<timestamp> main-menu[12076]: (process:16962): /lib/partman/definitions.sh
<timestamp> main-menu[12076]: (process:16962): +
<timestamp> main-menu[12076]: (process:16962): .
<timestamp> main-menu[12076]: (process:16962): /usr/share/debconf/confmodule
<timestamp> main-menu[12076]: (process:16962):
<timestamp> main-menu[12076]: (process:16962): +
<timestamp> main-menu[12076]: (process:16962): [
<timestamp> main-menu[12076]: (process:16962): !
<timestamp> main-menu[12076]: (process:16962): 1
<timestamp> main-menu[12076]: (process:16962): ]
<timestamp> main-menu[12076]: (process:16962):
<timestamp> main-menu[12076]: (process:16962): +
<timestamp> main-menu[12076]: (process:16962): [
<timestamp> main-menu[12076]: (process:16962): -z
<timestamp> main-menu[12076]: (process:16962): 1
<timestamp> main-menu[12076]: (process:16962): ]
<timestamp> main-menu[12076]: (process:16962):
<timestamp> main-menu[12076]: (process:16962): +
<timestamp> main-menu[12076]: (process:16962): DEBCONF_OLD_FD_BASE=4
<timestamp> main-menu[12076]: (process:16962):
<timestamp> main-menu[12076]: (process:16962): +
<timestamp> main-menu[12076]: (process:16962): export
<timestamp> main-menu[12076]: (process:16962): DEBCONF_OLD_FD_BASE
<timestamp> main-menu[12076]: (process:16962):
<timestamp> main-menu[12076]: (process:16962): +
<timestamp> main-menu[12076]: (process:16962): NBSP=Â
<timestamp> main-menu[12076]: (process:16962):
<timestamp> main-menu[12076]: (process:16962): +
<timestamp> main-menu[12076]: (process:16962): TAB=^I
<timestamp> main-menu[12076]: (process:16962):
<timestamp> main-menu[12076]: (process:16962): +
<timestamp> main-menu[12076]: (process:16962): NL=
<timestamp> main-menu[12076]: (process:16962):
<timestamp> main-menu[12076]: (process:16962): +
<timestamp> main-menu[12076]: (process:16962): ORIGINAL_IFS= ^I
<timestamp> main-menu[12076]: (process:16962):
<timestamp> main-menu[12076]: (process:16962): +
<timestamp> main-menu[12076]: (process:16962): export
<timestamp> main-menu[12076]: (process:16962): ORIGINAL_IFS
<timestamp> main-menu[12076]: (process:16962):
<timestamp> main-menu[12076]: (process:16962): +
<timestamp> main-menu[12076]: (process:16962): DEVICES=/var/lib/partman/devices
<timestamp> main-menu[12076]: (process:16962):
<timestamp> main-menu[12076]: (proc
<timestamp> main-menu[12076]: ess:16962): +
<timestamp> main-menu[12076]: (process:16962): log
<timestamp> main-menu[12076]: (process:16962): *******************************************************
<timestamp> main-menu[12076]: (process:16962): +
<timestamp> main-menu[12076]: (process:16962): local
<timestamp> main-menu[12076]: (process:16962): program
<timestamp> main-menu[12076]: (process:16962):
<timestamp> main-menu[12076]: (process:16962): +
<timestamp> ...

Read more...

Revision history for this message
Bellarmine Open Source Society (boss-bcp) wrote :
Download full text (93.3 KiB)

Here is a more complete version of syslog. After the ending point, it endlessly recurses with the same errors.

Apr 27 12:04:09 syslogd started: BusyBox v1.1.3
Apr 27 12:04:09 kernel: klogd started: BusyBox v1.1.3 (Debian 1:1.1.3-3ubuntu3)
Apr 27 12:04:09 kernel: [ 0.000000] Linux version 2.6.20-15-generic (root@palmer) (gcc version 4.1.2 (Ubuntu 4.1.2-0ubuntu4)) #2 SMP Sun Apr 15 07:36:31 UTC 2007 (Ubuntu 2.6.20-15.27-generic)
Apr 27 12:04:09 kernel: [ 0.000000] BIOS-provided physical RAM map:
Apr 27 12:04:09 kernel: [ 0.000000] sanitize start
Apr 27 12:04:09 kernel: [ 0.000000] sanitize end
Apr 27 12:04:09 kernel: [ 0.000000] copy_e820_map() start: 0000000000000000 size: 000000000009f800 end: 000000000009f800 type: 1
Apr 27 12:04:09 kernel: [ 0.000000] copy_e820_map() type is E820_RAM
Apr 27 12:04:09 kernel: [ 0.000000] copy_e820_map() start: 000000000009f800 size: 0000000000000800 end: 00000000000a0000 type: 2
Apr 27 12:04:09 kernel: [ 0.000000] copy_e820_map() start: 00000000000ce000 size: 0000000000002000 end: 00000000000d0000 type: 2
Apr 27 12:04:09 kernel: [ 0.000000] copy_e820_map() start: 00000000000e0000 size: 0000000000020000 end: 0000000000100000 type: 2
Apr 27 12:04:09 kernel: [ 0.000000] copy_e820_map() start: 0000000000100000 size: 000000001f5f0000 end: 000000001f6f0000 type: 1
Apr 27 12:04:09 kernel: [ 0.000000] copy_e820_map() type is E820_RAM
Apr 27 12:04:09 kernel: [ 0.000000] copy_e820_map() start: 000000001f6f0000 size: 000000000000a000 end: 000000001f6fa000 type: 3
Apr 27 12:04:09 kernel: [ 0.000000] copy_e820_map() start: 000000001f6fa000 size: 0000000000006000 end: 000000001f700000 type: 4
Apr 27 12:04:09 kernel: [ 0.000000] copy_e820_map() start: 000000001f700000 size: 0000000000900000 end: 0000000020000000 type: 2
Apr 27 12:04:09 kernel: [ 0.000000] copy_e820_map() start: 00000000fec00000 size: 0000000000010000 end: 00000000fec10000 type: 2
Apr 27 12:04:09 kernel: [ 0.000000] copy_e820_map() start: 00000000fed1c000 size: 0000000000004000 end: 00000000fed20000 type: 2
Apr 27 12:04:09 kernel: [ 0.000000] copy_e820_map() start: 00000000fee00000 size: 0000000000001000 end: 00000000fee01000 type: 2
Apr 27 12:04:09 kernel: [ 0.000000] copy_e820_map() start: 00000000ffb00000 size: 0000000000500000 end: 0000000100000000 type: 2
Apr 27 12:04:09 kernel: [ 0.000000] BIOS-e820: 0000000000000000 - 000000000009f800 (usable)
Apr 27 12:04:09 kernel: [ 0.000000] BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
Apr 27 12:04:09 kernel: [ 0.000000] BIOS-e820: 00000000000ce000 - 00000000000d0000 (reserved)
Apr 27 12:04:09 kernel: [ 0.000000] BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
Apr 27 12:04:09 kernel: [ 0.000000] BIOS-e820: 0000000000100000 - 000000001f6f0000 (usable)
Apr 27 12:04:09 kernel: [ 0.000000] BIOS-e820: 000000001f6f0000 - 000000001f6fa000 (ACPI data)
Apr 27 12:04:09 kernel: [ 0.000000] BIOS-e820: 000000001f6fa000 - 000000001f700000 (ACPI NVS)
Apr 27 12:04:09 kernel: [ 0.000000] BIOS-e820: 000000001f700000 - 0000000020000000 (reserved)
Apr 27 12:04:09 kernel: [ 0.000000] BIOS-e820: 00000000fec00000 - 00000000f...

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.