First problem. The default ROM file is about 68KB when compiled. This unfortunately is too big. We have a limit of 64KB in the BIOS file so to shrink our file, we’re gonna have to cut some features out of the ROM. To do this, we need to edit the general.h file to remove some item definitions.
[root@localhost ~]# lspci 00:00.0 Host bridge: Intel Corporation 5500 I/O Hub to ESI Port (rev 22) 00:01.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 1 (rev 22) 00:03.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 3 (rev 22) 00:07.0 PCI bridge: Intel Corporation 5520/5500/X58 I/O Hub PCI Express Root Port 7 (rev 22) 00:13.0 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub I/OxAPIC Interrupt Controller (rev 22) 00:14.0 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub System Management Registers (rev 22) 00:14.1 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub GPIO and Scratch Pad Registers (rev 22) 00:14.2 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub Control Status and RAS Registers (rev 22) 00:14.3 PIC: Intel Corporation 7500/5520/5500/X58 I/O Hub Throttle Registers (rev 22) 00:16.0 System peripheral: Intel Corporation 5520/5500/X58 Chipset QuickData Technology Device (rev 22) 00:16.1 System peripheral: Intel Corporation 5520/5500/X58 Chipset QuickData Technology Device (rev 22) 00:16.2 System peripheral: Intel Corporation 5520/5500/X58 Chipset QuickData Technology Device (rev 22) 00:16.3 System peripheral: Intel Corporation 5520/5500/X58 Chipset QuickData Technology Device (rev 22) 00:16.4 System peripheral: Intel Corporation 5520/5500/X58 Chipset QuickData Technology Device (rev 22) 00:16.5 System peripheral: Intel Corporation 5520/5500/X58 Chipset QuickData Technology Device (rev 22) 00:16.6 System peripheral: Intel Corporation 5520/5500/X58 Chipset QuickData Technology Device (rev 22) 00:16.7 System peripheral: Intel Corporation 5520/5500/X58 Chipset QuickData Technology Device (rev 22) 00:1d.0 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #1 00:1d.1 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #2 00:1d.2 USB controller: Intel Corporation 82801JI (ICH10 Family) USB UHCI Controller #3 00:1d.7 USB controller: Intel Corporation 82801JI (ICH10 Family) USB2 EHCI Controller #1 00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 90) 00:1f.0 ISA bridge: Intel Corporation 82801JIR (ICH10R) LPC Interface Controller 00:1f.2 SATA controller: Intel Corporation 82801JI (ICH10 Family) SATA AHCI Controller 00:1f.3 SMBus: Intel Corporation 82801JI (ICH10 Family) SMBus Controller 01:00.0 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) 01:00.1 Ethernet controller: Intel Corporation 82576 Gigabit Network Connection (rev 01) 05:04.0 VGA compatible controller: ASPEED Technology, Inc. ASPEED Graphics Family (rev 10) |
Through a lot of trial and error I was able to shrink the file down to just under 64K. Unfortunately a lot of features had to be disabled for this to work, but the core functionality is still there. Gone are Wireless Boot (duh), HTTP/FTP/NFS boot. Infiniband protocol, FCoE and the GUI console.
The following features are left behind: iSCSI, DNS, TFTP, AoE, VLAN, bzImage, ELF, MBOOT, PXE, PXEXT and Menu
This is my copy of the general.h file after all the unnecessary features have been trimmed.
[root@localhost ~] lspci -n -s 01:00.0 01:00.0 0200: 8086:10c9 (rev 01) |
Now we need to create a script that will execute automatically on iPXE boot. Again, through a lot of trial and error (and about 15 reflashes of the C6100) I came up with this:
Features:
- Ability to skip the iPXE boot
- Manual override
- Redundant loading. NIC1 can load either NIC1 or NIC2 file and NIC2 can load either NIC1 or NIC2 file
- Global UUID file loading
- DNS based TFTP location so it’ll be easy to move without requiring re-flash
To create a script simply create a new file and define the custom script
[root@localhost ~] cd /tmp [root@localhost ~] git clone git://git.ipxe.org/ipxe.git [root@localhost ~] cd ipxe/src |
My script file is as follows
#!ipxe #print current UUID for reference echo UUID: ${uuid} #allow user to abort the script prompt --key 0x1b --timeout 3000 Press ESC to skip iPXE boot... && exit || #prompt for shell mode prompt --key 0x02 --timeout 2000 Press Ctrl-B for the iPXE shell... || goto no_shell shell exit #attempt load from interface 1 :no_shell echo Starting Network on net0 dhcp net0 || dhcp net0 || dhcp net0 || goto no_net0 set net0_up 1 goto load_net0 exit #attempt load from interface 2 :no_net0 echo Starting Network on net1 dhcp net1 || dhcp net1 || dhcp net1 set net1_up 1 goto load_net0 exit #load from TFTP for first interface :load_net0 isset ${net0_up} && echo Connecting to TFTP: tftp://ipxehost/${net0/mac:hexhyp}.ipxe && chain tftp://ipxehost/${net0/mac:hexhyp}.ipxe || goto load_net1 exit #load from TFTP for second interface :load_net1 #attempt to load net0 image first isset ${net0_up} && goto load_uuid #we simply failed to find MAC.ipxe isset ${net1_up} && echo Connecting to TFTP: tftp://ipxehost/${net0/mac:hexhyp}.ipxe && chain tftp://ipxehost/${net1/mac:hexhyp}.ipxe || #screw it, load net1 image next isset ${net1_up} && echo Connecting to TFTP: tftp://ipxehost/${net1/mac:hexhyp}.ipxe && chain tftp://ipxehost/${net1/mac:hexhyp}.ipxe || goto load_uuid exit #alternatively load by UUID :load_uuid #are we even connected? isset ${net0_up} || isset ${net1_up} || exit #no connection, abort all echo MAC image not found.... echo Attempting to load from UUID ${uuid} chain tftp://ipxehost/${uuid}.ipxe |
STOP: At this point you must verify that the bin/808610c9.bin file is under 64K! If the file is too big, more features will have to be removed from the general.h file.
Pingback: Dell C6100 XS23-TY3 2U 4-Node (8 CPU) Cloud Server - Page 43