I have a script being loaded from iPXE.
What I want is to make the script fall back to boot from a local hard drive (or CDROM) on failure to boot from the san.
The idea is allow installation of an Operating System onto the SAN target from local CDROM or USB drive.
I can't see anywhere that in the iPXE documentation that tells me how to boot from a local internal drive. How do I do this?
To answer my own question.
sanboot --no-describe --drive 0x80
or it might be 0x81 or 0x82
I was able to boot a linux USB drive on 0x82.
The normal way to do that is just to setup your local drive as the next item in the BIOS boot order and use the exit command in the iPXE shell or script.
In case of iPXE boot script failure / ending before doing proper configuration, your PC is supposed to boot using next boot option in order configured in BIOS. So, first of all - make sure that your boot order in BIOS is correct.
According to list of available iPXE commands (listed here - commands),
exit
command should do the job.BUT: from my experience it doesn't work for some BIOS. Not sure if it is bug on BIOS provider part or not. Out of two machines tested only one used next boot option after
exit
command. Second machine just opened boot settings and waited for user input.Workaround that solved question for both my machines was the following:
Specifying error level 1 prevented system from opening boot menu and booted into the next option instead.
Another possible workaround that also worked:
The idea here is to specify non-existing SAN device (0x80), so iPXE boot fails and boots into next boot option.
Recommended approach is to update your BIOS and use
exit
command. Only use workarounds like the ones above if proper way is not an option.