Difference between revisions of "IPXE"

From coreboot
Jump to: navigation, search
(Building)
(Building: Update `cbfstool` command to reflect recent changes)
 
(7 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 seaBIOS howto ==
+
== Building and Running in SeaBIOS howto ==
 
Here are the goals of this howto:
 
Here are the goals of this howto:
* fits in 128k for easier building process
+
* 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?>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:
+
Get iPXE:
 
  git clone git://git.ipxe.org/ipxe.git
 
  git clone git://git.ipxe.org/ipxe.git
 
  cd ipxe/src/
 
  cd ipxe/src/
Copy the following into
+
Copy the following into config/local/general.h:
 +
#undef PXE_STACK              /* PXE stack in iPXE - you want this! */
 +
#undef PXE_MENU                /* PXE menu booting */
 +
#undef DOWNLOAD_PROTO_TFTP    /* Trivial File Transfer Protocol */
 +
#undef SANBOOT_PROTO_ISCSI    /* iSCSI protocol */
 +
#undef SANBOOT_PROTO_AOE      /* AoE protocol */
 +
#undef SANBOOT_PROTO_IB_SRP    /* Infiniband SCSI RDMA protocol */
 +
#undef SANBOOT_PROTO_FCP      /* Fibre Channel protocol */
 +
#undef CRYPTO_80211_WEP        /* WEP encryption (deprecated and insecure!) */
 +
#undef CRYPTO_80211_WPA        /* WPA Personal, authenticating with passphrase */
 +
#undef CRYPTO_80211_WPA2      /* Add support for stronger WPA cryptography */
 +
#undef IMAGE_NBI              /* NBI image support */
 +
#undef IMAGE_ELF              /* ELF image support */
 +
#undef IMAGE_MULTIBOOT        /* MultiBoot image support */
 +
#undef IMAGE_PXE              /* PXE image support */
 +
#define        IMAGE_SCRIPT            /* iPXE script image support */
 +
#define        IMAGE_BZIMAGE          /* Linux bzImage image support */
 +
#undef IMAGE_COMBOOT          /* SYSLINUX COMBOOT image support */
 +
#undef IMAGE_EFI              /* EFI image support */
 +
#undef IMAGE_SDI              /* SDI image support */
 +
#undef NVO_CMD                /* Non-volatile option storage commands */
 +
#define CONFIG_CMD              /* Option configuration console */
 +
#undef FCMGMT_CMD              /* Fibre Channel management commands */
 +
#undef ROUTE_CMD              /* Routing table management commands */
 +
#define IMAGE_CMD              /* Image management commands */
 +
#undef SANBOOT_CMD            /* SAN boot commands */
 +
#undef MENU_CMD                /* Menu commands */
 +
#undef LOGIN_CMD              /* Login command */
 +
#undef SYNC_CMD                /* Sync command */
 +
#undef NSLOOKUP_CMD            /* DNS resolving command */
 +
#undef TIME_CMD                /* Time commands */
 +
#undef DIGEST_CMD              /* Image crypto digest commands */
 +
#undef LOTEST_CMD              /* Loopback testing commands */
 +
#undef VLAN_CMD                /* VLAN commands */
 +
#undef PXE_CMD        /* PXE commands */
 +
#undef REBOOT_CMD            /* Reboot command */
 +
#undef IMAGE_TRUST_CMD /* Image trust management commands */
 +
Use the previously gathered PCI ID to include only the ath9k driver:
 +
make clean; make bin/168c0029.rom -j3
 +
Go into your coreboot directory:
 +
cd ../../coreboot/
 +
Add the iPXE option rom:
 +
./build/cbfstool ./build/coreboot.rom print
 +
./build/cbfstool ./build/coreboot.rom add -f ../ipxe/src/bin/168c0029.rom -n pci168c,0029.rom -t raw
 +
./build/cbfstool ./build/coreboot.rom print
  
 
=== Booting ===
 
=== Booting ===
* keep pressing ctrl+b while booting
+
* Keep pressing Ctrl + b while booting.
* it will give you a shell:
+
* It will give you a shell:
 
  iPXE>
 
  iPXE>
* You will then need to type some commands to make it boot on the WiFi from the Internet.
+
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
+
* Set the ESSID:
 
  config
 
  config
* get an IP Address
+
* Get an IP address:
 
  dhcp
 
  dhcp
* test the official demo (requires a ps2 keyboard)
+
* 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

Latest revision as of 10:45, 3 April 2013

iPXE is a tool for loading an operating system over a network. It is a fork of GPXE.

Like GPXE, iPXE uses legacy BIOS callbacks, and it works well with SeaBIOS. See GPXE for more information.

Building and Running in SeaBIOS 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 …
  • Use the following boot procedure: coreboot?>SeaBIOS?iPXE?image on the internet.

Building

Identify your wireless network card:

# lspci
[…]
03:06.0 Network controller: Atheros Communications Inc. AR922X Wireless Network Adapter (rev 01)

Identify its PCI IDs:

# lspci -s 03:06.0 -nnn
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
cd ipxe/src/

Copy the following into config/local/general.h:

#undef PXE_STACK               /* PXE stack in iPXE - you want this! */
#undef PXE_MENU                /* PXE menu booting */
#undef DOWNLOAD_PROTO_TFTP     /* Trivial File Transfer Protocol */
#undef SANBOOT_PROTO_ISCSI     /* iSCSI protocol */
#undef SANBOOT_PROTO_AOE       /* AoE protocol */
#undef SANBOOT_PROTO_IB_SRP    /* Infiniband SCSI RDMA protocol */
#undef SANBOOT_PROTO_FCP       /* Fibre Channel protocol */
#undef CRYPTO_80211_WEP        /* WEP encryption (deprecated and insecure!) */
#undef CRYPTO_80211_WPA        /* WPA Personal, authenticating with passphrase */
#undef CRYPTO_80211_WPA2       /* Add support for stronger WPA cryptography */
#undef IMAGE_NBI               /* NBI image support */
#undef IMAGE_ELF               /* ELF image support */
#undef IMAGE_MULTIBOOT         /* MultiBoot image support */
#undef IMAGE_PXE               /* PXE image support */
#define        IMAGE_SCRIPT            /* iPXE script image support */
#define        IMAGE_BZIMAGE           /* Linux bzImage image support */
#undef IMAGE_COMBOOT           /* SYSLINUX COMBOOT image support */
#undef IMAGE_EFI               /* EFI image support */
#undef IMAGE_SDI               /* SDI image support */
#undef NVO_CMD                 /* Non-volatile option storage commands */
#define CONFIG_CMD              /* Option configuration console */
#undef FCMGMT_CMD              /* Fibre Channel management commands */
#undef ROUTE_CMD               /* Routing table management commands */
#define IMAGE_CMD               /* Image management commands */
#undef SANBOOT_CMD             /* SAN boot commands */
#undef MENU_CMD                /* Menu commands */
#undef LOGIN_CMD               /* Login command */
#undef SYNC_CMD                /* Sync command */
#undef NSLOOKUP_CMD            /* DNS resolving command */
#undef TIME_CMD                /* Time commands */
#undef DIGEST_CMD              /* Image crypto digest commands */
#undef LOTEST_CMD              /* Loopback testing commands */
#undef VLAN_CMD                /* VLAN commands */
#undef PXE_CMD         /* PXE commands */
#undef REBOOT_CMD             /* Reboot command */
#undef IMAGE_TRUST_CMD /* Image trust management commands */

Use the previously gathered PCI ID to include only the ath9k driver:

make clean; make bin/168c0029.rom -j3

Go into your coreboot directory:

cd ../../coreboot/

Add the iPXE option rom:

./build/cbfstool ./build/coreboot.rom print
./build/cbfstool ./build/coreboot.rom add -f ../ipxe/src/bin/168c0029.rom -n pci168c,0029.rom -t raw
./build/cbfstool ./build/coreboot.rom print

Booting

  • Keep pressing Ctrl + b while booting.
  • It will give you a shell:
iPXE>

You will then need to type some commands to make it boot over the WiFi from the Internet.

  • Identify your ESSID:
iwlist
  • Set the ESSID:
config
  • Get an IP address:
dhcp
  • Test the official demo (requires a PS/2 keyboard)
chain http://boot.ipxe.org/demo/boot.php