1.1 --- a/uml-do Sat Mar 10 00:34:10 2012 +0100
1.2 +++ b/uml-do Sat Mar 10 00:54:42 2012 +0100
1.3 @@ -13,7 +13,7 @@
1.4 PROGNAME=`basename "$0"`
1.5
1.6 if [ ! "$1" ] || [ "$1" = '--help' ]; then
1.7 - echo "Usage: $PROGNAME <memory-with-unit> [ --net ]" 1>&2
1.8 + echo "Usage: $PROGNAME <memory-with-unit> [ --net ] [ --initrd <initrd-file> <filesystem-image> ]" 1>&2
1.9 exit 1
1.10 fi
1.11
1.12 @@ -31,6 +31,16 @@
1.13 shift 1
1.14 fi
1.15
1.16 +# Test for initrd.
1.17 +
1.18 +if [ "$1" = '--initrd' ]; then
1.19 + shift 1
1.20 + INITRD_OPTIONS="initrd=$1 root=/dev/ram load_ramdisk=1 ubd2=$2"
1.21 + shift 2
1.22 +else
1.23 + INITRD_OPTIONS=
1.24 +fi
1.25 +
1.26 # Now we start the virtual machine...
1.27
1.28 -./linux ubd0="$IMAGE" ubd1="$SWAPIMAGE" mem="$UML_MEMORY" "$UML_NETWORKING" $*
1.29 +./linux ubd0="$IMAGE" ubd1="$SWAPIMAGE" mem="$UML_MEMORY" con0=fd:0,fd:1 con=none "$UML_NETWORKING" $INITRD_OPTIONS $*