mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-23 11:36:32 +01:00
fix(steps-guix-jump): harden linux64 kexec handoff
This commit is contained in:
parent
eb44754931
commit
3817181838
1 changed files with 11 additions and 3 deletions
|
|
@ -7,6 +7,16 @@ new_kernel="/boot/vmlinuz-linux64"
|
||||||
current_kernel="/boot/vmlinuz"
|
current_kernel="/boot/vmlinuz"
|
||||||
backup_kernel="/boot/vmlinuz-32bit.backup"
|
backup_kernel="/boot/vmlinuz-32bit.backup"
|
||||||
|
|
||||||
|
quiesce_filesystem_for_kexec() {
|
||||||
|
if command -v dhcpcd >/dev/null 2>&1; then
|
||||||
|
dhcpcd -x >/dev/null 2>&1 || true
|
||||||
|
fi
|
||||||
|
sync
|
||||||
|
echo s > /proc/sysrq-trigger || true
|
||||||
|
echo u > /proc/sysrq-trigger || true
|
||||||
|
mount -o remount,ro / || true
|
||||||
|
}
|
||||||
|
|
||||||
if [ ! -f "${new_kernel}" ]; then
|
if [ ! -f "${new_kernel}" ]; then
|
||||||
echo "Missing new kernel image: ${new_kernel}" >&2
|
echo "Missing new kernel image: ${new_kernel}" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -26,7 +36,5 @@ else
|
||||||
kexec -l "${current_kernel}" --console-serial \
|
kexec -l "${current_kernel}" --console-serial \
|
||||||
--append="console=ttyS0 root=/dev/sda1 init=/init rw rootwait consoleblank=0"
|
--append="console=ttyS0 root=/dev/sda1 init=/init rw rootwait consoleblank=0"
|
||||||
fi
|
fi
|
||||||
sync
|
quiesce_filesystem_for_kexec
|
||||||
echo u > /proc/sysrq-trigger || true
|
|
||||||
mount -o remount,ro / || true
|
|
||||||
kexec -e
|
kexec -e
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue