|
|
@ -42,14 +42,22 @@ setup_mountpoint binary/boot/squashfs.dir
|
|
|
|
# to a new VT when there is no device there (LP: #1750117).
|
|
|
|
# to a new VT when there is no device there (LP: #1750117).
|
|
|
|
# It would be better to have this in ../includes.binary/overlay but
|
|
|
|
# It would be better to have this in ../includes.binary/overlay but
|
|
|
|
# you can't have backslashes in filenames in bzr branches!
|
|
|
|
# you can't have backslashes in filenames in bzr branches!
|
|
|
|
DEVICE_UNIT_NAME='dev-disk-by\x2duuid-00c629d6\x2d06ab\x2d4dfd\x2db21e\x2dc3186f34105d.device'
|
|
|
|
ANSWERS_DEVICE_UNIT='dev-disk-by\x2duuid-00c629d6\x2d06ab\x2d4dfd\x2db21e\x2dc3186f34105d.device'
|
|
|
|
mkdir -p "$INSTALLER_ROOT/etc/systemd/system/$DEVICE_UNIT_NAME.d"
|
|
|
|
mkdir -p "$INSTALLER_ROOT/etc/systemd/system/$ANSWERS_DEVICE_UNIT.d"
|
|
|
|
cat > "$INSTALLER_ROOT/etc/systemd/system/$DEVICE_UNIT_NAME.d/override.conf" <<EOF
|
|
|
|
cat > "$INSTALLER_ROOT/etc/systemd/system/$ANSWERS_DEVICE_UNIT.d/override.conf" <<EOF
|
|
|
|
[Unit]
|
|
|
|
[Unit]
|
|
|
|
JobRunningTimeoutSec=0s
|
|
|
|
JobRunningTimeoutSec=0s
|
|
|
|
Wants=subiquity_config.mount
|
|
|
|
Wants=subiquity_config.mount
|
|
|
|
EOF
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AUTOINSTALL_DEVICE_UNIT='dev-disk-by\x2dlabel-autoinstall.device'
|
|
|
|
|
|
|
|
mkdir -p "$INSTALLER_ROOT/etc/systemd/system/$AUTOINSTALL_DEVICE_UNIT.d"
|
|
|
|
|
|
|
|
cat > "$INSTALLER_ROOT/etc/systemd/system/$AUTOINSTALL_DEVICE_UNIT.d/override.conf" <<EOF
|
|
|
|
|
|
|
|
[Unit]
|
|
|
|
|
|
|
|
JobRunningTimeoutSec=0s
|
|
|
|
|
|
|
|
Wants=subiquity_autoinstall.mount
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
|
|
|
|
# Prepare installer layer.
|
|
|
|
# Prepare installer layer.
|
|
|
|
|
|
|
|
|
|
|
|
# Install casper for live session magic.
|
|
|
|
# Install casper for live session magic.
|
|
|
@ -74,6 +82,18 @@ snap_preseed $INSTALLER_ROOT subiquity/classic
|
|
|
|
# Drop lxd from the installer layer preseed
|
|
|
|
# Drop lxd from the installer layer preseed
|
|
|
|
sed -i -e'N;/name: lxd/,+2d' $INSTALLER_ROOT/var/lib/snapd/seed/seed.yaml
|
|
|
|
sed -i -e'N;/name: lxd/,+2d' $INSTALLER_ROOT/var/lib/snapd/seed/seed.yaml
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Add initramfs hook to copy /autoinstall.yaml from initrd
|
|
|
|
|
|
|
|
# /run/initrd-autoinstall.yaml
|
|
|
|
|
|
|
|
cat <<EOF > "$INSTALLER_ROOT"/etc/initramfs-tools/scripts/init-bottom/copy-autoinstall
|
|
|
|
|
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
case \$1 in
|
|
|
|
|
|
|
|
prereqs) exit 0;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[ -f /autoinstall.yaml ] && cp /autoinstall.yaml /run/initrd-autoinstall.yaml
|
|
|
|
|
|
|
|
EOF
|
|
|
|
|
|
|
|
chmod +x "$INSTALLER_ROOT"/etc/initramfs-tools/scripts/init-bottom/copy-autoinstall
|
|
|
|
|
|
|
|
|
|
|
|
teardown_mountpoint "$INSTALLER_ROOT"
|
|
|
|
teardown_mountpoint "$INSTALLER_ROOT"
|
|
|
|
|
|
|
|
|
|
|
|
squashfs_f="${PWD}/livecd.${PROJECT}.installer.squashfs"
|
|
|
|
squashfs_f="${PWD}/livecd.${PROJECT}.installer.squashfs"
|
|
|
|