I'm trying to create a custom ISO of ubuntu 18.04 using the official ubuntu-18.04.1-live-server-amd64.iso as a base image with my own set of preseed files to later create a vagrant box with packer.
I keep getting an error where the /root filesystem is missing (see attached screenshot at the end) and he solutions I've found around on forums use fsck (which is also missing) by loading it from a LiveCD to workaround this problem; but their fix doesn't apply to me as I'm trying to pack a working image.
I tried using the seeder files that come within ubuntu-18.04.1-live-server-amd64.iso but had no luck with that and then I used the following sites as reference to build up my seeder.cfg file:
- https://help.ubuntu.com/lts/installation-guide/amd64/apbs04.html#preseed-l10n
- https://help.ubuntu.com/lts/installation-guide/example-preseed.txt
- https://d-i.debian.org/manual/example-preseed.txt
Here is my preseed file:
d-i debian-installer/locale string en_US.UTF-8
d-i keyboard-configuration/xkb-keymap select us
d-i passwd/root-password-crypted password __PASSWORD__
d-i passwd/user-fullname string vagrant
d-i passwd/username string vagrant
d-i passwd/user-password-crypted password __PASSWORD__
d-i user-setup/allow-password-weak boolean true
d-i time/zone string US/Central
d-i clock-setup/ntp boolean true
d-i partman-auto/method string regular
d-i partman-auto/choose_recipe select atomic
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true
d-i pkgsel/include string curl openssh-server sudo git vim
d-i pkgsel/language-packs multiselect
d-i grub-installer/only_debian boolean true
d-i finish-install/reboot_in_progress note
d-i preseed/late_command string \
echo 'Defaults:vagrant !requiretty' > /target/etc/sudoers.d/vagrant; \
echo 'vagrant ALL=(ALL) NOPASSWD: ALL' >> /target/etc/sudoers.d/vagrant; \
chmod 440 /target/etc/sudoers.d/vagrant; \
ln -sf /dev/null /target/etc/systemd/network/99-default.link; \
in-target update-initramfs -u
And the file is used like this from /isolinux/adtxt.cfg
:
label bionic
menu label ^Custom Install
kernel /casper/vmlinuz
append initrd=/casper/initrd net.ifnames=0 auto-install/enable=true debconf/priority=critical file=/cdrom/preseed/ubuntu-18.04/preseed.cfg ---
Any help or guidance will be highly appreciated.
No comments:
Post a Comment