slitaz-boot-scripts rev 408

init: create missing block devices
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Aug 02 15:13:28 2015 +0200 (2015-08-02)
parents 1f15d8a06ea9
children e8f0c7c134f1
files init
line diff
     1.1 --- a/init	Sun Aug 02 11:03:52 2015 +0200
     1.2 +++ b/init	Sun Aug 02 15:13:28 2015 +0200
     1.3 @@ -13,7 +13,7 @@
     1.4  # rootfssize= [RAMDISK]
     1.5  #         size of / regarding the RAM size, default 90%
     1.6  # rootfsinodes= [RAMDISK]
     1.7 -#         files count of / regarding the RAM size, 0 (unlimited)
     1.8 +#         files count of / regarding the RAM size, default 0 (unlimited)
     1.9  #
    1.10  ### Indirect mode ; an initramfs is used to mount root from the hard disk.
    1.11  ### Any rootfs should fit, minimum required is slitaz-base.
    1.12 @@ -166,6 +166,10 @@
    1.13  	busybox mount -t proc proc /proc
    1.14  	busybox mount -t sysfs sys /sys
    1.15  	busybox mount -t tmpfs tmpfs /run
    1.16 +	for i in /sys/block/*/dev /sys/block/*/*/dev ; do
    1.17 +		n=/dev/$(basename ${i%/dev})
    1.18 +		[ -e $n ] || mknod $n b $(sed 's/:/ /' < $i)
    1.19 +	done
    1.20  	x=/sbin/init; echo "[ -x $x ] && exec $x" >/run/init
    1.21  	$0 log 2>&1 | tee /run/boot.log
    1.22  	busybox umount /proc