Ubuntu

Unable to kickstart with LVM partition scheme.

Reported by ody on 2009-11-05
44
This bug affects 8 people
Affects Status Importance Assigned to Milestone
kickseed (Ubuntu)
Undecided
Unassigned

Bug Description

Attempting to prepare Karmic for deployment into our environment and running into a road block. With jaunty's introduction of LVM we migrated our partitioning scheme to be fully LVM based except for /boot. This has worked very well for us. Using the same partitioning scheme in Karmic fails. Informing me that I have not declared a separate partition for /boot then halts with the 'No physical volume defined in volume group' error about the automatic partitioning scheme and sends me back to the partition scheme selection menu. Of which I never saw in jaunty. At this point the only thing that works is the selection of 'Use entire disk' and this sets things up as normal partitions. Selection of either LVM options gives me the same error as I initially get when kickstart first attempts the partitioning. Leading me to believe that kickseed is in fact not even reading my custom partitioning scheme. I can't even select Manual at the selection screen. This does nothing and just drops me back at the selection screen. Syslog logs no obvious errors.

# Partition clearing information
clearpart --drives vda --initlabel
# Disk partitioning information
part /boot --fstype=ext4 --size=600 --ondisk=vda
part pv.01 --size=1 --grow --ondisk=vda
volgroup vg00 pv.01
logvol / --name=rootvol --vgname=vg00 --size=20480 --fstype=ext4
logvol swap --name=swapvol --vgname=vg00 --size=4096
logvol /var --name=varvol --vgname=vg00 --size=6144 --fstype=ext4
logvol /tmp --name=tmpvol --vgname=vg00 --size=3072 --fstype=ext4
logvol /disk/trump --name=trumpvol --vgname=vg00 --size=1 --grow --fstype=ext4

Description: Ubuntu 9.10
Release: 9.10

ody (ody-cat) wrote :
ody (ody-cat) wrote :

Previous attachment was in error.

ody (ody-cat) wrote :
Kyle Rankin (greenfly-greenfly) wrote :

For what it's worth, this issue seems to affect regular kickseeding as well. A kickseed partition configuration that worked fine in Jaunty seems to be ignored in Karmic. I even tried the latest system-config-kickstart to see if the syntax changed but it still seemed to ignore any part lines (it seemed to see the clearpart though).

I even tried to switch to preseeding partition settings but like the original poster, it seems that anything that actually defines a custom partitioning scheme is ignored and the only thing that works is preseeding it to use the full disk and automatically partitioning it with a single / and swap.

Jorge O. Castro (jorge) on 2009-11-06
Changed in kickseed (Ubuntu):
status: New → Confirmed
tags: added: regression-release
Jacques-Olivier Farcy (jakatak) wrote :

Hi,

I am also preparing a kickseed file for Karmic deployment.

I have the same problem, the lines :

clearpart --all --initlabel
part swap --size 512 --ondisk sda
part / --fstype ext4 --size 8192 --ondisk sda
part /home --fstype ext4 --size 1 --grow --ondisk sda

Are not working, i have to do a manual partitioning

Good luck !

ody (ody-cat) wrote :

This is still affecting Lucid as of the builds available on Feb 24. Is there an alternate way to feed kickseed/partman your custom partitioning information that is documented or is this not going to be available by release? I am unable to upgrade my 100 Ubuntu systems beyond Jaunty and I am starting to look at a different Linux distribution for my users.

ody (ody-cat) wrote :

I did further testing today. If you go the route of preseeding partman you can get a little closer to the behavior that was working in Jaunty. I have dropped this into a preseed.cfg file

# Selecting proper disk
d-i partman-auto/disk string /dev/vda
# Removing LVM partitions
d-i partman-lvm/device_remove_lvm boolean true
# Picking LVM
d-i partman-auto/method string lvm
# Creating layout
d-i partman-auto/expert_recipe string boot-root :: 512 1024 768 ext4 $primary{ } $bootable{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /boot } . 15360 18432 20480 ext4 $lvmok{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ / } . 5120 5632 6144 ext4 $lvmok{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /var } . 1024 512 4096 linux-swap $lvmok{ } method{ swap } format{ } . 1024 2048 3072 ext4 $lvmok{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /tmp } . 300 400 -1 ext4 $lvmok{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /disk/trump } .
# Confirm LVM selection
d-i partman-lvm/confirm boolean true
# Finish up
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true

