Sometimes you need to proceed real installation process of some GNU/Linux distribution due to run it using some virtualization software afterwards. The simplest way to do it is to use QEMU emulation software that is pretty easy to use. Sometimes networking is needy to have as weel. From this howto you will learn howto install Debian GNU/Linux using QEMU to a virtual hard drive using network installation enabled installation CD-ROM image of Debian GNU/Linux distribution (although this howto can be used to any other GNU/Linux distribution as well and, perhaps, for some other operational systems too). You will also (and mainly) learn howto setup virtual TAP virtually bridged networking too. CREATING VIRTUAL BRIDGE INTERFACE Prerequisities: bridge-utils, iproute2, iptables Howto: 1. setup virtual bridge interface brg0 2. set the bridge up 3. add address on the bridge (example: 10.0.0.1/24) 4. setup masquerade /sbin/brctl addbr brg0 /sbin/brctl setfd brg0 1 /sbin/brctl sethello brg0 1 /sbin/brctl stp brg0 off /sbin/ip link set up dev brg0 /sbin/ip address add 10.0.0.1/24 brd + dev brg0 /sbin/iptables -t nat -I POSTROUTING -s 10.0.0.0/24 -j MASQUERADE Note: instead of adding an specific address to the virtual bridge interface you can setup DHCP daemon to listen on it. DESTROYING VIRTUAL BRIDGE INTERFACE Prerequisities: bridge-utils, iproute2, iptables Howto: 1. delete masquerade 2. flush IP addresses from the bridge 3. set the bridge interface down 4. delete the bridge virtual interface brg0 /sbin/iptables -t nat -D POSTROUTING -s 10.0.0.0/24 -j MASQUERADE /sbin/ip address flush dev brg0 /sbin/ip link set down dev brg0 /sbin/brctl delbr brg0 CREATE VIRTUAL TAP INTERFACE AND ADD IT TO A BRIDGE Prerequisities: uml-utilities, iproute2, bridge-utils Howto: 1. create virtual TAP interface tap0 2. set it up 3. add it to a bridge brg0 /sbin/tunctl -u username -t tap0 /sbin/ip link set up dev tap0 /sbin/brctl addif brg0 tap0 REMOVE VIRTUAL TAP INTERFACE FROM A BRIDGE AND DESTROY IT Prerequisities: uml-utilities, iproute2, bridge-utils Howto: 1. remove the virtual TAP interface from a bridge 2. set the virtual TAP interface down 2. destroy the virtual TAP interface tap0 /sbin/brctl delif brg0 tap0 /sbin/ip link set down dev tap0 /sbin/tunctl -d tap0 START QEMU USING NETWORK INSTALLATION CD Prerequisities: qemu, dd, some GNU/Linux installation CD (Debian Etch) Howto: 1. setup virtual hard drive space using dd utility 2. start QEMU with bridged TAP networking dd if=/dev/zero of=debian.img bs=1M count=1 seek=4096 Next command will run QEMU with 256 Mb of shared RAM to use, debian.img file as /dev/hda inside of the running system, debian-netinst.iso as /dev/cdrom inside the running system, network interface eth0 connected to the virtual TAP interface in the guest system and will boot from the virtual CD-ROM device. /usr/bin/qemu -m 256 -hda debian.img -cdrom debian-netinst.iso -localtime \ -net nic,vlan=0 -net tap,vlan=0,ifname=tap0,script=/bin/true \ -boot d