Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Boot from hard disk
2012-12-07, 11:14
Post: #1
Boot from hard disk
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
Find all posts by this user
Quote this message in a reply
2012-12-07, 21:00 (This post was last modified: 2012-12-07 21:02 by robinsmidsrod.)
Post: #2
RE: Boot from hard disk
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
2012-12-10, 15:33
Post: #3
RE: Boot from hard disk
(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 -
Find all posts by this user
Quote this message in a reply
2012-12-12, 09:32
Post: #4
RE: Boot from hard disk
I would suggest you try to upgrade the BIOS of your motherboard. This seems like a bug (that hopefully someone fixed).
Visit this user's website Find all posts by this user
Quote this message in a reply
2013-01-08, 23:48
Post: #5
RE: Boot from hard disk
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
Find all posts by this user
Quote this message in a reply
2013-01-10, 14:22
Post: #6
RE: Boot from hard disk
You might have luck with the information in here: http://ipxe.org/appnote/work_around_bios..._ipxe_exit
Visit this user's website Find all posts by this user
Quote this message in a reply
2017-02-20, 10:41
Post: #7
RE: Boot from hard disk
And what would we use for boot from first internal HD in UEFI mode?

sebus
Find all posts by this user
Quote this message in a reply
2017-02-20, 19:42
Post: #8
RE: Boot from hard disk
(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.

Use GitHub Discussions
VRAM bin
Visit this user's website Find all posts by this user
Quote this message in a reply
2017-10-27, 17:27
Post: #9
RE: Boot from hard disk
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.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)