2 # example of brho's kvm-up.sh, which I run every time I boot my dev machine.
3 # you'll need to change paths, usernames, and other things for your machine.
5 # set up networking. feel free to comment this out.
9 ifconfig tap0 0.0.0.0 up
12 /etc/init.d/net.br0 start
13 /etc/init.d/dnsmasq start
15 # set up some variables
16 MNTDIR=/home/brho/classes/ros/ros-kernel/mnt
18 HDDIMG=$MNTDIR/hdd.img
21 modprobe loop max_part=10
22 losetup /dev/loop5 $HDDIMG
24 mount -o sync /dev/loop5p1 $MNTPOINT
25 chown -R brho:brho $MNTPOINT
27 ## Alternative method if you have the loopback built into the kernel
28 ## mount the hdd image with a hardcoded offset, specific to the image we
30 #losetup /dev/loop5 $HDDIMG
31 #losetup -o 1048576 /dev/loop6 /dev/loop5
32 #mount -o sync /dev/loop6 $MNTPOINT
33 #chown -R brho:brho $MNTPOINT