iPXE discussion forum
Boot from hard disk - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: Boot from hard disk (/showthread.php?tid=6775)



Boot from hard disk - PaavoN - 2012-12-07 11:14

Hi all

I'd like to use iPXE to check from HTTP server if OS re-installation is flagged. If yes, then load installer image. If not, then proceed with booting from hard disk.

This works nice if the BIOS boot order is HD first, then NIC and I press F12 to boot from NIC. If I set BIOS to boot first from NIC, then after 'exit'-command in iPXE script, the computer reboots and starts all over again using network boot. Tried this with two brands with same results.

Is the problem with the BIOS not correctly continuing with the boot order list ? Is there any command in iPXE with which I can boot specifically from hard disk ?

Thanks for great piece of software.

PaavoN


RE: Boot from hard disk - robinsmidsrod - 2012-12-07 21:00

If you have your computer set to network boot as first alternative, HDD must be set as second option to make "exit" work as it should.

If you for some reason can't get that to work, this has been known to work as an alternative.
Code:
# Boot the first local HDD
sanboot --no-describe --drive 0x80

With regards to your other question, I'm sure you can figure it out by looking at this example: https://gist.github.com/2234639

If not, come back again.


RE: Boot from hard disk - PaavoN - 2012-12-10 15:33

(2012-12-07 21:00)robinsmidsrod Wrote:  If you have your computer set to network boot as first alternative, HDD must be set as second option to make "exit" work as it should.

Tried this one and it didn't help, still rebooting from NIC on both my test laptops.

(2012-12-07 21:00)robinsmidsrod Wrote:  If you for some reason can't get that to work, this has been known to work as an alternative.
Code:
# Boot the first local HDD
sanboot --no-describe --drive 0x80

Well, this was exactly what I was looking for until I tried it Sad
HP laptop obeyed the spell but FSC brand just got stuck.

Found a dirty solution: when I try to load a non-existing image without cathing the error (eg. 'kernel dummy') it allways boots from hard disk after that ... That's not the way I would like to to do it though.

Any ideas would be highly appreciated.

- PaavoN -


RE: Boot from hard disk - robinsmidsrod - 2012-12-12 09:32

I would suggest you try to upgrade the BIOS of your motherboard. This seems like a bug (that hopefully someone fixed).


RE: Boot from hard disk - PaavoN - 2013-01-08 23:48

Took some time to get back to this issue again ....

(2012-12-12 09:32)robinsmidsrod Wrote:  I would suggest you try to upgrade the BIOS of your motherboard. This seems like a bug (that hopefully someone fixed).

That is not an option because there might be tens or hundreds of different BIOSes out in the field.

Why is it that when I try to load a non-existing image without catching the error (eg. 'kernel dummy') it always boots from hard disk after that ? ... Even on that Fujitsu laptop which otherwise gets stuck at the sanboot command.

PaavoN


RE: Boot from hard disk - robinsmidsrod - 2013-01-10 14:22

You might have luck with the information in here: http://ipxe.org/appnote/work_around_bios_halting_on_ipxe_exit


RE: Boot from hard disk - sebus - 2017-02-20 10:41

And what would we use for boot from first internal HD in UEFI mode?

sebus


RE: Boot from hard disk - NiKiZe - 2017-02-20 19:42

(2017-02-20 10:41)sebus Wrote:  And what would we use for boot from first internal HD in UEFI mode?

some firmware works correctly with just exit, others need exit 1 (error level) instead. Don't know if sanboot can be used as well now might be worth a shoot. Do note that exit only boots "next-device" there is no support to select which device that is from iPXE.


RE: Boot from hard disk - aggieNick02 - 2017-10-27 17:27

NiKiZe, your comment below solved my problem. I was experiencing this issue with PXE booting a Hyper-V VM. If the PXE boot did an exit, the machine would just go to a failed boot menu instead of falling through to the next boot option. Changing to "exit 1" caused it to fall through perfectly. Thanks! Smile
(2017-02-20 19:42)NiKiZe Wrote:  
(2017-02-20 10:41)sebus Wrote:  And what would we use for boot from first internal HD in UEFI mode?

some firmware works correctly with just exit, others need exit 1 (error level) instead. Don't know if sanboot can be used as well now might be worth a shoot. Do note that exit only boots "next-device" there is no support to select which device that is from iPXE.