clean up sxript
This commit is contained in:
parent
4f55b9e695
commit
5d5a11492f
@ -24,7 +24,15 @@ if [ -z "$LIVE_MEDIA" ]
|
|||||||
then
|
then
|
||||||
busybox echo '[PikaOS Booster Live Hook]: Live medium could not be found among standard blocks.'
|
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.'
|
busybox echo '[PikaOS Booster Live Hook]: Attempting Ventoy mapping hook.'
|
||||||
/ventoy/busybox/sh /ventoy/hook/debian/disk_mount_hook.sh
|
if [ -f '/usr/share/booster/ventoy_injection.tar.xz' ]
|
||||||
|
then
|
||||||
|
busybox echo '[PikaOS Booster Live Hook]: Extracting Ventoy injection archive.'
|
||||||
|
busybox tar -xvf '/usr/share/booster/ventoy_injection.tar.xz' -C /
|
||||||
|
/ventoy/busybox/sh /ventoy/hook/debian/disk_mount_hook.sh
|
||||||
|
else
|
||||||
|
busybox echo '[PikaOS Booster Live Hook]: Error: Ventoy injection archive could not be found!'
|
||||||
|
exit 31
|
||||||
|
fi
|
||||||
if [ -f "/dev/mapper/ventoy" ]
|
if [ -f "/dev/mapper/ventoy" ]
|
||||||
then
|
then
|
||||||
busybox echo '[PikaOS Booster Live Hook]: Live medium found on /dev/mapper/ventoy !'
|
busybox echo '[PikaOS Booster Live Hook]: Live medium found on /dev/mapper/ventoy !'
|
||||||
@ -38,38 +46,27 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
### Create mounting dirs
|
### Create mounting dirs
|
||||||
|
busybox echo '[PikaOS Booster Live Hook]: Creating mountpoints...'
|
||||||
busybox mkdir -p /mnt/medium /mnt/filesystem /mnt/overlay /booster.root
|
busybox mkdir -p /mnt/medium /mnt/filesystem /mnt/overlay /booster.root
|
||||||
|
|
||||||
### Mount live medium
|
### Mount live medium
|
||||||
|
busybox echo '[PikaOS Booster Live Hook]: Mounting Live medium...'
|
||||||
busybox mount -o ro $LIVE_MEDIA /mnt/medium
|
busybox mount -o ro $LIVE_MEDIA /mnt/medium
|
||||||
|
|
||||||
### Create loop from squashfs
|
### Create loop from squashfs
|
||||||
|
busybox echo '[PikaOS Booster Live Hook]: Mounting Live medium squashfs image...'
|
||||||
#losetup /dev/loop69 /mnt/medium/live/filesystem.squashfs
|
|
||||||
## Mount squashfs loop
|
|
||||||
#mount -o ro /dev/loop69 /mnt/filesystem
|
|
||||||
busybox mount -o loop,ro /mnt/medium/live/filesystem.squashfs /mnt/filesystem
|
busybox mount -o loop,ro /mnt/medium/live/filesystem.squashfs /mnt/filesystem
|
||||||
|
|
||||||
### Mount tmpfs on ram
|
### Mount tmpfs on ram
|
||||||
|
busybox echo '[PikaOS Booster Live Hook]: Creating Ramfs...'
|
||||||
#mount -t tmpfs -o size="$TMPFS_SIZE",mode=1777 overlay_tmpfs /mnt/overlay
|
|
||||||
busybox mount -t tmpfs -o mode=1777 overlay_tmpfs /mnt/overlay
|
busybox mount -t tmpfs -o mode=1777 overlay_tmpfs /mnt/overlay
|
||||||
|
|
||||||
### Create overlay dirs
|
### Create overlay dirs
|
||||||
busybox mkdir -p /mnt/overlay/upper /mnt/overlay/work
|
busybox mkdir -p /mnt/overlay/upper /mnt/overlay/work
|
||||||
|
|
||||||
### Create merged overlay
|
### Create merged overlay
|
||||||
|
busybox echo '[PikaOS Booster Live Hook]: Creating writable overlay Rootfs on ramfs...'
|
||||||
busybox mount -t overlay overlay -o lowerdir=/mnt/filesystem:/mnt/medium,upperdir=/mnt/overlay/upper,workdir=/mnt/overlay/work /booster.root
|
busybox mount -t overlay overlay -o lowerdir=/mnt/filesystem:/mnt/medium,upperdir=/mnt/overlay/upper,workdir=/mnt/overlay/work /booster.root
|
||||||
|
|
||||||
### mount kernel filesystems
|
|
||||||
#busybox mount -n -t devtmpfs devtmpfs /booster.root/dev
|
|
||||||
#busybox mount -n -t proc proc /booster.root/proc
|
|
||||||
#busybox mount -n -t sysfs sysfs /booster.root/sys
|
|
||||||
#busybox mount -n -t tmpfs tmpfs /booster.root/run
|
|
||||||
|
|
||||||
|
|
||||||
### Switch to new root
|
|
||||||
#busybox 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
|
||||||
|
Loading…
Reference in New Issue
Block a user