helper to install qubes from the recovery shell (issue #27)

This commit is contained in:
Trammell Hudson 2017-04-12 06:55:22 -04:00
parent 6a734208b0
commit 8d2d6ad6c3
Failed to extract signature

29
initrd/bin/qubes-install Executable file
View File

@ -0,0 +1,29 @@
#!/bin/sh
# Attempt to install qubes using the recovery shell and the pre-built
# version of Xen
. /etc/functions
DEV="$1"
if [ -z "$DEV" ]; then
DEV="/dev/sdb2"
fi
mount-usb "$DEV" \
|| die "$DEV: Unable to mount?"
cd /media/efi/boot \
|| die "$DEV: cd to /media/efi/boot failed?"
kexec -l \
--module "./vmlinuz inst.stage2=hd:LABEL=Qubes-R3.2-x86_64" \
--module "./initrd.img" \
--command-line "no-real-mode reboot=no" \
/bin/xen.gz \
|| die "$DEV: kexec -l failed?"
warn "Starting installer..."
sleep 1
kexec -e
die "$DEV: kexec -e failed?"