diff options
Diffstat (limited to 'images/alpine/genimg')
| -rwxr-xr-x | images/alpine/genimg | 18 | +6 −12 |
1 files changed, 6 insertions, 12 deletions
diff --git a/images/alpine/genimg b/images/alpine/genimg index e6b1ab2..ef2aaf1 100755 --- a/images/alpine/genimg +++ b/images/alpine/genimg @@ -43,9 +43,6 @@ cleanup() { size_gib=24 mkdir -p "$out" -# .hmi (Hule Machine Image): plain qcow2 restricted to a feature subset that -# materializes losslessly to raw (no internal snapshots/bitmaps/encryption). -# Base image = chain root, so no backing. Never `qemu-img snapshot` it. qemu-img create -f qcow2 -o compat=1.1 "$out"/root.hmi "${size_gib}G" modprobe nbd max_part=16 qemu-nbd --connect=/dev/nbd0 "$out"/root.hmi @@ -155,12 +152,9 @@ printf '%s\n' "%wheel ALL=(ALL) NOPASSWD: ALL" >>/mnt/etc/sudoers rm -f /mnt/etc/motd printf 'permit nopass :wheel\n' >>/mnt/etc/doas.d/doas.conf -# Reference partitions by PARTUUID so boot survives whatever the VMM names the -# disk. cmdline is canonical (extlinux APPEND == manifest boot.cmdline). -boot_partuuid=$(blkid -s PARTUUID -o value /dev/nbd0p1) -swap_partuuid=$(blkid -s PARTUUID -o value /dev/nbd0p2) -root_partuuid=$(blkid -s PARTUUID -o value /dev/nbd0p3) -cmdline="root=PARTUUID=$root_partuuid rw modules=sd-mod,usb-storage,ext4 quiet rootfstype=ext4" +boot_uuid=$(blkid -s UUID -o value /dev/nbd0p1) +root_uuid=$(blkid -s UUID -o value /dev/nbd0p3) +cmdline="root=UUID=$root_uuid rw modules=sd-mod,usb-storage,ext4 quiet rootfstype=ext4" cat >/mnt/boot/extlinux.conf <<EOF DEFAULT linux @@ -171,9 +165,9 @@ LABEL linux EOF cat >>/mnt/etc/fstab <<EOF -PARTUUID=$boot_partuuid /boot ext4 rw,relatime,data=ordered 0 0 -PARTUUID=$swap_partuuid swap swap defaults 0 0 -PARTUUID=$root_partuuid / ext4 rw,relatime,data=ordered 0 0 +UUID=$boot_uuid /boot ext4 rw,relatime,data=ordered 0 0 +/dev/vda2 swap swap defaults 0 0 +UUID=$root_uuid / ext4 rw,relatime,data=ordered 0 0 EOF mkdir -p /mnt/etc/docker |
