Change Bios boot order after PXE installation

3

1

I'm doing a PXE installation.

I success to do it but I have a final problem and I don't know where to search to find this answer. After my installation I would like to switch from my network bios boot to a hard drive bios boot. If I don't do that, there is an infinite loop.

I know it's possible because it's exactly what happens after an installation from a usb stick.

I'm installing Debian 7 from an Ubuntu Server.

Does anyone have an idea to achieve this PXE installation?

Thank you in advance.

brcebn

Posted 2014-11-03T07:18:45.950

Reputation: 215

You didn't say what motherboard you have. Also, there's usually no need to permanently modify the boot order. Just fire up the boot selection dialog and choose PXE-KRAM. – Daniel B – 2014-11-03T07:31:23.260

Basically I change manually the order of my bios boot on al my computers to just plug it directly and let my PXE installation without looking at it. If it changes automatically at the end it would be better than wait during the boot to select the PXE installation. Is it really depending of the mother board? I'm doing it on a Gigabytes Brix BXCE 2955. – brcebn – 2014-11-03T07:42:50.900

Even with an unattended installation, your computer would only need to PXE-boot once. Yes, of course it depends. The boot order is a firmware setting, after all. – Daniel B – 2014-11-03T09:17:24.980

Then do you think it's possible to change this firmware setting directly from a shell script? Do you suggest me to start manually my PXE installation instead of changing bios order and hoping a final switch? – brcebn – 2014-11-03T09:26:13.177

Answers

1

  • It is prefered to use temporare selection for PXE boot depending on PC brand F12 for Dell, F9 and F10 for HP, ESC,..etc

  • Another option if you have permanent PXE boot as 1st choice. Add a PXE DEFAULT menu entry which boot first internal hard drive.

    LABEL localboot
    MENU LABEL ^Local boot
    TEXT HELP
    Bypass the SYSLINUX loader, and use the
    boot loader on your hard disk.
    ENDTEXT
    localboot 0x80
    

    If you don't want that for all machines, you can create a custom PXE config pxelinux.cfg/macaddress-or-ip. See PXE Boot Server Installation Steps in Ubuntu Server VM

user.dz

Posted 2014-11-03T07:18:45.950

Reputation: 538

1The second option would work excellently as it can then be controlled from the server and offer the OP a centrally controlled solution. – Kinnectus – 2015-05-28T09:47:11.117

1

On a real PC there's not a "standard" way to change the boot order from within a particular OS.

If you are PXE installing things on PCs with "empty" or "non-bootable" hard disks you could solve your problem setting the BIOS boot order where the PXE option must always come after the HDD boot option. Then when you initially boot your PC the HDD is not bootable therefore the BIOS will PXE boot. After the OS is installed (HDD becomes bootable) the regular HDD boot option will always take precedence.

If you are installing on PCs with already bootable HHDs you should set a temporary PXE option boot in BIOS. This option will be accessed by a combination of keys at boot time

Pat

Posted 2014-11-03T07:18:45.950

Reputation: 2 593

1

You could try installing in UEFI mode and changing the boot order using efibootmgr (--bootorder 1,3,2,... = explicitly set BootOrder (taken from man page).

user95310

Posted 2014-11-03T07:18:45.950

Reputation: