Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuxfight3r/3321fccf74df49d59e02ebd766f6a8f3 to your computer and use it in GitHub Desktop.
Save tuxfight3r/3321fccf74df49d59e02ebd766f6a8f3 to your computer and use it in GitHub Desktop.
Quick iPXE & Windows7-on-iSCSI howto
#!ipxe
# I like to keep my bootstrap file clean and as reusable as possible
# If you don't understand the following path you should probably
# read a little bit more about iscsi and what IQN represents.
set iscsi-rootfs iscsi:10.0.0.1::::iqn.2012-12.com.yourname.yournetwork.sanhost:targetname
# SAN rootfs must be connected as drive 0x80, otherwise installer
# grumbles about not being able to boot from iSCSI drive and refuses to
# continue.
sanhook --drive 0x80 ${iscsi-rootfs}
# For iPXE newbies: you can use either absolute or relative paths for
# kernel path (in this particular example it's wimboot executable)
kernel wimboot
# First parameter is the path of file to load, to have things clean
# you can move it into different directory, but i will store everything
# together to keep this howto as simple as possible
initrd bootmgr bootmgr
initrd bcd BCD
initrd boot.sdi boot.sdi
initrd boot.wim boot.wim
boot

Quick Installation Howto

  1. Make sure you have successfuly set up iPXE, iSCSI target (iSCSI Enterprise Target on Debian works fine for me), TFTP server and some time to spend.
  2. Get yourself a NTFS-formatted USB stick.
  3. Copy contents of installation DVD into mentioned USB stick.
  4. Get a copy of wimboot and load it into your TFTP server.
  5. Copy boot/bcd, boot/boot.sdi, sources/boot.wim and bootmgr into TFTP root as well.
  6. Create the bootstrap script (included bootstrap.ipxe file) and boot your machine. You could type it by hand as well, but it may be quite inconvenient when you have to reboot 3 times in a row. Keep in mind that Windows installer tends to hang on the splashscreen. It's a known issue of WinPE, just wait a couple of minutes. Connect your USB drive containing installation disk and make sure you choose the right drive to install OS on.
  7. After installation replace sanhook with sanboot in your bootstrap file.
  8. Make sure your system boots and finalizes setup. Afterwards make sure it boots again.
  9. [...] Toast your working Windows on iSCSI target!

Troubleshooting

  1. diskpart list disk command may come in handy. If you don't remember - Shift+F10 opens commandline in Windows installator.
  2. It's a known issue that Windows routes trafic to SAN through default gateway. It may obviously cause throughput reduction when your gateway has limited bandwidth. Quick fix is to supply SAN IP as a default gateway for your machine (and probably fiddling with routes on a working system)
  3. Remember! Installation of x64 system off "multiarch" installation DVD onto iSCSI target is impossible. You have to use x64-only image to install 64-bit system.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment