mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-29 10:12:38 +02:00
Extract vmlinuz and initramfs as well
This commit is contained in:
parent
9da0f4a980
commit
c39562906e
2 changed files with 14 additions and 2 deletions
2
rip_docker/vm-image-builder/.gitignore
vendored
2
rip_docker/vm-image-builder/.gitignore
vendored
|
@ -1 +1 @@
|
|||
dangerzone.qcow2
|
||||
out
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue