Preseeding Ubuntu Natty 11.04
I decided to start this blog because of the never ending battles I have with remembering what I have conquered before, and thinking that other people have the same problems.
The specific problem I was working on when I came to this conclusion was preseeding a Natty netboot install. EVERY version of Ubuntu brings more preseeding problems - something always changes, causing you to get prompted for something new, when the previous release worked without a hitch.
This time (going from Lucid to Natty) was the keyboard layout preseed. I got the dreaded keyboard layout screen.
The specific problem I was working on when I came to this conclusion was preseeding a Natty netboot install. EVERY version of Ubuntu brings more preseeding problems - something always changes, causing you to get prompted for something new, when the previous release worked without a hitch.
This time (going from Lucid to Natty) was the keyboard layout preseed. I got the dreaded keyboard layout screen.
Turns out the preseed file is only looked at once the locale is set (makes sense), so you have to pass the keyboard config in the kernel line of your PXE boot:
LABEL stuff_natty64kernel linux.natty64append vga=normal initrd=initrd.gz.natty64 locale=en_AU preseed/locale=en_AU keyboard-configuration/layoutcode=us console-setup/ask_detect=false netcfg/wireless_wep= netcfg/choose_interface=auto netcfg/get_hostname= netcfg/get_domain= preseed/url=http://myserver/preseed/ubuntu_natty/preseed.cfg http_proxy= my_image_type=stuff --
The key component this time is:
keyboard-configuration/layoutcode=us
I worked this out by checking the update log for console-setup (which is what you used to have to pass for Lucid):
console-setup (1.57ubuntu8) natty; urgency=low
* Move keyboard detection templates from console-setup.templates to
keyboard-configuration.templates.
-- Colin Watson Mon, 28 Feb 2011 19:21:18 +0000
And there you have it - instead of being "console-setup/layoutcode=us", it is now "keyboard-configuration/layoutcode=us"
Makes sense now - but that is an hour of my life I can't get back!
S
Thanks Sean, I was just trying to sort this out!
ReplyDeleteI can't seem to get Natty to respect the MBR auto-installation directives:
ReplyDeleted-i grub-installer/only_debian boolean true
d-i grub-installer/with_other_os boolean true
Basically, I want to nuke the MBR and install Natty's grub there, no matter what.
However, no combination of these settings
(TT/TF/FT/FF) gets me past the prompt for where to install grub.
Manually entering /dev/sda works fine, but that's unacceptable.
Any pointers would be most appreciated.
Thanks for this, I thought I was the only one going crazy.
ReplyDeleteThanks for the tip about the keyboard layout!
ReplyDeleteBut my other problem is installing the GRUB into the MBR... What is the solution to preset it?
Olivier - the line that seems to do it for me (and has done since Hardy) is
ReplyDeleted-i grub-installer/only_debian boolean true
I can't get the partitioning to preseed no matter what I try. Can you post the partition section of your preseed?
ReplyDeletestiqs - here you go:
ReplyDeleted-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regular
d-i partman-auto/expert_recipe string physics-workstation :: 200 20000 250 ext4 $primary{ } $bootable{ } method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /boot } . 25000 20000 29000 ext4 method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /usr/local } . 3000 20000 6000 ext4 method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /tmp } . 18000 18000 21000 ext4 method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ / } . 1000 20000 300% linux-swap method{ swap } format{ } . 1000 10000 1000000000 ext4 method{ format } format{ } use_filesystem{ } filesystem{ ext4 } mountpoint{ /scratch } .
d-i partman/confirm_write_new_label boolean true
d-i partman/choose_partition select Finish partitioning and write changes to disk
d-i partman/confirm boolean true
d-i partman-partitioning/confirm_copy boolean true
d-i partman/confirm_new_label boolean true
hi, where is the update log?
ReplyDelete