diff options
| author | Paride Legovini <[email protected]> | 2025-04-24 17:57:48 +0200 |
|---|---|---|
| committer | Paride Legovini <[email protected]> | 2025-04-24 17:58:26 +0200 |
| commit | a3350c60553e03a14c84362ab24974426848b800 (patch) | |
| tree | 67790e4e6f26d44e066d86500fe9f025d783b133 | |
| parent | 5a716b448ef73949d1899616ac6cf48a6245cd67 (diff) | |
RTMP-2481: add questing directories
51 files changed, 944 insertions, 0 deletions
diff --git a/data/questing/README.sbm b/data/questing/README.sbm new file mode 100644 index 00000000..40876703 --- /dev/null +++ b/data/questing/README.sbm @@ -0,0 +1,43 @@ +About the Smart Boot Manager image +---------------------------------- + + The file `sbm.bin' that is available in this directory may be useful + to you if you are not able to directly boot the first CD because your + BIOS may be too old and may not support ISOLINUX. + + Then, instead of booting on the CD directly, you create a Smart Boot + Manager floppy image by using the sbm.bin disk image. You can create this + floppy with rawrite (under DOS) or with dd (under Linux). Now you can + boot on this floppy disk and it will detect your CDROM and let you boot + on it bypassing any BIOS limitation. + +What is SBM ? + + Smart Boot Manager or briefly SmartBtmgr (SBM), is an OS independent + Boot Manager - a program that is loaded by the bios before any + operating system and allows you to choose which operating system to + boot. + + SBM is included in Debian in two ways, the package bmconf allows us to + install and configure an old version of SBM and sbm wich is the latest + version of SBM with an installer. + +What's the use of SBM on the CD then ? + + SBM includes an IDE driver that allows us to boot the cds even on + machines with a BIOS that wouldn't support booting from CD, provided our + CDROM is an IDE one, that is, so you can make a SBM floppy and boot from + it and then tell it to boot from your CDROM. + + Also, there are some cases where the BIOS would allow booting from the CD + but isolinux fails to boot from there, in this case you can either boot + using a CD other than the first, as the others don't use isolinux, or you + can make a SBM floppy and boot from this floppy and then tell SBM to boot + your CDROM. + +How do you make a SBM floppy ? + + If you have SBM installed on a box you can run sbminst. Otherwise you can + put the sbm.bin floppy image that we provide with our cds onto a floppy + just like you would do with a rescue image. + diff --git a/data/questing/access-new.pcx b/data/questing/access-new.pcx Binary files differnew file mode 100644 index 00000000..37e91a94 --- /dev/null +++ b/data/questing/access-new.pcx diff --git a/data/questing/access.pcx b/data/questing/access.pcx Binary files differnew file mode 100644 index 00000000..9a94d00c --- /dev/null +++ b/data/questing/access.pcx diff --git a/data/questing/blank.pcx b/data/questing/blank.pcx Binary files differnew file mode 100644 index 00000000..575b978c --- /dev/null +++ b/data/questing/blank.pcx diff --git a/data/questing/edubuntu.pcx b/data/questing/edubuntu.pcx Binary files differnew file mode 100644 index 00000000..04fed0d5 --- /dev/null +++ b/data/questing/edubuntu.pcx diff --git a/data/questing/edubuntu.png b/data/questing/edubuntu.png Binary files differnew file mode 100644 index 00000000..d6b14dff --- /dev/null +++ b/data/questing/edubuntu.png diff --git a/data/questing/kubuntu-access.pcx b/data/questing/kubuntu-access.pcx Binary files differnew file mode 100644 index 00000000..356040ba --- /dev/null +++ b/data/questing/kubuntu-access.pcx diff --git a/data/questing/kubuntu-blank.pcx b/data/questing/kubuntu-blank.pcx Binary files differnew file mode 100644 index 00000000..437b1d18 --- /dev/null +++ b/data/questing/kubuntu-blank.pcx diff --git a/data/questing/kubuntu-pool-amd64.packages b/data/questing/kubuntu-pool-amd64.packages new file mode 100644 index 00000000..6b60d979 --- /dev/null +++ b/data/questing/kubuntu-pool-amd64.packages @@ -0,0 +1,39 @@ +# This file is used to add extra packages to the pool that we didn't get +# from seeds/germinate. Currently, the list is i386 deps of nvidia drivers, +# because germinate isn't multiarch aware and can't resolve this itself. +# +# Using proposed germinate this list can be updated as follows: +# +# git clone -b foreign-arch-ma-same https://git.launchpad.net/~xnox/germinate +# cd germinate +# ./bin/germinate --arch amd64 --arch i386 -d questing,questing-updates -s kubuntu.questing +# awk '/:i386/ { print $1 }' ship-live desktop | LANG=C.UTF-8 sort -u +# +gcc-14-base:i386 +libbsd0:i386 +libc6:i386 +libcap2:i386 +libdbus-1-3:i386 +libdrm2:i386 +libffi8:i386 +libgamemode0:i386 +libgamemodeauto0:i386 +libgcc-s1:i386 +libidn2-0:i386 +libmd0:i386 +libnvidia-compute-560:i386 +libnvidia-decode-560:i386 +libnvidia-egl-wayland1:i386 +libnvidia-encode-560:i386 +libnvidia-fbc1-560:i386 +libnvidia-gl-560:i386 +libsystemd0:i386 +libunistring5:i386 +libwayland-client0:i386 +libwayland-server0:i386 +libx11-6:i386 +libxau6:i386 +libxcb1:i386 +libxdmcp6:i386 +libxext6:i386 +libzstd1:i386 diff --git a/data/questing/kubuntu.pcx b/data/questing/kubuntu.pcx Binary files differnew file mode 100644 index 00000000..638c0faa --- /dev/null +++ b/data/questing/kubuntu.pcx diff --git a/data/questing/kubuntu.png b/data/questing/kubuntu.png Binary files differnew file mode 100644 index 00000000..7f7a2cbc --- /dev/null +++ b/data/questing/kubuntu.png diff --git a/data/questing/lubuntu.pcx b/data/questing/lubuntu.pcx Binary files differnew file mode 100644 index 00000000..552f9180 --- /dev/null +++ b/data/questing/lubuntu.pcx diff --git a/data/questing/lubuntu.png b/data/questing/lubuntu.png Binary files differnew file mode 100644 index 00000000..c63fa4c0 --- /dev/null +++ b/data/questing/lubuntu.png diff --git a/data/questing/multiarch/amd64 b/data/questing/multiarch/amd64 new file mode 100644 index 00000000..5a9a476a --- /dev/null +++ b/data/questing/multiarch/amd64 @@ -0,0 +1 @@ +i386 diff --git a/data/questing/preseed/lubuntu/lubuntu.seed b/data/questing/preseed/lubuntu/lubuntu.seed new file mode 100644 index 00000000..97ca72c9 --- /dev/null +++ b/data/questing/preseed/lubuntu/lubuntu.seed @@ -0,0 +1,9 @@ +# The Lubuntu seeds assume that installation of Recommends is disabled. +d-i base-installer/install-recommends boolean true +# Enable extras.ubuntu.com. +d-i apt-setup/extras boolean true +# Install the Lubuntu desktop. +tasksel tasksel/first multiselect standard, lubuntu-desktop +d-i preseed/early_command string . /usr/share/debconf/confmodule; db_get debconf/priority; case $RET in low|medium) db_fset tasksel/first seen false; echo 'tasksel tasksel/first seen false' >>/var/lib/preseed/log ;; esac +# No LXDE translation packages yet. +d-i pkgsel/language-pack-patterns string diff --git a/data/questing/s390x/README.boot b/data/questing/s390x/README.boot new file mode 100644 index 00000000..d423d7cf --- /dev/null +++ b/data/questing/s390x/README.boot @@ -0,0 +1,18 @@ +About the S/390 installation CD +=============================== + +It is possible to "boot" the installation system off this CD using +the files provided in the /boot directory. + +Although you can boot the installer from this CD, the installation +itself is *not* actually done from the CD. Once the initrd is loaded, +the installer will ask you to configure your network connection and +uses the network-console component to allow you to continue the +installation over SSH. The rest of the installation is done over the +network: all installer components and Debian packages are retrieved +from a mirror. + +Instead of SSH, one can also use the ASCII terminal available in HMC. + +Exporting full .iso contents (including the hidden .disk directory) +allows one to use the result as a valid mirror for installation. diff --git a/data/questing/s390x/boot/ubuntu.exec b/data/questing/s390x/boot/ubuntu.exec new file mode 100644 index 00000000..ca541055 --- /dev/null +++ b/data/questing/s390x/boot/ubuntu.exec @@ -0,0 +1,11 @@ +/* REXX EXEC TO IPL Ubuntu for */ +/* z Systems FROM THE VM READER. */ +/* */ +'CP CLOSE RDR' +'PURGE RDR ALL' +'SPOOL PUNCH * RDR' +'PUNCH KERNEL UBUNTU * (NOHEADER' +'PUNCH PARMFILE UBUNTU * (NOHEADER' +'PUNCH INITRD UBUNTU * (NOHEADER' +'CHANGE RDR ALL KEEP NOHOLD' +'CP IPL 000C CLEAR' diff --git a/data/questing/s390x/boot/ubuntu.ins b/data/questing/s390x/boot/ubuntu.ins new file mode 100644 index 00000000..e3621604 --- /dev/null +++ b/data/questing/s390x/boot/ubuntu.ins @@ -0,0 +1,6 @@ +* Ubuntu for IBM Z (default kernel) +kernel.ubuntu 0x00000000 +initrd.off 0x0001040c +initrd.siz 0x00010414 +parmfile.ubuntu 0x00010480 +initrd.ubuntu 0x01000000 diff --git a/data/questing/sbm.bin.gz b/data/questing/sbm.bin.gz Binary files differnew file mode 100644 index 00000000..20e4aa4f --- /dev/null +++ b/data/questing/sbm.bin.gz diff --git a/data/questing/splash.pcx b/data/questing/splash.pcx new file mode 120000 index 00000000..e45401f5 --- /dev/null +++ b/data/questing/splash.pcx @@ -0,0 +1 @@ +ubuntu.pcx
\ No newline at end of file diff --git a/data/questing/splash.png b/data/questing/splash.png new file mode 120000 index 00000000..bcc5075a --- /dev/null +++ b/data/questing/splash.png @@ -0,0 +1 @@ +ubuntu.png
\ No newline at end of file diff --git a/data/questing/ubuntu-budgie-pool-amd64.packages b/data/questing/ubuntu-budgie-pool-amd64.packages new file mode 120000 index 00000000..6d8e14b0 --- /dev/null +++ b/data/questing/ubuntu-budgie-pool-amd64.packages @@ -0,0 +1 @@ +ubuntu-pool-amd64.packages
\ No newline at end of file diff --git a/data/questing/ubuntu-budgie.pcx b/data/questing/ubuntu-budgie.pcx Binary files differnew file mode 100644 index 00000000..5746cd78 --- /dev/null +++ b/data/questing/ubuntu-budgie.pcx diff --git a/data/questing/ubuntu-budgie.png b/data/questing/ubuntu-budgie.png Binary files differnew file mode 100644 index 00000000..f4151794 --- /dev/null +++ b/data/questing/ubuntu-budgie.png diff --git a/data/questing/ubuntu-mate-access.pcx b/data/questing/ubuntu-mate-access.pcx Binary files differnew file mode 100644 index 00000000..4bb831e4 --- /dev/null +++ b/data/questing/ubuntu-mate-access.pcx diff --git a/data/questing/ubuntu-mate-blank.pcx b/data/questing/ubuntu-mate-blank.pcx Binary files differnew file mode 100644 index 00000000..72fc0cad --- /dev/null +++ b/data/questing/ubuntu-mate-blank.pcx diff --git a/data/questing/ubuntu-mate-pool-amd64.packages b/data/questing/ubuntu-mate-pool-amd64.packages new file mode 120000 index 00000000..6d8e14b0 --- /dev/null +++ b/data/questing/ubuntu-mate-pool-amd64.packages @@ -0,0 +1 @@ +ubuntu-pool-amd64.packages
\ No newline at end of file diff --git a/data/questing/ubuntu-mate.pcx b/data/questing/ubuntu-mate.pcx Binary files differnew file mode 100644 index 00000000..8635d0f5 --- /dev/null +++ b/data/questing/ubuntu-mate.pcx diff --git a/data/questing/ubuntu-mate.png b/data/questing/ubuntu-mate.png Binary files differnew file mode 100644 index 00000000..f336dda6 --- /dev/null +++ b/data/questing/ubuntu-mate.png diff --git a/data/questing/ubuntu-pool-amd64.packages b/data/questing/ubuntu-pool-amd64.packages new file mode 100644 index 00000000..56b0b6a6 --- /dev/null +++ b/data/questing/ubuntu-pool-amd64.packages @@ -0,0 +1,22 @@ +# This file is used to add extra packages to the pool that we didn't get +# from seeds/germinate. Currently, the list is i386 deps of nvidia drivers, +# because germinate isn't multiarch aware and can't resolve this itself. +# +# Using proposed germinate this list can be updated as follows: +# +# git clone -b foreign-arch-ma-same https://git.launchpad.net/~xnox/germinate +# cd germinate +# ./bin/germinate --arch amd64 --arch i386 -d questing,questing-updates -s ubuntu.questing +# awk '/:i386/ { print $1 }' ship-live desktop-minimal | LANG=C.UTF-8 sort +# +gcc-14-base:i386 +libc6:i386 +libcap2:i386 +libdbus-1-3:i386 +libgamemode0:i386 +libgamemodeauto0:i386 +libgcc-s1:i386 +libidn2-0:i386 +libsystemd0:i386 +libunistring5:i386 +libzstd1:i386 diff --git a/data/questing/ubuntu.pcx b/data/questing/ubuntu.pcx Binary files differnew file mode 100644 index 00000000..68744a01 --- /dev/null +++ b/data/questing/ubuntu.pcx diff --git a/data/questing/ubuntu.png b/data/questing/ubuntu.png Binary files differnew file mode 100644 index 00000000..5f7effbc --- /dev/null +++ b/data/questing/ubuntu.png diff --git a/data/questing/ubuntukylin.pcx b/data/questing/ubuntukylin.pcx Binary files differnew file mode 100644 index 00000000..f6455bad --- /dev/null +++ b/data/questing/ubuntukylin.pcx diff --git a/data/questing/ubuntukylin.png b/data/questing/ubuntukylin.png Binary files differnew file mode 100644 index 00000000..11a4591d --- /dev/null +++ b/data/questing/ubuntukylin.png diff --git a/data/questing/ubuntustudio.pcx b/data/questing/ubuntustudio.pcx Binary files differnew file mode 100644 index 00000000..4a45aa25 --- /dev/null +++ b/data/questing/ubuntustudio.pcx diff --git a/data/questing/ubuntustudio.png b/data/questing/ubuntustudio.png Binary files differnew file mode 100644 index 00000000..bf4b840c --- /dev/null +++ b/data/questing/ubuntustudio.png diff --git a/data/questing/xubuntu-access.pcx b/data/questing/xubuntu-access.pcx Binary files differnew file mode 100644 index 00000000..356040ba --- /dev/null +++ b/data/questing/xubuntu-access.pcx diff --git a/data/questing/xubuntu-blank.pcx b/data/questing/xubuntu-blank.pcx Binary files differnew file mode 100644 index 00000000..437b1d18 --- /dev/null +++ b/data/questing/xubuntu-blank.pcx diff --git a/data/questing/xubuntu-minimal-access.pcx b/data/questing/xubuntu-minimal-access.pcx new file mode 120000 index 00000000..16cc9484 --- /dev/null +++ b/data/questing/xubuntu-minimal-access.pcx @@ -0,0 +1 @@ +xubuntu-access.pcx
\ No newline at end of file diff --git a/data/questing/xubuntu-minimal-blank.pcx b/data/questing/xubuntu-minimal-blank.pcx new file mode 120000 index 00000000..670b33de --- /dev/null +++ b/data/questing/xubuntu-minimal-blank.pcx @@ -0,0 +1 @@ +xubuntu-blank.pcx
\ No newline at end of file diff --git a/data/questing/xubuntu-minimal.pcx b/data/questing/xubuntu-minimal.pcx new file mode 120000 index 00000000..38edd6bc --- /dev/null +++ b/data/questing/xubuntu-minimal.pcx @@ -0,0 +1 @@ +xubuntu.pcx
\ No newline at end of file diff --git a/data/questing/xubuntu-minimal.png b/data/questing/xubuntu-minimal.png new file mode 120000 index 00000000..9e9fa772 --- /dev/null +++ b/data/questing/xubuntu-minimal.png @@ -0,0 +1 @@ +xubuntu.png
\ No newline at end of file diff --git a/data/questing/xubuntu.pcx b/data/questing/xubuntu.pcx Binary files differnew file mode 100644 index 00000000..a170f118 --- /dev/null +++ b/data/questing/xubuntu.pcx diff --git a/data/questing/xubuntu.png b/data/questing/xubuntu.png Binary files differnew file mode 100644 index 00000000..f97bbb9b --- /dev/null +++ b/data/questing/xubuntu.png diff --git a/tools/boot/questing/boot-amd64 b/tools/boot/questing/boot-amd64 new file mode 100755 index 00000000..754d9da3 --- /dev/null +++ b/tools/boot/questing/boot-amd64 @@ -0,0 +1,217 @@ +#!/bin/bash +# +# Do install stuff for amd64, including making bootable CDs +# Works with debian-installer +# +# $1 is the CD number +# $2 is the temporary CD build dir + +. $BASEDIR/tools/boot/$DIST/common.sh + +set -e + +N=$1 +CDDIR=$2 +cd $CDDIR/.. + +> $N.mkisofs_opts + +# rename kernel+initrd +mv $CDDIR/casper/filesystem.kernel-generic $CDDIR/casper/vmlinuz +mv $CDDIR/casper/filesystem.initrd-generic $CDDIR/casper/initrd +HWE= +if [ -e $CDDIR/casper/filesystem.kernel-generic-hwe ]; then + HWE="true" + mv $CDDIR/casper/filesystem.kernel-generic-hwe $CDDIR/casper/hwe-vmlinuz + mv $CDDIR/casper/filesystem.initrd-generic-hwe $CDDIR/casper/hwe-initrd +fi + +# download and extract bootloader packages +download_and_extract_package shim-signed shim +download_and_extract_package grub-common grub +download_and_extract_package grub-pc-bin grub +download_and_extract_package grub-efi-amd64-bin grub +download_and_extract_package grub-efi-amd64-signed grub + +# add common files for GRUB to tree +copy_grub_common_files_to_boot_tree grub cd-boot-tree + +# add BIOS GRUB to tree +mkdir -p cd-boot-tree/boot/grub/i386-pc +cp -r grub/usr/lib/grub/i386-pc/eltorito.img cd-boot-tree/boot/grub/i386-pc +cp -r grub/usr/lib/grub/i386-pc/*.mod cd-boot-tree/boot/grub/i386-pc +cp -r grub/usr/lib/grub/i386-pc/*.lst cd-boot-tree/boot/grub/i386-pc +cp -r grub/usr/lib/grub/i386-pc/*.o cd-boot-tree/boot/grub/i386-pc + +# add EFI GRUB to tree +copy_signed_shim_grub_to_boot_tree shim grub x64 x86_64 cd-boot-tree + +# create ESP image for El-Torito catalog and hybrid boot +create_eltorito_esp_image cd-boot-tree cd-boot-efi.img + +# download, extract and include memtest86+ +mkdir memtest86+ +$BASEDIR/tools/apt-selection download memtest86+ +dpkg --fsys-tarfile memtest86+*_amd64.deb \ + | tar xf - -C $CDDIR ./boot/memtest86+x64.bin + +mkisofs_opts () +{ + printf "%s " $@ >> $N.mkisofs_opts +} + +## Boring mkisofs options that should be set somewhere architecture independent. +mkisofs_opts -J -joliet-long -l + +## Generalities on booting + +# There is a 2x2 matrix of boot modes we care about: legacy or UEFI +# boot modes and having the installer be on a cdrom or a disk. Booting +# from cdrom uses the el torito standard and booting from disk expects +# a MBR or GPT partition table. +# +# https://wiki.osdev.org/El-Torito has a lot more background on this. + +## Set up the mkisofs options for legacy boot. + +# Set the el torito boot image "name", i.e. the path on the ISO +# containing the bootloader for legacy-cdrom boot. +mkisofs_opts -b boot/grub/i386-pc/eltorito.img + +# Back in the day, el torito booting worked by emulating a floppy +# drive. This hasn't been a useful way of operating for a long time. +mkisofs_opts -no-emul-boot + +# Misc options to make the legacy-cdrom boot work. +mkisofs_opts -boot-load-size 4 -boot-info-table --grub2-boot-info + +# The bootloader to write to the MBR for legacy-disk boot. +# +# We use the grub stage1 bootloader, boot_hybrid.img, which then jumps +# to the eltorito image based on the information xorriso provides it +# via the --grub2-boot-info option. +mkisofs_opts --grub2-mbr grub/usr/lib/grub/i386-pc/boot_hybrid.img + +## Set up the mkisofs options for UEFI boot. + +# To make our ESP / El-Torito image compliant with MBR/GPT standards, we +# first append it at a partition and then point the El Torito at it. +# See https://lists.debian.org/debian-cd/2019/07/msg00007.html +mkisofs_opts -append_partition 2 0xef \ + cd-boot-efi.img \ + -appended_part_as_gpt + +# Some BIOSes ignore removable disks with no partitions marked bootable +# in the MBR. Make sure our protective MBR partition is marked bootable. +mkisofs_opts --mbr-force-bootable + +# Start a new entry in the el torito boot catalog. +mkisofs_opts -eltorito-alt-boot + +# Specify where the el torito UEFI boot image "name". We use a special +# syntax available in latest xorriso to point at our newly-created partition. +mkisofs_opts -e --interval:appended_partition_2:all:: + +# Whether to emulate a floppy or not is a per-boot-catalog-entry +# thing, so we need to say it again. +mkisofs_opts -no-emul-boot + +## Create a partition table entry that covers the iso9660 filesystem. + +mkisofs_opts -partition_offset 16 + +## Add cd-boot-tree to the ISO. + +mkisofs_opts cd-boot-tree + +default_kernel_params + +# generate grub.cfg +mkdir -p $CDDIR/boot/grub/ +cat >> $CDDIR/boot/grub/grub.cfg <<EOF +set timeout=30 + +loadfont unicode + +set menu_color_normal=white/black +set menu_color_highlight=black/light-gray + +menuentry "Try or Install $HUMANPROJECT" { + set gfxpayload=keep + linux /casper/vmlinuz $KERNEL_PARAMS + initrd /casper/initrd +} +EOF + +# All but server get safe-graphics mode +if [ "$PROJECT" != "ubuntu-server" ]; then + cat >> $CDDIR/boot/grub/grub.cfg <<EOF +menuentry "$HUMANPROJECT (safe graphics)" { + set gfxpayload=keep + linux /casper/vmlinuz nomodeset $KERNEL_PARAMS + initrd /casper/initrd +} +EOF +fi + +# ubiquity based projects get OEM mode +case $KERNEL_PARAMS in + *maybe-ubiquity*) + cat >> $CDDIR/boot/grub/grub.cfg <<EOF +menuentry "OEM install (for manufacturers)" { + set gfxpayload=keep + linux /casper/vmlinuz ${KERNEL_PARAMS/maybe-ubiquity/only-ubiquity oem-config/enable=true} + initrd /casper/initrd +} +EOF + ;; +esac + +# Calamares-based projects get OEM mode +case $PROJECT in + lubuntu|kubuntu) + cat >> $CDDIR/boot/grub/grub.cfg <<EOF +menuentry "OEM install (for manufacturers)" { + set gfxpayload=keep + linux /casper/vmlinuz $KERNEL_PARAMS oem-config/enable=true + initrd /casper/initrd +} +EOF + ;; +esac + +# Currently only server is built with HWE, hence no safe-graphics/OEM +if [ "$HWE" ]; then + cat >> $CDDIR/boot/grub/grub.cfg <<EOF +menuentry "$HUMANPROJECT with the HWE kernel" { + set gfxpayload=keep + linux /casper/hwe-vmlinuz $KERNEL_PARAMS + initrd /casper/hwe-initrd +} +EOF +fi + +# create the loopback config, based on the main config, for use with +# Super GRUB Disk. +sed < $CDDIR/boot/grub/grub.cfg > $CDDIR/boot/grub/loopback.cfg \ + -e '1,/menu_color_highlight/d; /grub_platform/,$d' \ + -e '/linux/ s,---,iso-scan/filename=${iso_path} &,' + +# UEFI Entries +cat >> $CDDIR/boot/grub/grub.cfg <<EOF +grub_platform +if [ "\$grub_platform" = "efi" ]; then +menuentry 'Boot from next volume' { + exit 1 +} +menuentry 'UEFI Firmware Settings' { + fwsetup +} +else +menuentry 'Test memory' { + linux16 /boot/memtest86+x64.bin +} +fi +EOF + +# th,th, thats all diff --git a/tools/boot/questing/boot-arm64 b/tools/boot/questing/boot-arm64 new file mode 100755 index 00000000..7878775c --- /dev/null +++ b/tools/boot/questing/boot-arm64 @@ -0,0 +1,183 @@ +#!/bin/bash +# +# Do install stuff for arm64, including making bootable CDs +# +# $1 is the CD number +# $2 is the temporary CD build dir + +. $BASEDIR/tools/boot/$DIST/common.sh + +set -e + +N=$1 +CDDIR=$2 +cd $CDDIR/.. + +> $N.mkisofs_opts + +case "$SUBARCH" in + tegra) + FLAVOUR=nvidia-tegra + ;; + largemem) + FLAVOUR=generic-64k + ;; + *) + FLAVOUR=generic + ;; +esac + +# rename kernel+initrd +mv $CDDIR/casper/filesystem.kernel-$FLAVOUR $CDDIR/casper/vmlinuz +mv $CDDIR/casper/filesystem.initrd-$FLAVOUR $CDDIR/casper/initrd +HWE= +if [ -e $CDDIR/casper/filesystem.kernel-$FLAVOUR-hwe ]; then + HWE="true" + mv $CDDIR/casper/filesystem.kernel-$FLAVOUR-hwe $CDDIR/casper/hwe-vmlinuz + mv $CDDIR/casper/filesystem.initrd-$FLAVOUR-hwe $CDDIR/casper/hwe-initrd +fi + +# extract qcom dtbs, but only for non-server +if [ "$PROJECT" != "ubuntu-server" ]; then + unsquashfs -no-xattrs -i -d $CDDIR/casper/squashfs-root \ + $CDDIR/casper/minimal.squashfs \ + usr/lib/firmware/*/device-tree/qcom + mv $CDDIR/casper/squashfs-root/usr/lib/firmware/*/device-tree/qcom $CDDIR/casper/dtbs + rm -rf $CDDIR/casper/squashfs-root +fi + + +# download and extract bootloader packages +download_and_extract_package shim-signed shim +download_and_extract_package grub-common grub +download_and_extract_package grub-efi-arm64-bin grub +download_and_extract_package grub-efi-arm64-signed grub + +# add common files for GRUB to tree +copy_grub_common_files_to_boot_tree grub cd-boot-tree + +# add EFI GRUB to tree +copy_signed_shim_grub_to_boot_tree shim grub aa64 arm64 cd-boot-tree + +# create ESP image for El-Torito catalog and hybrid boot +create_eltorito_esp_image cd-boot-tree cd-boot-efi.img + +# download, extract and include cd-boot-images +echo -n " -J -joliet-long -l -c boot/boot.cat -partition_offset 16 -append_partition 2 0xef cd-boot-efi.img -e --interval:appended_partition_2:all:: -no-emul-boot -partition_cyl_align all cd-boot-tree" >> $N.mkisofs_opts + +default_kernel_params + +# generate grub.cfg +# Ensure console is on tty0 (LP: #2083919) +mkdir -p $CDDIR/boot/grub/ +cat >> $CDDIR/boot/grub/grub.cfg <<EOF +set timeout=30 + +loadfont unicode + +set menu_color_normal=white/black +set menu_color_highlight=black/light-gray + +set dtb= +set cmdline= +smbios --type 1 --get-string 5 --set system_product_name +smbios --type 1 --get-string 6 --set system_product_version +smbios --type 1 --get-string 19 --set system_sku_number +regexp "ThinkPad X13s.*" "\$system_product_version" +if [ \$? = 0 ]; then + cmdline="clk_ignore_unused pd_ignore_unused arm64.nopauth" + dtb="devicetree /casper/dtbs/sc8280xp-lenovo-thinkpad-x13s.dtb" +fi +if [ "\$system_product_version" == "ThinkPad T14s Gen 6" ]; then + # Workaround for 64GB crashes on T14s + cutmem 0x8800000000 0x8fffffffff + cmdline="clk_ignore_unused pd_ignore_unused cma=128M" + dtb="devicetree /casper/dtbs/x1e78100-lenovo-thinkpad-t14s.dtb" +fi +if [ "\$system_product_version" == "Yoga Slim 7 14Q8X9" ]; then + cmdline="clk_ignore_unused pd_ignore_unused cma=128M" + dtb="devicetree /casper/dtbs/x1e80100-lenovo-yoga-slim7x.dtb" +fi +if [ "\$system_product_name" == "XPS 13 9345" ]; then + # Workaround for 64GB crashes. Sigh... + cutmem 0x8800000000 0x8fffffffff + cmdline="clk_ignore_unused pd_ignore_unused cma=128M" + dtb="devicetree /casper/dtbs/x1e80100-dell-xps13-9345.dtb" +fi +if [ "\$system_product_name" == "Galaxy Book4 Edge" ]; then + cmdline="clk_ignore_unused pd_ignore_unused cma=128M" + dtb="devicetree /casper/dtbs/x1e80100-samsung-galaxy-book4-edge.dtb" +fi +if [ "\$system_product_name" == "Swift SF14-11" ]; then + cmdline="clk_ignore_unused pd_ignore_unused cma=128M" + dtb="devicetree /casper/dtbs/x1p64100-acer-swift-sf14-11.dtb" +fi +if [ "\$system_product_name" == "Swift SF14-11T" ]; then + cmdline="clk_ignore_unused pd_ignore_unused cma=128M" + dtb="devicetree /casper/dtbs/x1p64100-acer-swift-sf14-11.dtb" +fi +regexp "ASUS Vivobook S 15.*" "\$system_product_name" +if [ \$? == 0 ]; then + cmdline="clk_ignore_unused pd_ignore_unused cma=128M" + dtb="devicetree /casper/dtbs/x1e80100-asus-vivobook-s15.dtb" +fi +regexp "ASUS Zenbook A14 UX3407Q.*" "\$system_product_name" +if [ \$? == 0 ]; then + cmdline="clk_ignore_unused pd_ignore_unused cma=128M" + dtb="devicetree /casper/dtbs/x1p42100-asus-zenbook-a14.dtb" +fi +regexp "ASUS Zenbook A14 UX3407R.*" "\$system_product_name" +if [ \$? == 0 ]; then + cmdline="clk_ignore_unused pd_ignore_unused cma=128M" + dtb="devicetree /casper/dtbs/x1e80100-asus-zenbook-a14.dtb" +fi +regexp "HP OmniBook X Laptop 14-.*" "\$system_product_name" +if [ \$? == 0 ]; then + cmdline="clk_ignore_unused pd_ignore_unused cma=128M" + dtb="devicetree /casper/dtbs/x1e80100-hp-omnibook-x14.dtb" +fi +if [ "\$system_sku_number" == "Surface_Laptop_7th_Edition_2036" ]; then + # Workaround for 64GB crashes. Sigh... + cutmem 0x8800000000 0x8fffffffff + cmdline="clk_ignore_unused pd_ignore_unused cma=128M" + dtb="devicetree /casper/dtbs/x1e80100-microsoft-romulus13.dtb" +fi +if [ "\$system_sku_number" == "Surface_Laptop_7th_Edition_2037" ]; then + # Workaround for 64GB crashes. Sigh... + cutmem 0x8800000000 0x8fffffffff + cmdline="clk_ignore_unused pd_ignore_unused cma=128M" + dtb="devicetree /casper/dtbs/x1e80100-microsoft-romulus15.dtb" +fi +if [ "\$system_product_name" == "CRD" ]; then + cmdline="clk_ignore_unused pd_ignore_unused cma=128M" + dtb="devicetree /casper/dtbs/x1e80100-crd.dtb" +fi + +menuentry "Try or Install $HUMANPROJECT" { + set gfxpayload=keep + linux /casper/vmlinuz \$cmdline $KERNEL_PARAMS console=tty0 + initrd /casper/initrd + \$dtb +} +EOF + +if [ "$HWE" ]; then + cat >> $CDDIR/boot/grub/grub.cfg <<EOF +menuentry "$HUMANPROJECT with the HWE kernel" { + set gfxpayload=keep + linux /casper/hwe-vmlinuz \$cmdline $KERNEL_PARAMS console=tty0 + initrd /casper/hwe-initrd + \$dtb +} +EOF +fi + +# UEFI Entries +cat >> $CDDIR/boot/grub/grub.cfg <<EOF +menuentry 'Boot from next volume' { + exit 1 +} +menuentry 'UEFI Firmware Settings' { + fwsetup +} +EOF diff --git a/tools/boot/questing/boot-ppc64el b/tools/boot/questing/boot-ppc64el new file mode 100755 index 00000000..5a2bde35 --- /dev/null +++ b/tools/boot/questing/boot-ppc64el @@ -0,0 +1,78 @@ +#!/bin/bash +# +# Do install stuff for ppc64el, including making bootable CDs +# Works with debian-installer +# +# $1 is the CD number +# $2 is the temporary CD build dir + +# Using for HUMANPROJECT +. $BASEDIR/tools/boot/$DIST/common.sh + +set -e + +N=$1 +CDDIR=$2 + +cd $CDDIR/.. + +# TODO add better weights +"$BASEDIR/tools/sorting_weights" "$N" +echo -n " -sort $(pwd)/$N.weights " >> $N.mkisofs_opts + +# rename kernel+initrd +mv $CDDIR/casper/filesystem.kernel-generic $CDDIR/casper/vmlinux +mv $CDDIR/casper/filesystem.initrd-generic $CDDIR/casper/initrd +HWE= +if [ -e $CDDIR/casper/filesystem.kernel-generic-hwe ]; then + HWE="true" + mv $CDDIR/casper/filesystem.kernel-generic-hwe $CDDIR/casper/hwe-vmlinux + mv $CDDIR/casper/filesystem.initrd-generic-hwe $CDDIR/casper/hwe-initrd +fi + + +# download and extract bootloader packages +download_and_extract_package grub-common grub +download_and_extract_package grub-ieee1275-bin grub + +# add common files for GRUB to tree +copy_grub_common_files_to_boot_tree grub cd-boot-tree + +# add IEEE1275 ppc boot files +mkdir -p cd-boot-tree/ppc cd-boot-tree/boot/grub/powerpc-ieee1275 +cp grub/usr/lib/grub/powerpc-ieee1275/bootinfo.txt cd-boot-tree/ppc/bootinfo.txt +cp grub/usr/lib/grub/powerpc-ieee1275/eltorito.elf cd-boot-tree/boot/grub/powerpc.elf +cp -r grub/usr/lib/grub/powerpc-ieee1275/*.mod cd-boot-tree/boot/grub/powerpc-ieee1275 +cp -r grub/usr/lib/grub/powerpc-ieee1275/*.lst cd-boot-tree/boot/grub/powerpc-ieee1275 + +# add boot files to ISO +echo -n " cd-boot-tree" >> $N.mkisofs_opts + +# generate grub.cfg +mkdir -p $CDDIR/boot/grub/ +cat >> $CDDIR/boot/grub/grub.cfg <<EOF +set timeout=30 + +loadfont unicode + +set menu_color_normal=white/black +set menu_color_highlight=black/light-gray + +menuentry "Try or Install $HUMANPROJECT" { + set gfxpayload=keep + linux /casper/vmlinux quiet --- + initrd /casper/initrd +} +EOF + +if [ "$HWE" ]; then + cat >> $CDDIR/boot/grub/grub.cfg <<EOF +menuentry "$HUMANPROJECT with the HWE kernel" { + set gfxpayload=keep + linux /casper/hwe-vmlinux quiet --- + initrd /casper/hwe-initrd +} +EOF +fi + +exit 0 diff --git a/tools/boot/questing/boot-riscv64 b/tools/boot/questing/boot-riscv64 new file mode 100755 index 00000000..a01c45b8 --- /dev/null +++ b/tools/boot/questing/boot-riscv64 @@ -0,0 +1,97 @@ +#!/bin/bash +# +# Create gadget tree for riscv64 to be passed ubuntu-image internally +# Unlike the other boot-<arch> scripts this is not used for creating El-Torito ISOs +# +# $1 is the CD number +# $2 is the temporary CD build dir + +# Using for HUMANPROJECT +. $BASEDIR/tools/boot/$DIST/common.sh + +set -e + +N=$1 +CDDIR=$2 +cd $CDDIR/.. + +> $N.mkisofs_opts + +# rename kernel+initrd +mv $CDDIR/casper/filesystem.kernel-generic $CDDIR/casper/vmlinux +mv $CDDIR/casper/filesystem.initrd-generic $CDDIR/casper/initrd +HWE= +if [ -e $CDDIR/casper/filesystem.kernel-generic-hwe ]; then + HWE="true" + mv $CDDIR/casper/filesystem.kernel-generic-hwe $CDDIR/casper/hwe-vmlinux + mv $CDDIR/casper/filesystem.initrd-generic-hwe $CDDIR/casper/hwe-initrd +fi + +# download and extract bootloader packages +download_and_extract_package grub-common grub +download_and_extract_package grub-efi-riscv64-bin grub +download_and_extract_package grub-efi-riscv64-unsigned grub +download_and_extract_package u-boot-sifive u-boot-sifive + +TREE_DIR=cd-boot-tree + +# add GRUB to tree +copy_grub_common_files_to_boot_tree grub $TREE_DIR +copy_unsigned_monolithic_grub_to_boot_tree grub riscv64 riscv64 $TREE_DIR + +# add DTBs to tree +unsquashfs -no-xattrs -d kernel-layer CD1/casper/ubuntu-server-minimal.squashfs usr/lib/firmware +mkdir -p $TREE_DIR/dtb +cp -r kernel-layer/usr/lib/firmware/*/device-tree/* $TREE_DIR/dtb +rm -rf kernel-layer + +# copy tree contents to live-media rootfs +cp -aT $TREE_DIR $CDDIR + +# create ESP image with GRUB and dtbs +mkfs.msdos -n ESP -C -v efi.img 32768 +# add EFI files to ESP +mcopy -s -i efi.img $TREE_DIR/EFI ::/.; +# add DTBs to ESP +mcopy -s -i efi.img $TREE_DIR/dtb ::/.; + +# partion_offset is specified in 2 KiB units and contains a copy of +# the ISO metadata. It is followed by the rootfs and the ESP +cat <<EOF >> $N.mkisofs_opts +-joliet on +-compliance joliet_long_names +--append_partition 2 0xef efi.img +-boot_image any partition_offset=10240 +-boot_image any partition_cyl_align=all +-boot_image any efi_path=--interval:appended_partition_2:all:: +-boot_image any appended_part_as=gpt +-boot_image any cat_path=/boot/boot.cat +-fs 64m +EOF + +# generate grub.cfg +mkdir -p $CDDIR/boot/grub/ +cat >> $CDDIR/boot/grub/grub.cfg <<EOF +set timeout=30 + +set menu_color_normal=white/black +set menu_color_highlight=black/light-gray + +menuentry "Try or Install $HUMANPROJECT" { + set gfxpayload=keep + linux /casper/vmlinux fsck.mode=skip efi=debug sysctl.kernel.watchdog_thresh=60 --- + initrd /casper/initrd +} +EOF + +if [ "$HWE" ]; then + cat >> $CDDIR/boot/grub/grub.cfg <<EOF +menuentry "$HUMANPROJECT with the HWE kernel" { + set gfxpayload=keep + linux /casper/hwe-vmlinux fsck.mode=skip efi=debug -sysctl.kernel.watchdog_thresh=60 -- + initrd /casper/hwe-initrd +} +EOF +fi + +exit 0 diff --git a/tools/boot/questing/boot-s390x b/tools/boot/questing/boot-s390x new file mode 100755 index 00000000..30d63950 --- /dev/null +++ b/tools/boot/questing/boot-s390x @@ -0,0 +1,62 @@ +#!/bin/bash +# +# boot-s390x +# +# (C) 2001 Jochen R�hrig <[email protected]> +# 2005 Frans Pop <[email protected]> +# 2015-2020 Canonical Ltd - changes for ubuntu +# +# Released under the GNU general Public License. +# See the copyright file for license details. +# Released as part of the debian_cd package, not much use stand alone. +# +# Install stuff for booting an s390 system from VM-reader, +# FTP-server, or CD-ROM. +# +# $1 is the CD number +# $2 is the temporary CD build dir + +. $BASEDIR/tools/boot/$DIST/common.sh + +set -e +set -x + +N=$1 +CDDIR=$2 + +cd $CDDIR/.. + +# TODO add hwe + +# copy static .ins & exec scripts, docs +cp -r $BASEDIR/data/$DIST/$ARCH/* $CDDIR/ + +# copy kernel image to the name that is used in .ins & exec scripts +mv $CDDIR/casper/filesystem.kernel-generic $CDDIR/boot/kernel.ubuntu + +# copy initrd to the name that is used in .ins & exec scripts +mv $CDDIR/casper/filesystem.initrd-generic $CDDIR/boot/initrd.ubuntu + +# compute initrd offset & size, store it in the names used in .ins & exec scripts +perl -e "print pack('N', 0x1000000)" > $CDDIR/boot/initrd.off +perl -e "print pack('N', -s '$CDDIR/boot/initrd.ubuntu')" > $CDDIR/boot/initrd.siz + +# compute cmdline, store it in the name used in .ins & exec scripts +echo " --- " > $CDDIR/boot/parmfile.ubuntu + +# secondary top-level ubuntu.ins file was requested in +# https://bugs.launchpad.net/ubuntu-cdimage/+bug/1536981/comments/6 +sed -e 's,^[^*],boot/&,g' < $CDDIR/boot/ubuntu.ins > $CDDIR/ubuntu.ins + +# generate QEMU-KVM boot image +$BASEDIR/tools/gen-s390-cd-kernel.pl --initrd=$CDDIR/boot/initrd.ubuntu --kernel=$CDDIR/boot/kernel.ubuntu --cmdline="$(cat $CDDIR/boot/parmfile.ubuntu)" --outfile=$CDDIR/boot/ubuntu.ikr + +# enable Joliet and add QEMU-KVM boot image +echo -n " -J -no-emul-boot -b boot/ubuntu.ikr" >> $N.mkisofs_opts + +# extract bootloader signing certificate +installed_pem=/usr/lib/s390-tools/stage3.pem +unsquashfs -no-xattrs -i -d $CDDIR/squashfs-root \ + $CDDIR/casper/ubuntu-server-minimal.squashfs $installed_pem +mv $CDDIR/squashfs-root/$installed_pem $CDDIR/ubuntu.pem +rm -rf $CDDIR/squashfs-root diff --git a/tools/boot/questing/common.sh b/tools/boot/questing/common.sh new file mode 100644 index 00000000..264334d5 --- /dev/null +++ b/tools/boot/questing/common.sh @@ -0,0 +1,80 @@ +# encode the right CD kernel parameteres, for every project +default_kernel_params() { + case $PROJECT in + ubuntu|edubuntu|ubuntustudio|ubuntu-budgie|kubuntu|lubuntu|ubuntu-unity|ubuntucinnamon|xubuntu|ubuntu-mate) + KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS } --- quiet splash" + ;; + ubuntukylin) + KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS }file=/cdrom/preseed/ubuntu.seed locale=zh_CN keyboard-configuration/layoutcode?=cn quiet splash --- " + ;; + ubuntu-server) + KERNEL_PARAMS="${KERNEL_PARAMS:+$KERNEL_PARAMS } ---" + ;; + esac +} + +HUMANPROJECT="$(echo "$CAPPROJECT" | sed 's/-/ /g')" + +# download and extract a package +download_and_extract_package() { + local package_name=$1 + local target_dir=$2 + + mkdir -p $target_dir + $BASEDIR/tools/apt-selection download $package_name + dpkg --fsys-tarfile $package_name*.deb | tar xf - -C $target_dir +} + +# copy common files for GRUB (e.g. unicode font) to boot tree +copy_grub_common_files_to_boot_tree() { + local grub_dir=$1 + local boot_tree=$2 + + mkdir -p $boot_tree/boot/grub/fonts + cp $grub_dir/usr/share/grub/unicode.pf2 $boot_tree/boot/grub/fonts/unicode.pf2 +} + +# copy signed shim and GRUB to boot tree +# NOTE: we are using the non-NX shim here for now, in future the default should be updated here +copy_signed_shim_grub_to_boot_tree() { + local shim_dir=$1 + local grub_dir=$2 + local efi_suffix=$3 + local grub_target=$4 + local boot_tree=$5 + + mkdir -p $boot_tree/EFI/boot + cp $shim_dir/usr/lib/shim/shim$efi_suffix.efi.signed.latest $boot_tree/EFI/boot/boot$efi_suffix.efi + cp $shim_dir/usr/lib/shim/mm$efi_suffix.efi $boot_tree/EFI/boot/mm$efi_suffix.efi + cp $grub_dir/usr/lib/grub/$grub_target-efi-signed/gcd$efi_suffix.efi.signed $boot_tree/EFI/boot/grub$efi_suffix.efi + + mkdir -p $boot_tree/boot/grub/$grub_target-efi + cp -r $grub_dir/usr/lib/grub/$grub_target-efi/*.mod $boot_tree/boot/grub/$grub_target-efi + cp -r $grub_dir/usr/lib/grub/$grub_target-efi/*.lst $boot_tree/boot/grub/$grub_target-efi +} + +# copy unsigned monolithic GRUB to boot tree +copy_unsigned_monolithic_grub_to_boot_tree() { + local grub_dir=$1 + local efi_suffix=$2 + local grub_target=$3 + local boot_tree=$4 + + mkdir -p $boot_tree/EFI/boot + cp $grub_dir/usr/lib/grub/$grub_target-efi/monolithic/gcd$efi_suffix.efi $boot_tree/EFI/boot/boot$efi_suffix.efi + + mkdir -p $boot_tree/boot/grub/$grub_target-efi + cp -r $grub_dir/usr/lib/grub/$grub_target-efi/*.mod $boot_tree/boot/grub/$grub_target-efi + cp -r $grub_dir/usr/lib/grub/$grub_target-efi/*.lst $boot_tree/boot/grub/$grub_target-efi +} + +# create an ESP image for insertion into the El-Torito catalog +# NOTE: this needs dosfstools and mtools installed +create_eltorito_esp_image() { + local boot_tree=$1 + local target_file=$2 + + mkfs.msdos -n ESP -C -v $target_file \ + $(( $(du -s --apparent-size --block-size=1024 $boot_tree/EFI/ | cut -f 1 ) + 1024)) + mcopy -s -i $target_file $boot_tree/EFI ::/.; +} diff --git a/tools/questing/installtools.sh b/tools/questing/installtools.sh new file mode 100755 index 00000000..8f8b3e38 --- /dev/null +++ b/tools/questing/installtools.sh @@ -0,0 +1,70 @@ +#!/bin/bash + +set -e + +# The location of the tree for CD#1, passed in +DIR=$1 + +# Preseed files for special install types +PRESEED_ROOT=$BASEDIR/data/$DIST/preseed +for preseed_dir in \ + $PRESEED_ROOT $PRESEED_ROOT/$ARCH \ + $PRESEED_ROOT/$PROJECT $PRESEED_ROOT/$PROJECT/$ARCH; do + [ -d "$preseed_dir" ] || continue + for file in $preseed_dir/*.seed; do + [ -e "$file" ] || continue + mkdir -p $DIR/preseed + cp -a "$file" $DIR/preseed/ + done +done +if [ "$CDIMAGE_DVD" = 1 ] && [ "$PROJECT" != ubuntu-server ]; then + # include server on normal DVDs + for preseed_dir in \ + $PRESEED_ROOT/ubuntu-server $PRESEED_ROOT/ubuntu-server/$ARCH; do + [ -d "$preseed_dir" ] || continue + for file in $preseed_dir/*.seed; do + mkdir -p $DIR/preseed + cp -a "$file" $DIR/preseed/ + done + done + # we normally preseed tasksel to install the desktop task, but this is + # inappropriate on DVDs where much more choice is available + if [ -e "$DIR/preseed/$PROJECT.seed" ]; then + perl -ni -e ' + if (/^#/) { $out .= $_ } + elsif (m[^tasksel\s+tasksel/first\s]) { print $out; print; print "tasksel\ttasksel/first\tseen false\n"; $out = "" } + else { print $out; print; $out = "" }' \ + "$DIR/preseed/$PROJECT.seed" + if [ ! -s "$DIR/preseed/$PROJECT.seed" ]; then + rm -f "$DIR/preseed/$PROJECT.seed" + fi + fi +fi +# On live CDs, remove preseed/early_command settings that use the debconf +# confmodule. Live CDs implement preseed/early_command in casper which +# doesn't have the confmodule available. +if [ "$CDIMAGE_LIVE" = 1 ]; then + for file in $DIR/preseed/*.seed; do + [ -f "$file" ] || continue + sed -i '/preseed\/early_command.*confmodule/d' "$file" + done +fi + +if [ "$BACKPORT_KERNEL" ]; then + (cd $DIR/preseed/ && + case $ARCH in + amd64|i386|arm64|ppc64el|riscv64|s390x) + for file in *.seed; do + [ -f "$file" ] || continue + cp "$file" hwe-"$file" + if grep -q base-installer/kernel/override-image "$file"; then + sed -i -e "s/string linux-virtual/string linux-virtual-$BACKPORT_KERNEL/" hwe-"$file" + elif ! grep -q base-installer/kernel/altmeta "$file"; then + echo "d-i base-installer/kernel/altmeta string $BACKPORT_KERNEL" >> hwe-"$file" + fi + [ "$PROJECT" = "ubuntu-server" ] || mv hwe-"$file" "$file" + done + ;; + esac + ) +fi |
