Initial upgrade flow for control-plane

This commit is contained in:
2026-04-06 23:49:39 +08:00
parent c6f89651ce
commit 578b3e6a6f
19 changed files with 563 additions and 42 deletions

View File

@@ -221,7 +221,7 @@ log "Booting kernel took $(cut -d' ' -f1 /proc/uptime) seconds."
. /etc/build-info || panic "failed to source /etc/build-info"
wait_for_partnames 30 rootfsA rootfsB data || panic "failed to wait for fs"
wait_for_partnames 5 rootfsA rootfsB data || panic "failed to wait for fs"
ROOT_CMD="$(get_cmdline_arg root || true)"
BOOT_PART="$(get_cmdline_arg bootpart || true)"
@@ -283,6 +283,15 @@ if [ -n "$ALT_PART" ]; then
ln -sf "$ALT_PART" /dev/mksaltpart
fi
mkdir -p /run/monok8s
cat > /run/monok8s/boot-state.env <<EOF
BOOT_PART=$BOOT_PART
ROOT_DEV=$ROOT_DEV
DATA_DEV=$DATA_DEV
EOF
mkdir -p /run/altrootfs
mount_or_panic --move /dev /newroot/dev
mount_or_panic --move /proc /newroot/proc
mount_or_panic --move /sys /newroot/sys