# HG changeset patch # User Pascal Bellard # Date 1595666408 0 # Node ID fc5989c0337999691172211aff60e28e7b12aa96 # Parent 14a300e1bc9b8f8bad4ecb7207a237165e2e340c init: remove nr_inodes=0 diff -r 14a300e1bc9b -r fc5989c03379 init --- a/init Tue Jul 07 06:33:59 2020 +0000 +++ b/init Sat Jul 25 08:40:08 2020 +0000 @@ -13,7 +13,7 @@ # rootfssize= [RAMDISK] # size of / regarding the RAM size, default 90% # rootfsinodes= [RAMDISK] -# files count of / regarding the RAM size, default 0 (unlimited) +# files count of / regarding the RAM size # ### Indirect mode ; an initramfs is used to mount root from the hard disk. ### Any rootfs should fit, minimum required is slitaz-base. @@ -120,7 +120,7 @@ for i in $@; do echo "Loading module: $i" modprobe $i 2>/dev/null || - for j in $(find /lib/modules|sed "/\/$i.ko/!d"); do + for j in $(find /lib/modules /mnt/.fs*/lib/modules|sed "/\/$i.ko/!d" 2> /dev/null); do busybox insmod $j && break done done @@ -269,12 +269,11 @@ root=100 got tmpram r=$root -inodes=0 -got rootfsinodes && inodes=$root +got rootfsinodes && inodes=",nr_inodes=$root" root=90% got rootfssize [ $(busybox free|busybox awk '/Mem:/{print int(($4*100)/$3)}') -ge $r ] && - busybox mount -t tmpfs -o size=$root,nr_inodes=$inodes tmpfs /mnt && + busybox mount -t tmpfs -o size=$root$inodes tmpfs /mnt && export PATH=/mnt/bin:$PATH && for i in $(ls -a /); do case "$i" in @@ -287,7 +286,7 @@ esac done || fail 3mSkipped quit -mod squashfs 2>/dev/null || exit +grep -q squashfs /proc/filesystems || mod squashfs 2>/dev/null || exit msg aufs br=/mnt/.rw mkdir $br /mnt/.wd @@ -314,7 +313,8 @@ busybox mount -o ro -t squashfs /dev/loop$((l++)) /mnt/.$fs done while read type opt; do - mod $type && busybox mount -t $type -o $opt none /mnt && break + grep -q $type /proc/filesystems || mod $type || continue + busybox mount -t $type -o $opt none /mnt && break done <