mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-29 18:22:37 +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
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y qemu-utils wget nbdfuse
|
apt-get install -y qemu-utils wget nbdfuse
|
||||||
|
|
||||||
|
# Build the VM image
|
||||||
cd /build
|
cd /build
|
||||||
|
mkdir -p /build/out
|
||||||
./alpine-make-vm-image \
|
./alpine-make-vm-image \
|
||||||
--image-format qcow2 \
|
--image-format qcow2 \
|
||||||
--image-size 2G \
|
--image-size 2G \
|
||||||
--packages "$(cat packages)" \
|
--packages "$(cat packages)" \
|
||||||
--script-chroot \
|
--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