initial commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
SYSTEM=${1:-/nix/var/nix/profiles/system}
|
||||
|
||||
if [[ ! -e "$SYSTEM/kernel" ]]; then
|
||||
echo "error: no kernel found at $SYSTEM" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "kexec: loading $SYSTEM"
|
||||
echo "kernel-params: $(cat "$SYSTEM/kernel-params")"
|
||||
|
||||
sudo kexec \
|
||||
--load "$SYSTEM/kernel" \
|
||||
--initrd="$SYSTEM/initrd" \
|
||||
--command-line="$(cat "$SYSTEM/kernel-params") init=$SYSTEM/init"
|
||||
|
||||
echo "kexec: executing (systemd will stop services first)"
|
||||
sudo systemctl kexec
|
||||
Reference in New Issue
Block a user