userinstall

uml-make-devices

41:08e2ba334694
2012-03-10 Paul Boddie Added support for booting from initrd files extracted from ISO installer images (for example).
     1 #!/bin/sh     2      3 if [ ! "$1" ]; then     4         echo "Need an image directory for the UML system." 1>&2     5         exit 1     6 fi     7      8 IMAGEDIR=$1     9     10 echo "Creating special UML devices..." 1>&2    11 if [ ! -e "$IMAGEDIR/dev/ubda" ]; then    12         for i in `seq 0 7`; do    13                 let=$(echo $i|tr '0-7' 'a-z')    14                 mknod "$IMAGEDIR/dev/ubd$let" b 98 $((16 * $i))    15                 for p in `seq 1 16`; do    16                         mknod "$IMAGEDIR/dev/ubd$let$p" b 98 $((16 * $i + $p))    17                 done    18         done    19 fi    20     21 echo "Initialising device files..." 1>&2    22 chroot "$IMAGEDIR" /bin/sh -c 'mount -t proc proc /proc; cd /dev; ./MAKEDEV generic; umount /proc'