mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-07-31 10:34:03 +00:00
Install packages and perform dist-upgrade necessary for secure xenial
bootable-buildd image
This commit is contained in:
parent
2d9243e499
commit
7981a08c2c
@ -64,7 +64,8 @@ install_grub() {
|
|||||||
efi_boot_dir="/boot/efi/EFI/BOOT"
|
efi_boot_dir="/boot/efi/EFI/BOOT"
|
||||||
chroot mountpoint mkdir -p "${efi_boot_dir}"
|
chroot mountpoint mkdir -p "${efi_boot_dir}"
|
||||||
|
|
||||||
if [ "${SUBPROJECT:-}" = minimized ] && [ -n "$partuuid" ]; then
|
#if [ "${SUBPROJECT:-}" = minimized ] && [ -n "$partuuid" ]; then
|
||||||
|
if [ -n "$partuuid" ]; then
|
||||||
echo "GRUB_FORCE_PARTUUID=$partuuid" >> mountpoint/etc/default/grub.d/40-force-partuuid.cfg
|
echo "GRUB_FORCE_PARTUUID=$partuuid" >> mountpoint/etc/default/grub.d/40-force-partuuid.cfg
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -36,12 +36,24 @@ cleanup_linux_virtual() {
|
|||||||
}
|
}
|
||||||
trap cleanup_linux_virtual EXIT
|
trap cleanup_linux_virtual EXIT
|
||||||
|
|
||||||
# Install dependencies
|
|
||||||
env DEBIAN_FRONTEND=noninteractive chroot "$mount_d" apt-get \
|
env DEBIAN_FRONTEND=noninteractive chroot "$mount_d" apt-get \
|
||||||
update --assume-yes
|
update --assume-yes
|
||||||
|
|
||||||
|
# Perform a dist-upgrade to pull in -security and other pockets
|
||||||
env DEBIAN_FRONTEND=noninteractive chroot "$mount_d" apt-get \
|
env DEBIAN_FRONTEND=noninteractive chroot "$mount_d" apt-get \
|
||||||
install -y lsb-release locales initramfs-tools busybox-initramfs \
|
dist-upgrade --assume-yes
|
||||||
udev dbus netplan.io cloud-init openssh-server sudo snapd
|
|
||||||
|
# Install dependencies
|
||||||
|
env DEBIAN_FRONTEND=noninteractive chroot "$mount_d" apt-get \
|
||||||
|
install -y --install-recommends bind9 busybox-initramfs cloud-init dbus \
|
||||||
|
ifupdown initramfs-tools locales lsb-release \
|
||||||
|
openssh-server resolvconf sudo snapd udev
|
||||||
|
|
||||||
|
# Enable console output
|
||||||
|
cat >> $mount_d/etc/default/grub.d/50-buildd-settings.cfg << EOF
|
||||||
|
${IMAGE_STR}
|
||||||
|
GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0"
|
||||||
|
EOF
|
||||||
|
|
||||||
# Install a kernel
|
# Install a kernel
|
||||||
divert_grub "$mount_d"
|
divert_grub "$mount_d"
|
||||||
@ -49,6 +61,7 @@ env DEBIAN_FRONTEND=noninteractive chroot "$mount_d" apt-get \
|
|||||||
install --assume-yes linux-image-virtual
|
install --assume-yes linux-image-virtual
|
||||||
env DEBIAN_FRONTEND=noninteractive chroot "$mount_d" apt-get \
|
env DEBIAN_FRONTEND=noninteractive chroot "$mount_d" apt-get \
|
||||||
autoremove --purge --assume-yes
|
autoremove --purge --assume-yes
|
||||||
|
|
||||||
chroot "$mount_d" update-grub
|
chroot "$mount_d" update-grub
|
||||||
undivert_grub "$mount_d"
|
undivert_grub "$mount_d"
|
||||||
|
|
||||||
|
12
live-build/buildd/includes.chroot/etc/network/interfaces
Normal file
12
live-build/buildd/includes.chroot/etc/network/interfaces
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# This file describes the network interfaces available on your system
|
||||||
|
# and how to activate them. For more information, see interfaces(5).
|
||||||
|
|
||||||
|
# The loopback network interface
|
||||||
|
auto lo
|
||||||
|
iface lo inet loopback
|
||||||
|
|
||||||
|
# Source interfaces
|
||||||
|
# Please check /etc/network/interfaces.d before changing this file
|
||||||
|
# as interfaces may have been defined in /etc/network/interfaces.d
|
||||||
|
# See LP: #1262951
|
||||||
|
source /etc/network/interfaces.d/*.cfg
|
Loading…
x
Reference in New Issue
Block a user