This is an old revision of the document!


Network-booting Fedora

Fedora logo

You can use iPXE to boot into the Fedora Linux installer via HTTP. You can then install Fedora to a local hard disk or to an iSCSI or FCoE SAN target.

These instructions should work for similar Linux distributions, such as Red Hat Enterprise Linux (RHEL) and CentOS.

Boot script

Create an iPXE script file fedora.ipxe containing:

  #!ipxe
  
  # Set source URI
  set mirror http://download.fedoraproject.org/pub/fedora/linux/releases/18
  
  # Detect CPU architecture and calculate repository URI
  cpuid --ext 29 && set arch x86_64 || set arch i386
  set repo ${mirror}/Fedora/${arch}/os
  
  # Start installer
  kernel ${repo}/images/pxeboot/vmlinuz initrd=initrd.img repo=${repo}
  initrd ${repo}/images/pxeboot/initrd.img
  boot

If you have mirrored the Fedora tree locally, then you should change the line

  set mirror http://download.fedoraproject.org/pub/fedora/linux/releases/18

to point to the URI of your local mirror. Booting and installing from a local mirror will be several times faster than using the public download.fedoraproject.org mirror.

Installing to a local disk

Boot using iPXE from the URI of your fedora.ipxe script, e.g. http://my.web.server/fedora.ipxe. You should see iPXE download and boot into the Fedora installer via HTTP:

Booting from fedora.ipxe script

Fedora installation screen

You can now install Fedora to a local hard disk. Congratulations on successfully network-booting the Fedora installer!

Success

Installing to a SAN target

You can install Fedora to an iSCSI or FCoE SAN target instead of to a local disk. To do this, you must modify the fedora.ipxe script to allow for installation to your SAN target disk. For example:

  #!ipxe
  
  # Set source URI
  set mirror http://download.fedoraproject.org/pub/fedora/linux/releases/18
  
  # Set SAN target URI
  set target iscsi:192.168.0.1::::iqn.1992-01.com.example.target:fedora
  
  # Detect CPU architecture and calculate repository URI
  cpuid --ext 29 && set arch x86_64 || set arch i386
  set repo ${mirror}/Fedora/${arch}/os
  
  # Hook SAN target
  sanhook ${target}
  
  # Start installer if F12 is pressed, otherwise boot
  prompt --key 0x197e --timeout 2000 Press F12 to install Fedora... || sanboot
  kernel ${repo}/images/pxeboot/vmlinuz initrd=initrd.img repo=${repo}
  initrd ${repo}/images/pxeboot/initrd.img
  boot

You must change the line

  set target iscsi:192.168.0.1::::iqn.1992-01.com.example.target:fedora

to specify the SAN URI of your iSCSI or FCoE target.

You should see

howto/fedora.1372337420.txt.gz ยท Last modified: 2013/06/27 12:50 by mcb30
Recent changes RSS feed CC Attribution-Share Alike 4.0 International Driven by DokuWiki
All uses of this content must include an attribution to the iPXE project and the URL https://ipxe.org
References to "iPXE" may not be altered or removed.