If I reference this preseed.cfg on the kernel boot line with preseed/url=http://$myurl things work as intended. If I move this to my kickstart file and change the 'd-i' to preseed then everything is honored except the 'partman-auto/expert_recipe string' line, this is being ignored. Instead partman chooses the pre-defined scheme atomic and continues on its marry way. If I replace my expert recipe with 'partman-auto/choose_recipe select multi' this is honored and it uses this scheme properly.

While declaring the preseed.cfg at boot is a work around it breaks our deployment strategy and removes a piece of automation we have in place. Please look at this before release.

ody (ody-cat) wrote :

I have hacked in a solution to this for my implementation using preseeding. My kickstart file now contains the following.

# Selecting proper disk
preseed partman-auto/disk string /dev/vda
# Removing LVM partitions
preseed partman-lvm/device_remove_lvm boolean true
# Picking LVM
preseed partman-auto/method string lvm
# Confirm LVM selection
preseed partman-lvm/confirm boolean true
# Finish up
preseed partman/confirm_write_new_label boolean true
preseed partman/choose_partition select finish
preseed partman/confirm boolean true

# To get my custom layout I have to circumvent kickseed so I have added.

%pre
echo 'd-i partman-auto/expert_recipe string boot-root :: 512 1024 768 ext4 $primary{ } $bootable{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /boot } . 15360 18432 20480 ext4 $lvmok{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ / } . 5120 5632 6144 ext4 $lvmok{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /var } . 1024 2048 4096 linux-swap $lvmok{ } method{ swap } format{ } . 1024 2048 3072 ext4 $lvmok{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /tmp } . 300 400 -1 ext4 $lvmok{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /disk/trump } .' >> /var/spool/kickseed/parse/preseed.cfg

ody (ody-cat) wrote :

Noticed that my previous work around can be modified to work a little more properly. The reason that the partman-auto/expert_recipe portion of my preseed block was not working was a parse error on the behalf of kickseed. Instead of echoing the preseed information into the preseed.cfg file you can use the normal kickstart preseed syntax, if you enclose the recipe in single quotes. This is normally outside the normal preseed syntax for the debian installer. So the %pre section an be replaced with:

preseed partman-auto/expert_recipe 'string boot-root :: 512 1024 768 ext4 $primary{ } $bootable{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /boot } . 15360 18432 20480 ext4 $lvmok{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ / } . 5120 5632 6144 ext4 $lvmok{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /var } . 1024 2048 4096 linux-swap $lvmok{ } method{ swap } format{ } . 1024 2048 3072 ext4 $lvmok{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /tmp } . 300 400 -1 ext4 $lvmok{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /disk/trump } .'

ddouthitt (ddouthitt) wrote :

A year and a quarter, this bug still exists - and in Ubuntu Server 10.04 LTS. This far on and the bug still isn't assigned, and its importance is "Undecided"?

Let's move on this!

Even now I can't create custom partitions using Kickstart file. It seems to overwrite those changes. Will this bug be solved or not????????? Its March 2012 now, 2+ years for bug to be in open state!!!

Mick Pollard (aussielunix) wrote :

I was able to get this working in Lucid amd64 with some preseed magic embedded into the kickstart file.
This is a snippet from my test kickstart file.

clearpart --all --initlabel
part /boot --fstype ext4 --size 200 --asprimary
part swap --size 1024
part pv.01 --size 1 --grow
volgroup rootvg pv.01
logvol / --fstype ext4 --vgname=rootvg --size=1 --grow --name=rootvol
# needed to answer the 'do you want to write changes to disk"
preseed partman-lvm/confirm_nooverwrite boolean true

# needed to answer the question about not having a separate /boot
preseed partman-auto-lvm/no_boot boolean true

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

Other bug subscribers