Extract vmlinuz and initramfs as well

This commit is contained in:
Micah Lee 2021-06-25 12:20:42 -07:00
parent 9da0f4a980
commit c39562906e
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
2 changed files with 14 additions and 2 deletions

View file

@ -1 +1 @@
dangerzone.qcow2
out

View file

@ -1,11 +1,23 @@
#!/bin/bash
# Install dependencies
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt-get install -y qemu-utils wget nbdfuse
# Build the VM image
cd /build
mkdir -p /build/out
./alpine-make-vm-image \
--image-format qcow2 \
--image-size 2G \
--packages "$(cat packages)" \
--script-chroot \
dangerzone.qcow2 -- ./configure.sh
/build/out/dangerzone.qcow2 -- ./configure.sh
# Extract vmlinuz and initramfs
qemu-nbd -c /dev/nbd0 /build/out/dangerzone.qcow2
mount /dev/nbd0 /mnt
cp /mnt/boot/vmlinuz-virt /build/out
cp /mnt/boot/initramfs-virt /build/out
umount /mnt