diff options
Diffstat (limited to 'images/ubuntu/genimg')
| -rwxr-xr-x | images/ubuntu/genimg | 17 | +5 −12 |
1 files changed, 5 insertions, 12 deletions
diff --git a/images/ubuntu/genimg b/images/ubuntu/genimg index 1980803..28d6e08 100755 --- a/images/ubuntu/genimg +++ b/images/ubuntu/genimg @@ -1,6 +1,6 @@ #!/bin/sh -eux # SPDX-FileCopyrightText: 2017-2026 Drew DeVault -# SPDX-FileCopyrightText: 2026 Nikolay Govorov +# SPDX-FileCopyrightText: 2026 Nikolay Govorov # SPDX-License-Identifier: AGPL-3.0-only self=$(dirname "$(readlink -f "$0")") @@ -81,7 +81,7 @@ export DEBIAN_FRONTEND=noninteractive debootstrap \ --include=gnupg,ubuntu-keyring \ - --arch="$arch" "$release" \ + --arch=$arch $release \ /mnt http://archive.ubuntu.com/ubuntu/ mount --bind /dev /mnt/dev @@ -111,9 +111,9 @@ echo 'nameserver 1.1.1.1' >>/mnt/etc/resolv.conf net_mode=static net_address=10.0.2.15/24 net_gateway=10.0.2.2 -cat >"/mnt/etc/systemd/network/25-$iface.network" <<EOF +cat >/mnt/etc/systemd/network/25-ens3.network <<EOF [Match] -Name=$iface +Name=ens3 [Network] Address=$net_address @@ -172,14 +172,7 @@ EOF run_root update-initramfs -u -kernel_path= -for candidate in /mnt/boot/vmlinuz-[0-9]*; do - [ -e "$candidate" ] || continue - kernel_path=$candidate - break -done -[ -n "$kernel_path" ] -linuxver=${kernel_path##*/vmlinuz-} +linuxver=$(ls /mnt/boot | grep 'vmlinuz-[0-9].*' | cut -d- -f2-) # Reference partitions by PARTUUID so boot works regardless of how the VMM names # the disk (vda/sda/nvme...). cmdline is canonical: identical for every boot |
