diff --git a/recipes-diya/diya-overlay/files/boot-to-recovery b/recipes-diya/diya-overlay/files/boot-to-recovery new file mode 100755 index 0000000..8f65c2a --- /dev/null +++ b/recipes-diya/diya-overlay/files/boot-to-recovery @@ -0,0 +1,15 @@ +#! /bin/sh + +if [[ $(/usr/bin/id -u) -ne 0 ]]; then + echo "$0 shall be run as root" + exit 1 +fi + +. /etc/profile + +# prepare env for recovery boot +cat << EOF > /boot/extraconfig.txt +initramfs recovery-${MACHINE}.cpio.gz followkernel +EOF +echo "Rebooting to recovery mode" +reboot \ No newline at end of file