iPXE discussion forum

Full Version: sanboot reboots the pc if i use something else than 0x80
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
im attemping to make the iPXE boot from iSCSI target and if fails, to boot from a iSCSI attached virtual DVD.

This is petty much it

Code:
#!ipxe
set server-ip 192.168.88.254
set target-name iqn.2006-03.com.kernsafe:Shivan-PC.VhdDisk0
set dvd-target iqn.2006-03.com.kernsafe:Shivan-PC.VirtualCD0

dhcp
set keep-san 1
sanboot iscsi:${server-ip}::::${target-name} || sanboot --drive 0x81 iscsi:${server-ip}::::${dvd-target}

The idea is to first attempt to boot from the iscsi hdd, if fails (because is a new disk and its empty), to boot from the virtual iscsi dvd to install the O.S.

But as soon as the sanboot --drive 0x81 is executed the pc reboots, no matter if is a real pc or virtualbox.

The only way that it boots the dvd image is using 0x80 for it, and hook the iscsi hdd to 0x81

Code:
#!ipxe
set server-ip 192.168.88.254
set target-name iqn.2006-03.com.kernsafe:Shivan-PC.VhdDisk0
set dvd-target iqn.2006-03.com.kernsafe:Shivan-PC.VirtualCD0

dhcp
set keep-san 1
sanboot iscsi:${server-ip}::::${target-name} || goto start

:start
set keep-san 0
sanunhook
set keep-san 1
sanhook --drive 0x81 iscsi:${server-ip}::::${target-name}
sanboot --drive 0x80 iscsi:${server-ip}::::${dvd-target}

But then the windows installer does not work, it says it cant install on that drive because the hardware may not be able to boot from it.
The recommended way to boot windows installers is to use wimboot instead of sanbooting.

You shouldn't need to give drive at all it should be automatic.
also keep-san seems redundant

http://ipxe.org/cmd/sanboot
Well i ended using wimboot + sanhook to the iscsi virtual dvd since i need the windows sources files in order for install to work. This way i dont need a custom winpe.

Thanks.
Reference URL's