# HG changeset patch # User Paul Boddie # Date 1331337282 -3600 # Node ID d355c7a795140155097795c16ec0acd0aabb48f7 # Parent 08e2ba334694904b3fadd955bc9dfbc2b0670ac6 Added initrd options and made the console use the standard input and output of the main process. diff -r 08e2ba334694 -r d355c7a79514 uml-do --- a/uml-do Sat Mar 10 00:34:10 2012 +0100 +++ b/uml-do Sat Mar 10 00:54:42 2012 +0100 @@ -13,7 +13,7 @@ PROGNAME=`basename "$0"` if [ ! "$1" ] || [ "$1" = '--help' ]; then - echo "Usage: $PROGNAME [ --net ]" 1>&2 + echo "Usage: $PROGNAME [ --net ] [ --initrd ]" 1>&2 exit 1 fi @@ -31,6 +31,16 @@ shift 1 fi +# Test for initrd. + +if [ "$1" = '--initrd' ]; then + shift 1 + INITRD_OPTIONS="initrd=$1 root=/dev/ram load_ramdisk=1 ubd2=$2" + shift 2 +else + INITRD_OPTIONS= +fi + # Now we start the virtual machine... -./linux ubd0="$IMAGE" ubd1="$SWAPIMAGE" mem="$UML_MEMORY" "$UML_NETWORKING" $* +./linux ubd0="$IMAGE" ubd1="$SWAPIMAGE" mem="$UML_MEMORY" con0=fd:0,fd:1 con=none "$UML_NETWORKING" $INITRD_OPTIONS $*