Or, you can replace the device name of the mount variable by the UUID or LABEL returned by blkid:mount: mounting /dev/slitaz-318 on /mnt failed: No such file or directory
tmpfs: Bad value '90%' for mount option 'nr_inodes'
1.
root@slitaz:~# cat /proc/cmdline
mount=slitaz-318 loopfs=slitaz.fs
2.
root@slitaz:~# head -12 /var/log/boot.log
Mount slitaz-318...
mount: mounting /dev/slitaz-318 on /mnt failed: No such file or directory
Sleep 2 seconds...mount: mounting /dev/slitaz-318 on /mnt failed: No such file or directory
Into file slitaz.fs...
losetup: /mnt/slitaz.fs: No such file or directory
Switching / to tmpfs...
mount: mounting tmpfs on /mnt failed: Invalid argument
[ Skipped ]
Loading module: squashfs
Processing: /etc/init.d/rcS...
Mounting proc filesystem on /proc [ Done ]
Mounting devtmpfs filesystem on: /dev [ Done ]
3.
root@slitaz:~# grep tmpfs /var/log/dmesg.log
tmpfs: Bad value '90%' for mount option 'nr_inodes'
root@slitaz:~# blkid | grep sdb
/dev/sdb1: LABEL="slitaz-318" UUID="b9f5cf75-b3a0-4c86-bd48-3933094a7551" TYPE="ext4" PARTUUID="02190218-01"
4.
root@slitaz:~# df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 3.6G 212.0K 3.6G 0% /run
devtmpfs 3.6G 0 3.6G 0% /dev
tmpfs 3.6G 0 3.6G 0% /dev/shm
tmpfs 3.6G 0 3.6G 0% /var/lock
5.
root@slitaz:~# mount
rootfs on / type rootfs (rw,relatime)
tmpfs on /run type tmpfs (rw,relatime)
proc on /proc type proc (rw,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=3798496k,nr_inodes=949624,mode=755)
sysfs on /sys type sysfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,relatime)
tmpfs on /var/lock type tmpfs (rw,relatime)
usbfs on /proc/bus/usb type usbfs (rw,relatime)
6.
root@slitaz:~# grep -A 13 'mnt()' /init
mnt()
{
r=$(blkid 2> /dev/null | sed "s|\"||g;/$(echo $root | tr / .)/!d;s|:.*||;q")
r=${r:-$root}
r=${r#/dev/}
r=/dev/${r%%/*}
d=${root#*$r}
busybox mount $r $1 && return
w=$(cat /sys/module/usb_storage/parameters/delay_use)
w=$((1+${w:-2}))
echo -n "Sleep $w seconds..."
sleep $w
busybox mount $r $1
}
7.
root@slitaz:~# grep -A 4 rootfsinodes /init
got rootfsinodes && 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 &&
root@slitaz:~#
root@slitaz:~# cat /proc/cmdline
mount=slitaz-318 loopfs=slitaz.fs
2.
root@slitaz:~# head -12 /var/log/boot.log
Mount slitaz-318...
mount: mounting /dev/slitaz-318 on /mnt failed: No such file or directory
Sleep 2 seconds...mount: mounting /dev/slitaz-318 on /mnt failed: No such file or directory
Into file slitaz.fs...
losetup: /mnt/slitaz.fs: No such file or directory
Switching / to tmpfs...
mount: mounting tmpfs on /mnt failed: Invalid argument
[ Skipped ]
Loading module: squashfs
Processing: /etc/init.d/rcS...
Mounting proc filesystem on /proc [ Done ]
Mounting devtmpfs filesystem on: /dev [ Done ]
3.
root@slitaz:~# grep tmpfs /var/log/dmesg.log
tmpfs: Bad value '90%' for mount option 'nr_inodes'
root@slitaz:~# blkid | grep sdb
/dev/sdb1: LABEL="slitaz-318" UUID="b9f5cf75-b3a0-4c86-bd48-3933094a7551" TYPE="ext4" PARTUUID="02190218-01"
4.
root@slitaz:~# df -h
Filesystem Size Used Available Use% Mounted on
tmpfs 3.6G 212.0K 3.6G 0% /run
devtmpfs 3.6G 0 3.6G 0% /dev
tmpfs 3.6G 0 3.6G 0% /dev/shm
tmpfs 3.6G 0 3.6G 0% /var/lock
5.
root@slitaz:~# mount
rootfs on / type rootfs (rw,relatime)
tmpfs on /run type tmpfs (rw,relatime)
proc on /proc type proc (rw,relatime)
devtmpfs on /dev type devtmpfs (rw,relatime,size=3798496k,nr_inodes=949624,mode=755)
sysfs on /sys type sysfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,relatime)
tmpfs on /var/lock type tmpfs (rw,relatime)
usbfs on /proc/bus/usb type usbfs (rw,relatime)
6.
root@slitaz:~# grep -A 13 'mnt()' /init
mnt()
{
r=$(blkid 2> /dev/null | sed "s|\"||g;/$(echo $root | tr / .)/!d;s|:.*||;q")
r=${r:-$root}
r=${r#/dev/}
r=/dev/${r%%/*}
d=${root#*$r}
busybox mount $r $1 && return
w=$(cat /sys/module/usb_storage/parameters/delay_use)
w=$((1+${w:-2}))
echo -n "Sleep $w seconds..."
sleep $w
busybox mount $r $1
}
7.
root@slitaz:~# grep -A 4 rootfsinodes /init
got rootfsinodes && 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 &&
root@slitaz:~#