diff --git a/usr/lib/initcpio/install/archboot_init b/usr/lib/initcpio/install/archboot_init index 3c1fe27d2..dae1a4587 100644 --- a/usr/lib/initcpio/install/archboot_init +++ b/usr/lib/initcpio/install/archboot_init @@ -13,7 +13,7 @@ build() { map add_binary bash sh blkid mount switch_root bsdcpio mkfs.btrfs setfont \ /usr/lib/systemd/systemd-udevd udevadm systemd-tmpfiles kmod \ insmod modprobe mkdir gzip sleep uname cat cp cut dmesg grep ln ls mv \ - poweroff reboot rm umount lsblk rmmod + rm umount lsblk rmmod add_file "/usr/share/kbd/consolefonts/ter-v16n.psf.gz" "/consolefont.psf.gz" map add_udev_rule '50-udev-default.rules' '60-persistent-storage.rules' \ '64-btrfs.rules' '80-drivers.rules' diff --git a/usr/share/archboot/base/init b/usr/share/archboot/base/init index 03f423296..4f04575e6 100755 --- a/usr/share/archboot/base/init +++ b/usr/share/archboot/base/init @@ -4,7 +4,8 @@ _emergency_shell() { echo "Welcome to Archboot Emergeny Shell:" echo "Seems something went wrong..." - echo "Type 'poweroff' for shutdown or 'reboot' to restart." + echo "Type 'echo b >/proc/sysrq-trigger' for reboot." + echo "Type 'echo o >/proc/sysrq-trigger' for poweroff." /bin/sh } @@ -25,6 +26,7 @@ udevadm trigger --action=add --type=devices udevadm settle udevadm control --exit udevadm info --cleanup-db +echo 1 > /proc/sys/kernel/sysrq echo -e "\e[1mInitializing\e[m \e[36mArchboot\e[m \e[1m- Arch Linux Environment:\e[m" # it needs one echo before, in order to reset the consolefont! setfont consolefont.psf.gz -C /dev/console @@ -61,6 +63,7 @@ cd /new_root || _emergency_shell echo -e "\e[1mStep 4/4:\e[m Copying archboot rootfs to /new_root..." echo -e " This may need some time..." bsdcpio -i <"/mnt/boot/initramfs-$(uname -m).img" &>/dev/null || _emergency_shell +echo 0 > /proc/sys/kernel/sysrq exec switch_root /new_root /init "$@" # vim: set ft=sh ts=4 sw=4 et: