Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../lib/dracut/modules..../99squash
File: init-squash.sh
#!/bin/sh
[0] Fix | Delete
PATH=/bin:/sbin
[1] Fix | Delete
[2] Fix | Delete
[ -e /proc/self/mounts ] \
[3] Fix | Delete
|| (mkdir -p /proc && mount -t proc -o nosuid,noexec,nodev proc /proc)
[4] Fix | Delete
[5] Fix | Delete
grep -q '^sysfs /sys sysfs' /proc/self/mounts \
[6] Fix | Delete
|| (mkdir -p /sys && mount -t sysfs -o nosuid,noexec,nodev sysfs /sys)
[7] Fix | Delete
[8] Fix | Delete
grep -q '^devtmpfs /dev devtmpfs' /proc/self/mounts \
[9] Fix | Delete
|| (mkdir -p /dev && mount -t devtmpfs -o mode=755,noexec,nosuid,strictatime devtmpfs /dev)
[10] Fix | Delete
[11] Fix | Delete
grep -q '^tmpfs /run tmpfs' /proc/self/mounts \
[12] Fix | Delete
|| (mkdir -p /run && mount -t tmpfs -o mode=755,noexec,nosuid,strictatime tmpfs /run)
[13] Fix | Delete
[14] Fix | Delete
# Load required modules
[15] Fix | Delete
modprobe loop
[16] Fix | Delete
modprobe squashfs
[17] Fix | Delete
modprobe overlay
[18] Fix | Delete
[19] Fix | Delete
# Mount the squash image
[20] Fix | Delete
mount -t ramfs ramfs /squash
[21] Fix | Delete
mkdir -p /squash/root /squash/overlay/upper /squash/overlay/work
[22] Fix | Delete
mount -t squashfs -o ro,loop /squash-root.img /squash/root
[23] Fix | Delete
[24] Fix | Delete
# Setup new root overlay
[25] Fix | Delete
mkdir /newroot
[26] Fix | Delete
mount -t overlay overlay -o lowerdir=/squash/root,upperdir=/squash/overlay/upper,workdir=/squash/overlay/work/ /newroot/
[27] Fix | Delete
[28] Fix | Delete
# Move all mount points to new root to prepare chroot
[29] Fix | Delete
mount --move /squash /newroot/squash
[30] Fix | Delete
[31] Fix | Delete
# Jump to new root and clean setup files
[32] Fix | Delete
SYSTEMD_IN_INITRD=lenient exec switch_root /newroot /init
[33] Fix | Delete
[34] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function