mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-04 23:31:31 +00:00
Imported 2.648
No reason for CPC update specified.
This commit is contained in:
parent
3203b6f49e
commit
21073315b6
9
debian/changelog
vendored
9
debian/changelog
vendored
@ -1,3 +1,12 @@
|
|||||||
|
livecd-rootfs (2.648) focal; urgency=medium
|
||||||
|
|
||||||
|
* Enable cloud-init in live server installer live session on all
|
||||||
|
architectures.
|
||||||
|
* Remove code for old design for getting autoinstall.yaml.
|
||||||
|
* Add runcmd to extract autoinstall.yaml from user-data.
|
||||||
|
|
||||||
|
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Wed, 04 Mar 2020 16:10:35 +0100
|
||||||
|
|
||||||
livecd-rootfs (2.647) focal; urgency=medium
|
livecd-rootfs (2.647) focal; urgency=medium
|
||||||
|
|
||||||
* Address snap base regression after snap-tool removal
|
* Address snap base regression after snap-tool removal
|
||||||
|
@ -50,20 +50,13 @@ 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:
|
||||||
chroot $INSTALLER_ROOT apt-get -y install lupin-casper
|
# 1. linux-firmware for kernel to upload into hardware.
|
||||||
# Install linux-firmware for kernel to upload into hardware.
|
# 2. casper for live session magic.
|
||||||
chroot $INSTALLER_ROOT apt-get -y install linux-firmware
|
# 3. openssh-server to enable the "ssh into live session" feature
|
||||||
|
chroot $INSTALLER_ROOT apt-get -y install linux-firmware lupin-casper openssh-server
|
||||||
|
|
||||||
# Make sure NoCloud is last
|
# Make sure NoCloud is last
|
||||||
values=$(echo get cloud-init/datasources | chroot $INSTALLER_ROOT debconf-communicate | sed 's/^0 //;s/NoCloud, //;s/None/NoCloud, None/')
|
values=$(echo get cloud-init/datasources | chroot $INSTALLER_ROOT debconf-communicate | sed 's/^0 //;s/NoCloud, //;s/None/NoCloud, None/')
|
||||||
@ -73,11 +66,7 @@ printf "%s\t%s\t%s\t%s\n" \
|
|||||||
chroot $INSTALLER_ROOT dpkg-reconfigure --frontend=noninteractive cloud-init
|
chroot $INSTALLER_ROOT dpkg-reconfigure --frontend=noninteractive cloud-init
|
||||||
|
|
||||||
if [ `dpkg --print-architecture` = s390x ]; then
|
if [ `dpkg --print-architecture` = s390x ]; then
|
||||||
chroot $INSTALLER_ROOT apt-get -y install s390-tools-zkey openssh-server
|
chroot $INSTALLER_ROOT apt-get -y install s390-tools-zkey
|
||||||
rm $INSTALLER_ROOT/etc/netplan/00-installer-config.yaml
|
|
||||||
else
|
|
||||||
# Don't let cloud-init run in the live session.
|
|
||||||
touch $INSTALLER_ROOT/etc/cloud/cloud-init.disabled
|
|
||||||
fi
|
fi
|
||||||
chroot $INSTALLER_ROOT apt-get clean
|
chroot $INSTALLER_ROOT apt-get clean
|
||||||
|
|
||||||
@ -91,18 +80,6 @@ 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"
|
||||||
|
@ -65,6 +65,7 @@ cloud_config_modules:
|
|||||||
# The modules that run in the 'final' stage
|
# The modules that run in the 'final' stage
|
||||||
cloud_final_modules:
|
cloud_final_modules:
|
||||||
- scripts-per-once
|
- scripts-per-once
|
||||||
|
- scripts-user
|
||||||
- ssh-authkey-fingerprints
|
- ssh-authkey-fingerprints
|
||||||
- keys-to-console
|
- keys-to-console
|
||||||
- phone-home
|
- phone-home
|
||||||
@ -116,3 +117,15 @@ system_info:
|
|||||||
primary: http://ports.ubuntu.com/ubuntu-ports
|
primary: http://ports.ubuntu.com/ubuntu-ports
|
||||||
security: http://ports.ubuntu.com/ubuntu-ports
|
security: http://ports.ubuntu.com/ubuntu-ports
|
||||||
ssh_svcname: ssh
|
ssh_svcname: ssh
|
||||||
|
|
||||||
|
runcmd:
|
||||||
|
- - "python3"
|
||||||
|
- "-c"
|
||||||
|
- |
|
||||||
|
import subprocess, sys, yaml
|
||||||
|
user_data = yaml.safe_load(subprocess.run([
|
||||||
|
"cloud-init", "query", "userdata"],
|
||||||
|
check=True, stdout=subprocess.PIPE, encoding='utf-8').stdout)
|
||||||
|
if 'autoinstall' in user_data:
|
||||||
|
with open("/autoinstall.yaml", "w") as fp:
|
||||||
|
yaml.dump(user_data['autoinstall'], fp)
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
# This is the initial network config.
|
|
||||||
# It can be overwritten by cloud-init or subiquity.
|
|
||||||
network:
|
|
||||||
version: 2
|
|
||||||
ethernets:
|
|
||||||
all-en:
|
|
||||||
match:
|
|
||||||
name: "en*"
|
|
||||||
dhcp4: true
|
|
||||||
all-eth:
|
|
||||||
match:
|
|
||||||
name: "eth*"
|
|
||||||
dhcp4: true
|
|
@ -1,4 +0,0 @@
|
|||||||
[Mount]
|
|
||||||
What=/dev/disk/by-label/autoinstall
|
|
||||||
Where=/autoinstall
|
|
||||||
Type=ext4
|
|
Loading…
x
Reference in New Issue
Block a user