nixpkgs/boot/boot.sh
Eelco Dolstra 91a5fe9eb0 * Networking now works in the UML machine. Masquerading for the tun
device should be enabled on the host in order for the UML machine to
  be able to talk to the Internet.

svn path=/nixu/trunk/; revision=806
2004-02-19 12:49:00 +00:00

32 lines
618 B
Bash

#! @bash@/bin/sh -e
. @out@/bin/env.sh
echo "--- Nix ---"
echo "mounting /proc..."
mount -n -t proc none /proc
echo "checking /dev/root..."
e2fsck -y /dev/root || test "$?" -le 1
echo "remounting / writable..."
mount -n -o remount,rw /dev/root /
echo "mounting /mnt/host..."
mount -n -t hostfs none /mnt/host
echo "setting up hostname..."
hostname uml
echo "enabling loopback interface..."
ifconfig lo 127.0.0.1
echo "enabling ethernet interface..."
ifconfig eth0 $(cat /etc/networking/local-ip) up
echo "setting up routing table..."
route add default gw $(cat /etc/networking/gateway-ip)
echo "boot done."