This commit is contained in:
Ward from fusion-voyager-3 2024-12-16 03:58:45 +03:00
parent 8659ac69c4
commit c24661c44a

View File

@ -18,31 +18,28 @@ MEDIUM_LABEL="PikaOS 4"
#TMPFS_SIZE="3G" #TMPFS_SIZE="3G"
### Create mounting dirs ### Create mounting dirs
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
mount -o ro "$(findfs LABEL="$MEDIUM_LABEL" | head -n1)" /mnt/medium busybox mount -o ro "$(busybox findfs LABEL="$MEDIUM_LABEL" | busybox head -n1)" /mnt/medium
### Load loop module if not already loaded
modprobe loop
### Create loop from squashfs ### Create loop from squashfs
#losetup /dev/loop69 /mnt/medium/live/filesystem.squashfs #losetup /dev/loop69 /mnt/medium/live/filesystem.squashfs
## Mount squashfs loop ## Mount squashfs loop
#mount -o ro /dev/loop69 /mnt/filesystem #mount -o ro /dev/loop69 /mnt/filesystem
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
#mount -t tmpfs -o size="$TMPFS_SIZE",mode=1777 overlay_tmpfs /mnt/overlay #mount -t tmpfs -o size="$TMPFS_SIZE",mode=1777 overlay_tmpfs /mnt/overlay
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
mkdir -p /mnt/overlay/upper /mnt/overlay/work busyboxmkdir -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 /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 ### mount kernel filesystems
#mount -n -t devtmpfs devtmpfs /booster.root/dev #mount -n -t devtmpfs devtmpfs /booster.root/dev