Ubuntu Kickstart/Kickseed does not work with dual boot hosts

Bug #420903 reported by James A. Peltier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
base-installer (Ubuntu)
Confirmed
Undecided
Unassigned
kickseed (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

When trying to use kickseed to partition a dual boot host the partitioning menu where you can select Guided - use free space, etc is displayed and no matter of preseed d-i partman options work.

Below is the kickstart file I am using

#System language
lang en_US

#Language modules to install
langsupport en_US

#System keyboard
keyboard us

#System mouse
mouse

#System timezone
timezone America/Vancouver

# Root password
rootpw --iscrypted <redacted>

#Initial user
user nsgadmin --fullname "NSG Administrator" --iscrypted --password <redacted>

#Reboot after installation
reboot

#Use text mode install
text

#Install OS instead of upgrade
install

#Use Web installation
url --url http://us.archive.ubuntu.com/ubuntu

# System bootloader
bootloader --md5pass <our crypted password> --location=mbr

#Clear the Master Boot Record
zerombr no

#Partition clearing information
clearpart --linux

# explicitly define partition table
part swap --recommended
part /boot --fstype ext3 --size 100
part / --fstype xfs --size 1 --grow

# System authorization infomation. Default to /etc/passwd
# we will join AD at next boot
auth --useshadow --enablemd5

#Network information
network --bootproto=dhcp --device=eth0

#Firewall configuration
firewall --disabled

#X Window System configuration information
#xconfig --depth=32 --resolution=1280x1024 --defaultdesktop=GNOME --startxonboot

#Package install information
%packages --resolvedeps
#@ base
@ core
#@ ubuntu-standard
#@ ubuntu-desktop

%pre
preseed --owner d-i apt-setup/security_host string security.ubuntu.com
preseed --owner netcfg netcfg/dhcp_timeout string 60

# perform unattended package upgrades
preseed d-i pkgsel/update-policy select unattended-upgrades

# attempt a retry if the apt-cacher mirror fails for some reason
preseed d-i apt-setup/mirror/error select Retry

%post

# enable useful repositories
preseed --owner d-i apt-setup/universe boolean true
preseed --owner d-i apt-setup/multiverse boolean true
preseed --owner d-i apt-setup/non-free boolean true

# Auto-accept licenses for Java and VMware
preseed --owner sun-java6-jdk shared/accepted-sun-dlj-v1-1 boolean true
preseed --owner sun-java6-jre shared/accepted-sun-dlj-v1-1 boolean true
preseed --owner vmware-player shared/accepted-vmware-player-v1-0-2 boolean true

(
lsb_release -d >> /etc/SystemInfo
echo "Description : Ubuntu 9.04" >> /etc/SystemInfo
echo "Hostname : `hostname`" >> /etc/SystemInfo
echo "Installation Method : kickstart" >> /etc/SystemInfo
echo "Kicstart File : 9.04-sfuad" >> /etc/SystemInfo
echo "Install Date : `date +%b-%d-%Y-%H:%m:%S`" >> /etc/SystemInfo

export DEBIAN_FRONTEND=noninteractive
echo "Performing a full upgrade... This may take some time"
aptitude -y update
aptitude -y full-upgrade

# Since some packages rely on third party repositories to install
# do these package installations after repositories are there
packages="
a52dec \
acct \
acroread \
acroread-fonts \
adblock-plus \
alien \
alpine \
autofs \
fail2ban
flashplugin-nonfree \
#libpam-mount \
likewise-open5 \
openssh-blacklist \
openssh-blacklist-extra \
openssh-client \
openssh-server \
smbfs \

sun-java6-jre \
winbind"

for pkg in $packages; do
  echo ""
  echo "Performing $pkg package installation"
  aptitude -y install $pkg
done

# Set the Java to use
update-java-alternatives --set java-6-sun

#Fail2Ban

wget http://<redacted>/fail2ban/sshd.conf -O - > /etc/fail2ban/filter.d/sshd.conf
wget http://<redacted>/fail2ban/jail.conf -O - > /etc/fail2ban/jail.conf

wget http://<redacted>/login-block -O - > /root/etc-pam.d-login
wget http://<redacted>/ubuntu.jaunty/access.conf -O - > /root/etc-security-access.conf
wget http://<redacted>/files/bash.bashrc -O - > /etc/bash.bashrc

cp /etc/likewise-open5/lsassd.conf /etc/likewise-open5/lsassd.conf.orig
wget http://<redacted>/files/lsassd.conf -O /etc/likewise-open5/lsassd.conf

) > /root/post-config.log

I have tried to add

# If the system has free space you can choose to only partition that space.
d-i partman-auto/init_automatically_partition select biggest_free

but it did not work with or without preseed prepended to the line. Then I tried...

# The presently available methods are: "regular", "lvm" and "crypto"
d-i partman-auto/method string regular

but it did not work with or without preseed prepended to the line. Then I tried...

# You can choose one of the three predefined partitioning recipes:
# - atomic: all files in one partition
# - home: separate /home partition
# - multi: separate /home, /usr, /var, and /tmp partitions
d-i partman-auto/choose_recipe select home

but it did not work with or without preseed prepended to the line. When that didn't work I thought that this must be a bug and so here I am. I was sure to add these lines when testing any of the configurations but the menu keeps coming up.

# This makes partman automatically partition without confirmation, provided
# that you told it what to do using one of the methods above.
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true

I also tried to disable the kickstart partitioning options to no avail. Am I doing something wrong? Is this a real bug? If I'm doing something wrong what should the kickstart/kickseed file look like? Also, if there is no partition on the disk kickstart will partition the system as a linux only host. This doesn't not happen with kickseed either.

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

Well, your syntax is wrong in a few places - you can't say 'preseed d-i foo/bar type value', you must say either 'preseed --owner d-i foo/bar type value' or (only if the owner is "d-i") just 'preseed foo/bar type value'. Also, you can't put 'preseed' lines in %pre or %post - they must be in the main block of directives at the top. I doubt that any of this is the direct cause of your problem, though.

Could you please do the following: Try a test installation, wait until it gets to the offending dialog, and then press Alt-F2 and run 'anna-install openssh-client-udeb' at the shell. This will install scp in the installer environment so that you can copy out logs. Extract /var/log/syslog and /var/log/partman, and attach them both to this bug.

Changed in kickseed (Ubuntu):
status: New → Incomplete
Revision history for this message
James A. Peltier (jpeltier) wrote :

Prior to doing so, what preseed --owner d-i partman options should I try? It's best if I use the test scenario that you provide.

I have made the changes suggested and now all preseed options are at the top of the kickstart file *and* are preseed --owner set

Revision history for this message
James A. Peltier (jpeltier) wrote :

preseed --owner d-i apt-setup/security_host string apt-cacher.fas.sfu.ca:3142/security.ubuntu.com
preseed --owner netcfg netcfg/dhcp_timeout string 60

# perform unattended package upgrades
preseed --owner d-i pkgsel/update-policy select unattended-upgrades

# attempt a retry if the apt-cacher mirror fails for some reason
preseed --owner d-i apt-setup/mirror/error select Retry

# attempt a retry dowloading packages if the apt-cacher mirror fails for some reason
preseed --owner d-i retriever/net/error select Retry

# Auto-accept licenses for Java and VMware
preseed --owner sun-java6-bin shared/accepted-sun-dlj-v1-1 boolean true

# enable useful repositories
preseed --owner d-i apt-setup/universe boolean true
preseed --owner d-i apt-setup/multiverse boolean true
preseed --owner d-i apt-setup/non-free boolean true

## postfix preseeding
# General type of configuration? Default:Internet Site
# Choices: No configuration, Internet Site, Internet with smarthost,
# Satellite system, Local only
preseed --owner postfix postfix/main_mailer_type select Local only
# Where should mail for root go, Default:if not set, will spool locally
preseed --owner postfix postfix/root_address string <email address hidden>
# SMTP relay host? (blank for none) Default:(none)
preseed --owner postfix postfix/relayhost string smtp.somewhere.com
# Force synchronous updates on mail queue? Default:false
#preseed --owner postfix postfix/chattr boolean true
# Local networks? Default:"127.0.0.0/8"
# blank uses the postfix default (which is based on the connected subnets)
#preseed --owner postfix postfix/mynetworks string
# Use procmail for local delivery? Defaults to true if /usr/bin/procmail exists
#preseed --owner postfix postfix/procmail boolean false
# Mailbox size limit Default:0 (unlimited)
#preseed --owner postfix postfix/mailbox_limit string 51200000
# Local address extension character? Default:+
#preseed --owner postfix postfix/recipient_delim string -
# Internet protocols to use? Default is based on checking if
# /proc/sys/net/ipv{4,6} exist
# Choices: all, ipv6, ipv4
preseed --owner postfix postfix/protocols select ipv4

# If the system has free space you can choose to only partition that space.
d-i --owner partman partman-auto/init_automatically_partition select biggest_free

# The presently available methods are: "regular", "lvm" and "crypto"
d-i --owner partman partman-auto/method string regular

# You can choose one of the three predefined partitioning recipes:
# - atomic: all files in one partition
# - home: separate /home partition
# - multi: separate /home, /usr, /var, and /tmp partitions
d-i --owner partman partman-auto/choose_recipe select home

# This makes partman automatically partition without confirmation, provided
# that you told it what to do using one of the methods above.
d-i --owner partman partman/confirm_write_new_label boolean true
d-i --owner partman partman/choose_partition select finish
d-i --owner partman partman/confirm boolean true

Should this work?

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

"preseed --owner d-i", not "d-i --owner partman" ...

However, please start without any attempts to modify partman's behaviour using the 'preseed' command at all. I'd like to see the behaviour with a clean slate, just Kickstart's native behaviour with the 'clearpart' and 'part' commands you have. Partitioning in Kickstart is not intended to require the use of the 'preseed' command for reasonably straightforward cases.

Revision history for this message
Teknoenie (james-a-peltier) wrote :

I just tried a very stock kickstart configuration: See below and the dual boot partitioning with Ubuntu 10.10 still does not work. This is very easy for you all to reproduce. Install Windows using only, say 50% of a disk, then try this kickstart file and watch it fail.

lang en_US.UTF-8
keyboard us

timezone America/Vancouver

#Root password
rootpw --iscrypted <MYPASSWORD>

#Reboot after installation
reboot

#Use text mode install
text

#Install OS instead of upgrade
install

#Use CD-ROM installation media
cdrom

# System bootloader --md5pass $1$CgIXv$laSfgcbmFW62.Y7PWbtBB0 configuration
bootloader --md5pass <MYPASSWORD> --location=mbr

# Clear the Master Boot Record
zerombr yes

# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
clearpart --linux
part /boot --fstype ext3 --size=1024
part / --fstype xfs --size=1 --grow
part swap --fstype swap --recommended

#Network Information
network --bootproto dhcp --noipv6

%packages
@ubuntu-desktop

%pre

%post

Revision history for this message
Teknoenie (james-a-peltier) wrote :

Please note that this is a deal breaker for me. I work at a university where there is significant hardware layout differences. Red Hat products work just fine, but my users want Ubuntu for one reason or another and I am unable to provide this for them given the broken ability to deal with dual boot.

Revision history for this message
Lance Couture (lance-sfu) wrote :

This is a show-stopper for us too. Pretty hard to believe RH/CentOS can work with this while Ubuntu cannot.

Many of our research labs need dual boot systems and want to use Ubuntu. It's kind of a joke that I have to actually walk around with a CD and a USB key with a script to get an Ubuntu dual boot system running where a CentOS machine is zero-touch.

Revision history for this message
Teknoenie (james-a-peltier) wrote :

The only way I have found to work around this issue so far is to comment out any partitioning information in the kickstart file and manually partition each machine by selecting the use available disk space manually. While this does work it is *not* a suitable "fix" for this issue. These *must* be zero-touch

Revision history for this message
Teknoenie (james-a-peltier) wrote :

Hello!?!? Is anyone looking into this bug report?!?!? Hello!?!? Is this thing on!?!

Revision history for this message
Teknoenie (james-a-peltier) wrote :

I'm going to assume that still after more than a year of this incident being open, that Ubuntu does not care about the use of its enterprise users who might need to have dual boot machines.

I have provided your technical staff with the details they have asked for, including a simple kickstart file that should allow *them* to reproduce the error and correct.

This *exact* same kickstart file, except for package selection name works fine on a RHEL5 system, only slight modification of adding %end to the packages/pre/post sections works on the latest Fedora 14 installations.

Come on! Is this going to be fixed or not? If not, please provide me with a preseed or kickstart file that *does not* require specific configurations of hard disk partitioning information. I work for a university, in research specifically, and I rarely if ever know about the partitioning layout of each and every machine. Additionally, I need not specify explicit configurations with RHEL/Fedora/Suse and they work completely hands off.

Steps to reproduce.

Install Windows using any portion of any hard disk
Boot providing the kickstart options to point to the file
Watch fail

Revision history for this message
Teknoenie (james-a-peltier) wrote :

Is anyone going to look into this?

Revision history for this message
Wl-dustin (wl-dustin) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in base-installer (Ubuntu):
status: New → Confirmed
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.