iPXE discussion forum
sanboot reboots the pc if i use something else than 0x80 - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: sanboot reboots the pc if i use something else than 0x80 (/showthread.php?tid=10529)



sanboot reboots the pc if i use something else than 0x80 - shivansps - 2017-11-11 20:10

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.


RE: sanboot reboots the pc if i use something else than 0x80 - NiKiZe - 2017-11-12 11:29

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


RE: sanboot reboots the pc if i use something else than 0x80 - shivansps - 2017-11-13 03:57

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.