From 4e51c0e71f3a9b57e9a2fc4a72349b1ffad33777 Mon Sep 17 00:00:00 2001 From: Ward from fusion-voyager-3 Date: Mon, 16 Dec 2024 00:47:40 +0300 Subject: [PATCH] d --- hooks/4-booster-setup.chroot | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/hooks/4-booster-setup.chroot b/hooks/4-booster-setup.chroot index 7de232b..e878a51 100755 --- a/hooks/4-booster-setup.chroot +++ b/hooks/4-booster-setup.chroot @@ -9,8 +9,7 @@ touch /usr/share/booster/hooks-early/pika_live.sh tee /usr/share/booster/hooks-early/pika_live.sh <<'EOF' #! /bin/sh -set -e - +set -eS cat /proc/cmdline | grep 'boot=live' || exit 0 @@ -19,7 +18,7 @@ MEDIUM_LABEL="PikaOS 4" #TMPFS_SIZE="3G" ### Create mounting dirs -mkdir -p /mnt/medium /mnt/filesystem /mnt/overlay /root +mkdir -p /mnt/medium /mnt/filesystem /mnt/overlay /booster.root ### Mount live medium mount -o ro "$(findfs LABEL="$MEDIUM_LABEL" | head -n1)" /mnt/medium @@ -43,17 +42,17 @@ mount -t tmpfs -o mode=1777 overlay_tmpfs /mnt/overlay mkdir -p /mnt/overlay/upper /mnt/overlay/work ### Create merged overlay -mount -t overlay overlay -o lowerdir=/mnt/filesystem:/mnt/medium,upperdir=/mnt/overlay/upper,workdir=/mnt/overlay/work /root +mount -t overlay overlay -o lowerdir=/mnt/filesystem:/mnt/medium,upperdir=/mnt/overlay/upper,workdir=/mnt/overlay/work /booster.root ### mount kernel filesystems -mount -n -t devtmpfs devtmpfs /root/dev -mount -n -t proc proc /root/proc -mount -n -t sysfs sysfs /root/sys -mount -n -t tmpfs tmpfs /root/run +mount -n -t devtmpfs devtmpfs /booster.root/dev +mount -n -t proc proc /booster.root/proc +mount -n -t sysfs sysfs /booster.root/sys +mount -n -t tmpfs tmpfs /booster.root/run ### Switch to new root -#switch_root "/root/" "/root/sbin/init" +#switch_root "/booster.root/" "/booster.root/sbin/init" EOF chmod +x /usr/share/booster/hooks-early/pika_live.sh @@ -65,7 +64,9 @@ extra_files: busybox enable_lvm: true modules_force_load: usbhid universal: true -modules: * +modules: loop,* enable_hooks: true enable_plymouth: true EOF + +update-initramfs -c -k all