fix(image): preserve installer kernel and verified update contracts

This commit is contained in:
Codex
2026-10-13 05:03:49 +03:00
parent 95fc6abc8d
commit 4b950eaa3f
5 changed files with 64 additions and 7 deletions
+5 -5
View File
@@ -6,6 +6,11 @@ if [[ $# != 1 || "$1" != /hydra-output/rootfs ]]; then
fi
root=$1
python3 /hydra-source/hydra/image.py configure "$root" --source /hydra-source
# This is a separate rootfs inside the assembly container, never the host root.
mount --bind /dev "$root/dev"
mount -t proc proc "$root/proc"
mount --bind /sys "$root/sys"
trap 'umount "$root/sys" "$root/proc" "$root/dev"' EXIT
for group in wheel kvm video render audio; do
chroot "$root" getent group "$group" >/dev/null || chroot "$root" groupadd -r "$group"
done
@@ -24,10 +29,5 @@ chroot "$root" chmod 0750 /usr/libexec/qemu-bridge-helper
chroot "$root" visudo --check
systemctl --root="$root" enable NetworkManager.service greetd.service hydra-network.service hydra-dnsmasq.service hydra-bridge-permissions.service getty@tty2.service serial-getty@ttyS0.service
systemctl --root="$root" set-default graphical.target
# This is a separate rootfs inside the assembly container, never the host root.
mount --bind /dev "$root/dev"
mount -t proc proc "$root/proc"
mount --bind /sys "$root/sys"
trap 'umount "$root/sys" "$root/proc" "$root/dev"' EXIT
kernel=$(python3 /hydra-source/hydra/image.py kernel "$root")
chroot "$root" dracut --force --no-hostonly --no-hostonly-cmdline --conf /etc/hydra/live-mode/dracut.conf --confdir /etc/hydra/live-mode/dracut.conf.d --add dmsquash-live /boot/initramfs-live.img "$kernel"