I wanted to be able to install Win7 over PXE but got a head acke when I read a few tutorials about it and thought to myself there should be a easier quicker way. Indeed there is using AOE (ATA Over Ethernet). I found a nice howto here but it is aimed at a Windows Server. I came up with a way to do this in Linux.
This will work on Debia Squeeze and Wheezy. I have not tried this with the Windows 7 CD, only tried this with my jump drive.
Software needed
- Base system of Debian
- DNSMasq – via APT
- iPXE boot CD
- Syslinux – via APT
- vblade – via APT
- Windows 7 or 8 in jump drive form
Install DNSMasq and Syslinux with apt — sudo apt-get install dnsmasq syslinux — Configure DNSMasq with nano or vi to your liking — sudo nano /etc/dnsmasq.conf –. You can use my config if yo wish.
PROMPT 0
MENU TITLE PXE Boot
TIMEOUT 100
LABEL Install Win7
MENU LABEL Install Win7
kernel ipxe.krn
initrd conf.ipxe
Just save and exit. Now download iPXE’s boot CD and mount it. — wget http://boot.ipxe.org/ipxe.iso — to mount it issue this — sudo mount -o loop ipxe.iso /media — cd in to /media and copy boot.cat and ipxe.krn to the root of the tftpboot directory. — sudo cp boot.cat ipxe.krn /tftpboot — unmount the ipxe.iso –sudo umount /media — Now we need a config file for iPXE to boot a AOE. — sudo nano /tftpboot/conf.ipxe — It should look like this
#!ipxe
dhcp net0
set keep-san 1
sanboot aoe:e0.1
In all tha was the hard part. The easy part is setting up AOE. Debian’s kernel has the module ready to go but has to be enabled. — modprobe aoe — now we need to add it to the modules file so it is loaded when the system boots. — sudo nano /etc/modules — Should look like this
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with “#” are ignored.
# Parameters can be specified after the module name.
aoe
loop
Now install vblade — sudo apt-get install vblade — Copy the Win7 or 8 USB jump drive using disk dump. I put mine in the /tftpboot/win7 directory. — sudo mkdir -p /tftpboot/win7 — — sudo dd if=/dev/sde of=/tftpboot/win7/win7.img bs=4M — It will take about five or ten minutes to copy. When finished we can start vblade. — sudo vbladed 0 1 eth1 /tftpboot/win7/win7.img — You can create a script or even issue it in the rc.local file to start everytime the system boots. All what is left is to restart DNSMasq and test it out with Virutal Box or a real system. — sudo /etc/init.d/dnsmasq restart —
Hope you’ll enjoy this tutorial.