initial ventoy thingies
This commit is contained in:
parent
d6c162ecb1
commit
4f55b9e695
@ -13,17 +13,35 @@ set -e
|
||||
|
||||
busybox mount -n -t proc proc /proc
|
||||
|
||||
busybox cat /proc/cmdline | busybox grep 'boot=live booster.loadcdrom' || exit 0
|
||||
busybox cat /proc/cmdline | busybox grep 'boot=live' || exit 0
|
||||
busybox echo '[PikaOS Booster Live Hook]: boot=live detected in kernel cmdline, running LiveISO hooks...'
|
||||
|
||||
### Config
|
||||
MEDIUM_LABEL="PikaOS 4"
|
||||
#TMPFS_SIZE="3G"
|
||||
busybox echo '[PikaOS Booster Live Hook]: Searching for Live medium...'
|
||||
LIVE_MEDIA="$(busybox findfs LABEL="PikaOS 4" | busybox head -n1)"
|
||||
|
||||
if [ -z "$LIVE_MEDIA" ]
|
||||
then
|
||||
busybox echo '[PikaOS Booster Live Hook]: Live medium could not be found among standard blocks.'
|
||||
busybox echo '[PikaOS Booster Live Hook]: Attempting Ventoy mapping hook.'
|
||||
/ventoy/busybox/sh /ventoy/hook/debian/disk_mount_hook.sh
|
||||
if [ -f "/dev/mapper/ventoy" ]
|
||||
then
|
||||
busybox echo '[PikaOS Booster Live Hook]: Live medium found on /dev/mapper/ventoy !'
|
||||
LIVE_MEDIA='/dev/mapper/ventoy'
|
||||
else
|
||||
busybox echo '[PikaOS Booster Live Hook]: Error: Live medium could not be found!'
|
||||
exit 32
|
||||
fi
|
||||
else
|
||||
busybox echo "[PikaOS Booster Live Hook]: Live medium found on $LIVE_MEDIA !"
|
||||
fi
|
||||
|
||||
### Create mounting dirs
|
||||
busybox mkdir -p /mnt/medium /mnt/filesystem /mnt/overlay /booster.root
|
||||
|
||||
### Mount live medium
|
||||
busybox mount -o ro "$(busybox findfs LABEL="$MEDIUM_LABEL" | busybox head -n1)" /mnt/medium
|
||||
busybox mount -o ro $LIVE_MEDIA /mnt/medium
|
||||
|
||||
### Create loop from squashfs
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user