Difference between revisions of "IPXE"
Jump to navigation
Jump to search
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
'''[http://ipxe.org/ iPXE]''' is a tool for loading an operating system over a network. It is a fork of [[GPXE]]. | '''[http://ipxe.org/ iPXE]''' is a tool for loading an operating system over a network. It is a fork of [[GPXE]]. | ||
Like GPXE uses legacy BIOS callbacks, and it works well with SeaBIOS. See [[GPXE]]. | Like GPXE, iPXE uses legacy BIOS callbacks, and it works well with SeaBIOS. See [[GPXE]] for more information. | ||
== Building and Running in | == Building and Running in SeaBIOS howto == | ||
Here are the goals of this howto(if you find an easy way that makes possible to have bigger iPXE, update that howto | Here are the goals of this howto: | ||
* fits in 128k for easier building process(if you find an easy way that makes it possible to have bigger iPXE, update that howto ) | |||
* boot over an ath9k WiFi over an open/unencrypted wifi to an image that resides on the internet | * boot over an ath9k WiFi over an open/unencrypted wifi to an image that resides on the internet | ||
* Use the following boot procedure: coreboot | * Use the following boot procedure: coreboot?>SeaBIOS?iPXE?image on the internet. | ||
=== Building === | === Building === | ||
Identify your wireless network card: | Identify your wireless network card: | ||
# lspci | # lspci | ||
[ | [] | ||
03:06.0 Network controller: Atheros Communications Inc. AR922X Wireless Network Adapter (rev 01) | 03:06.0 Network controller: Atheros Communications Inc. AR922X Wireless Network Adapter (rev 01) | ||
Identify its PCI IDs: | Identify its PCI IDs: | ||
# lspci -s 03:06.0 -nnn | # lspci -s 03:06.0 -nnn | ||
03:06.0 Network controller [0280]: Atheros Communications Inc. AR922X Wireless Network Adapter [168c:0029] (rev 01) | 03:06.0 Network controller [0280]: Atheros Communications Inc. AR922X Wireless Network Adapter [168c:0029] (rev 01) | ||
Get iPXE: | |||
git clone git://git.ipxe.org/ipxe.git | git clone git://git.ipxe.org/ipxe.git | ||
cd ipxe/src/ | cd ipxe/src/ | ||
Line 56: | Line 56: | ||
#undef REBOOT_CMD /* Reboot command */ | #undef REBOOT_CMD /* Reboot command */ | ||
#undef IMAGE_TRUST_CMD /* Image trust management commands */ | #undef IMAGE_TRUST_CMD /* Image trust management commands */ | ||
Copy the following in the shell.ipxe file: | |||
#!ipxe | |||
shell | |||
shell.ipxe is an ipxe script that ipxe will run when starting, here it will instruct ipxe to drop directly to a shell. The syntax is documented on ipxe website. | |||
Use the previously gathered PCI ID to include only the ath9k driver: | Use the previously gathered PCI ID to include only the ath9k driver: | ||
make clean;make bin/168c0029.rom | make clean; make -j3 bin/168c0029.rom EMBED=./shell.ipxe | ||
Go into your coreboot directory: | Go into your coreboot directory: | ||
cd ../../coreboot/ | cd ../../coreboot/ | ||
Add the iPXE option rom: | Add the iPXE option rom: | ||
./build/cbfstool ./build/coreboot.rom print | ./build/cbfstool ./build/coreboot.rom print | ||
./build/cbfstool ./build/coreboot.rom add ../ipxe/src/bin/168c0029.rom pci168c,0029.rom raw | ./build/cbfstool ./build/coreboot.rom add -f ../ipxe/src/bin/168c0029.rom -n pci168c,0029.rom -t raw | ||
./build/cbfstool ./build/coreboot.rom print | ./build/cbfstool ./build/coreboot.rom print | ||
=== Booting === | === Booting === | ||
* | * boot on ipxe, it will give you a shell: | ||
iPXE> | iPXE> | ||
You will then need to type some commands to make it boot over the WiFi from the Internet. | |||
* Identify your ESSID | * Identify your ESSID: | ||
iwlist | iwlist | ||
* | * Set the ESSID: | ||
config | config | ||
* | * Get an IP address: | ||
dhcp | dhcp | ||
* | * Test the official demo (requires a PS/2 keyboard) | ||
chain http://boot.ipxe.org/demo/boot.php | chain http://boot.ipxe.org/demo/boot.php | ||
== Running from grub as a payload == | |||
=== Introduction === | |||
Ipxe depend on the BIOS or EFI interfaces. | |||
Grub doesn't provide a BIOS interface. | |||
When grub is loaded from a BIOS (like SeaBIOS for instance), the interfaces are provided by the BIOS. | |||
but when grub is the payload(coreboot loads grub directly), then this BIOS interfaces are absent. | |||
The way arround this is to make grub load SeaBIOS which then loads ipxe. | |||
=== SeaBIOS === | |||
grub can load payloads. | |||
Refer to the [[GRUB2#Payloads|corresponding SeaBIOS section]] for making grub load SeaBIOS. |