1.1 --- a/uml-do Wed Nov 13 00:14:19 2013 +0100
1.2 +++ b/uml-do Wed Nov 13 00:14:50 2013 +0100
1.3 @@ -28,7 +28,7 @@
1.4 PROGNAME=`basename "$0"`
1.5
1.6 if [ ! "$1" ] || [ "$1" = '--help' ]; then
1.7 - echo "Usage: $PROGNAME <memory-with-unit> [ --net ] [ --initrd <initrd-file> <filesystem-image> ]" 1>&2
1.8 + echo "Usage: $PROGNAME <memory-with-unit> [ --net ] [ --initrd <initrd-file> [ --root <device> ] <filesystem-image> ]" 1>&2
1.9 exit 1
1.10 fi
1.11
1.12 @@ -49,13 +49,23 @@
1.13 # Test for initrd.
1.14
1.15 if [ "$1" = '--initrd' ]; then
1.16 + INITRD=$2
1.17 + shift 2
1.18 + if [ "$1" = '--root' ]; then
1.19 + ROOTDEVICE=$2
1.20 + shift 2
1.21 + else
1.22 + ROOTDEVICE=/dev/ram
1.23 + fi
1.24 + ISOIMAGE=$1
1.25 + INITRD_OPTIONS="initrd=$INITRD root=$ROOTDEVICE load_ramdisk=1 ubd2=$ISOIMAGE"
1.26 shift 1
1.27 - INITRD_OPTIONS="initrd=$1 root=/dev/ram load_ramdisk=1 ubd2=$2"
1.28 - shift 2
1.29 else
1.30 INITRD_OPTIONS=
1.31 fi
1.32
1.33 -# Now we start the virtual machine...
1.34 +# Now we start the virtual machine.
1.35 +# Note that con0 is not necessarily a login console, so a login prompt may not
1.36 +# appear on standard input/output.
1.37
1.38 ./linux ubd0="$IMAGE" rw ubd1="$SWAPIMAGE" rw mem="$UML_MEMORY" con0=fd:0,fd:1 con=pts "$UML_NETWORKING" $INITRD_OPTIONS $*