d
This commit is contained in:
parent
39917d462b
commit
4e51c0e71f
@ -9,8 +9,7 @@ touch /usr/share/booster/hooks-early/pika_live.sh
|
|||||||
tee /usr/share/booster/hooks-early/pika_live.sh <<'EOF'
|
tee /usr/share/booster/hooks-early/pika_live.sh <<'EOF'
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
set -e
|
set -eS
|
||||||
|
|
||||||
|
|
||||||
cat /proc/cmdline | grep 'boot=live' || exit 0
|
cat /proc/cmdline | grep 'boot=live' || exit 0
|
||||||
|
|
||||||
@ -19,7 +18,7 @@ MEDIUM_LABEL="PikaOS 4"
|
|||||||
#TMPFS_SIZE="3G"
|
#TMPFS_SIZE="3G"
|
||||||
|
|
||||||
### Create mounting dirs
|
### 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 live medium
|
||||||
mount -o ro "$(findfs LABEL="$MEDIUM_LABEL" | head -n1)" /mnt/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
|
mkdir -p /mnt/overlay/upper /mnt/overlay/work
|
||||||
|
|
||||||
### Create merged overlay
|
### 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 kernel filesystems
|
||||||
mount -n -t devtmpfs devtmpfs /root/dev
|
mount -n -t devtmpfs devtmpfs /booster.root/dev
|
||||||
mount -n -t proc proc /root/proc
|
mount -n -t proc proc /booster.root/proc
|
||||||
mount -n -t sysfs sysfs /root/sys
|
mount -n -t sysfs sysfs /booster.root/sys
|
||||||
mount -n -t tmpfs tmpfs /root/run
|
mount -n -t tmpfs tmpfs /booster.root/run
|
||||||
|
|
||||||
|
|
||||||
### Switch to new root
|
### Switch to new root
|
||||||
#switch_root "/root/" "/root/sbin/init"
|
#switch_root "/booster.root/" "/booster.root/sbin/init"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
chmod +x /usr/share/booster/hooks-early/pika_live.sh
|
chmod +x /usr/share/booster/hooks-early/pika_live.sh
|
||||||
@ -65,7 +64,9 @@ extra_files: busybox
|
|||||||
enable_lvm: true
|
enable_lvm: true
|
||||||
modules_force_load: usbhid
|
modules_force_load: usbhid
|
||||||
universal: true
|
universal: true
|
||||||
modules: *
|
modules: loop,*
|
||||||
enable_hooks: true
|
enable_hooks: true
|
||||||
enable_plymouth: true
|
enable_plymouth: true
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
update-initramfs -c -k all
|
||||||
|
Loading…
Reference in New Issue
Block a user