Architectures/ARM/Anaconda

From FedoraProject

< Architectures | ARM(Difference between revisions)
Jump to: navigation, search
(Anaconda Kickstart Install on ARM)
 
m (Using Anaconda to install on ARM systems)
Line 10: Line 10:
 
* set up a server (DHCP/TFTPBoot/PXE) to PXE-boot the host
 
* set up a server (DHCP/TFTPBoot/PXE) to PXE-boot the host
 
* set up a PXE-boot script to run the kickstart
 
* set up a PXE-boot script to run the kickstart
 +
  
 
{{admon/note|Server Setup|How to set up the server (DHCP/TFTPBoot/PXE) is covered in other Fedora documentation, and is not specific to ARM, so it will not be covered in this document.}}
 
{{admon/note|Server Setup|How to set up the server (DHCP/TFTPBoot/PXE) is covered in other Fedora documentation, and is not specific to ARM, so it will not be covered in this document.}}
  
The repo and install tree are all available publicly for primary architecture (PA) formal releases.  We can't use the public Fedora ARM repo because it does not include the install tree, therefore we must make a local copy and set it up ourselves.
+
The repository and install tree are all available publicly for primary architecture (PA) formal releases.  The secondary architecture (SA) public Fedora ARM repoitory cannot be used for installations because it does not include the install tree, therefore a local copy must be set up and used.
  
The ARM install tree may be created using a modified version of lorax and anaconda.  A lookaside repo is used to hold the modified versions of anaconda, grubby, and lorax, since they are not in Fedora 17.  A public version of the lookaside repo is available (see [http://fedoraproject.org/wiki/Architectures/ARM/Installer#Set_Up_the_Repository "Setting Up the xpfa Repository"]).  After a lorax compose is complete, the contents of the install tree look like:
+
The ARM install tree may be created using a modified version of lorax and anaconda.  A lookaside repo is used to hold the modified versions of anaconda, grubby, and lorax, since the changes are not in Fedora 17.  A public version of the lookaside repo is available (see [http://fedoraproject.org/wiki/Architectures/ARM/Installer#Set_Up_the_Repository "Setting Up the xpfa Repository"]).  After a lorax compose is complete, the contents of the install tree look like:
  
 
<pre>
 
<pre>
Line 26: Line 27:
 
   .treeinfo
 
   .treeinfo
 
</pre>
 
</pre>
 +
  
 
All these files and directories should be included in a local copy of the ARM yum repo, i.e.,
 
All these files and directories should be included in a local copy of the ARM yum repo, i.e.,
Line 55: Line 57:
 
   append console=ttyAMA0 ip=eth0:dhcp ks=http://<ServerPathToKickstartConfig>/highbank.ks rd.debug rd.shell cmdline
 
   append console=ttyAMA0 ip=eth0:dhcp ks=http://<ServerPathToKickstartConfig>/highbank.ks rd.debug rd.shell cmdline
 
</pre>
 
</pre>
 +
  
 
By default, this file is in the pxeboot.cfg directory and is named 01-<MAC Address>, all lower case, for example:
 
By default, this file is in the pxeboot.cfg directory and is named 01-<MAC Address>, all lower case, for example:
  
 +
<pre>
 
   MAC=00-50-43-9e-17-28 -> FileName=01-00-50-43-9e-17-28
 
   MAC=00-50-43-9e-17-28 -> FileName=01-00-50-43-9e-17-28
 +
</pre>
 +
  
 
however U-Boot will also search for alternate file names, icluding a hexidecimal representation of the system's IP address.
 
however U-Boot will also search for alternate file names, icluding a hexidecimal representation of the system's IP address.
  
Since this is still a work in progress, command line options 'rd.debug' and 'rd.shell' were added to support debugging.  The 'cmdline' option will prevent ncurses-type dialogs from being displayed on the serial console during the installation.
+
Since this is still a work in progress, command line options <code>rd.debug</code> and <code>rd.shell</code> were added to support debugging.  The <code>cmdline</code> option will prevent ncurses-type dialogs from being displayed on the serial console during the installation.
  
 
A copy the kernel and initrd image files from the install tree in the yum repo, along with the kickstart config file, should be copied to the PXE/tftpboot server, i.e.,  
 
A copy the kernel and initrd image files from the install tree in the yum repo, along with the kickstart config file, should be copied to the PXE/tftpboot server, i.e.,  
Line 74: Line 80:
 
     uInitrd-mvebu
 
     uInitrd-mvebu
 
</pre>
 
</pre>
 +
  
 
The kickstart config file could reside elsewhere, but here it with the other images, just to keep things together.  This implies that the tftpboot directory is also accessible via http.
 
The kickstart config file could reside elsewhere, but here it with the other images, just to keep things together.  This implies that the tftpboot directory is also accessible via http.
  
 
Note: It appears that the current version of U-Boot on the ArmadaXP defaults to using 'bootm' for PXE-booting, therefore we are using the U-Boot wrapped  images in the PXE config file, however both versions of the kernel and initrd images are provided in the image directory of the install tree in case this changes.
 
Note: It appears that the current version of U-Boot on the ArmadaXP defaults to using 'bootm' for PXE-booting, therefore we are using the U-Boot wrapped  images in the PXE config file, however both versions of the kernel and initrd images are provided in the image directory of the install tree in case this changes.
 +
  
 
{{admon/note|Default Operation|The current version of U-Boot on Highbank defaults to using 'bootz' instead of 'bootm' for PXE-booting, therefore the 'raw' images need to be copied to the server.  The version of U-Boot on other systems may have the opposite default (use U-Boot wrapped images).  Both versions of the kernel and initrd are provided in the images/pxeboot directory of the install tree and may be copied to the server.
 
{{admon/note|Default Operation|The current version of U-Boot on Highbank defaults to using 'bootz' instead of 'bootm' for PXE-booting, therefore the 'raw' images need to be copied to the server.  The version of U-Boot on other systems may have the opposite default (use U-Boot wrapped images).  Both versions of the kernel and initrd are provided in the images/pxeboot directory of the install tree and may be copied to the server.
  
Please use this example kickstart file as a base for installion.
+
 
 +
Please use this example [https://fedoraproject.org/w/uploads/a/a2/F17-highbank.ks F17-highbank.ks] file as a base for test installions.
  
 
To boot to the PXE install image, interrupt the autoboot on the system and perform a PXE-boot.  For convenience a script can be defined to do this, for example:
 
To boot to the PXE install image, interrupt the autoboot on the system and perform a PXE-boot.  For convenience a script can be defined to do this, for example:
Line 88: Line 97:
 
  bootcmd_pxe=setenv autoload no; dhcp; pxe get; pxe boot;
 
  bootcmd_pxe=setenv autoload no; dhcp; pxe get; pxe boot;
 
</pre>
 
</pre>
 +
  
 
It can then be automatically performed on boot, or run manually, for example:
 
It can then be automatically performed on boot, or run manually, for example:
Line 94: Line 104:
 
  run bootcmd_pxe
 
  run bootcmd_pxe
 
</pre>
 
</pre>
 +
  
 
U-Boot should display the boot menu defined in the PXE config file for the system.  Once the default is selected (or autoboots) the kickstart install should begin.  This may take a long time, and since it is command line driven (kickstart via serial console) there is not much feedback.  Be patient.  Depending on the system and network performance the installation may take more than an hour.
 
U-Boot should display the boot menu defined in the PXE config file for the system.  Once the default is selected (or autoboots) the kickstart install should begin.  This may take a long time, and since it is command line driven (kickstart via serial console) there is not much feedback.  Be patient.  Depending on the system and network performance the installation may take more than an hour.
 +
  
 
{{admon/warning|IMPORTANT NOTE|This will wipe out anything on the hard drive in order to perform the new installation.  It is not interactive, and no prompts or warnings will be provided.  Only run this on a 'scratch' system for installation testing.}}
 
{{admon/warning|IMPORTANT NOTE|This will wipe out anything on the hard drive in order to perform the new installation.  It is not interactive, and no prompts or warnings will be provided.  Only run this on a 'scratch' system for installation testing.}}

Revision as of 17:55, 10 July 2012

Using Anaconda to install on ARM systems

ARM systems that support PXE-boot may install Fedora using Anaconda and Kickstart. This has been tested on the Calxeda Highbank QEMU emulator and server hardware.

There is quite a bit of setup required to perform a PXE-boot, kickstart install, so this will cover the basics.

The basic steps involved in setting up for an anaconda kickstart install are the same as for other architectures, i.e.

  • have a copy of the yum repo (available via http)
  • have the install tree included in the same repo
  • set up a server (DHCP/TFTPBoot/PXE) to PXE-boot the host
  • set up a PXE-boot script to run the kickstart


Note.png
Server Setup
How to set up the server (DHCP/TFTPBoot/PXE) is covered in other Fedora documentation, and is not specific to ARM, so it will not be covered in this document.

The repository and install tree are all available publicly for primary architecture (PA) formal releases. The secondary architecture (SA) public Fedora ARM repoitory cannot be used for installations because it does not include the install tree, therefore a local copy must be set up and used.

The ARM install tree may be created using a modified version of lorax and anaconda. A lookaside repo is used to hold the modified versions of anaconda, grubby, and lorax, since the changes are not in Fedora 17. A public version of the lookaside repo is available (see "Setting Up the xpfa Repository"). After a lorax compose is complete, the contents of the install tree look like:

  .discinfo
  images/
      pxeboot/
          <kernel and initrd images>
  LiveOS/
      squashfs.img
  .treeinfo


All these files and directories should be included in a local copy of the ARM yum repo, i.e.,

 <LocalPathToRepo>/Fedora/fedora-secondary/development/17/armhfp/os/
   .discinfo
   drpms/
   images/
   LiveOS/
   Packages/
   repodata/
   .treeinfo


An example PXE-boot config file is:

menu title Highbank Boot Options

default Highbank-Install
prompt 1
timeout 100

label Highbank-Install
   kernel f17-highbank/vmlinuz-highbank
   initrd f17-highbank/initrd-highbank.img
   append console=ttyAMA0 ip=eth0:dhcp ks=http://<ServerPathToKickstartConfig>/highbank.ks rd.debug rd.shell cmdline


By default, this file is in the pxeboot.cfg directory and is named 01-<MAC Address>, all lower case, for example:

  MAC=00-50-43-9e-17-28 -> FileName=01-00-50-43-9e-17-28


however U-Boot will also search for alternate file names, icluding a hexidecimal representation of the system's IP address.

Since this is still a work in progress, command line options rd.debug and rd.shell were added to support debugging. The cmdline option will prevent ncurses-type dialogs from being displayed on the serial console during the installation.

A copy the kernel and initrd image files from the install tree in the yum repo, along with the kickstart config file, should be copied to the PXE/tftpboot server, i.e.,

 /tftpboot/f17-mvebu/
    mvebu.ks
    initrd-mvebu.img
    vmlinuz-mvebu
    uImage-mvebu
    uInitrd-mvebu


The kickstart config file could reside elsewhere, but here it with the other images, just to keep things together. This implies that the tftpboot directory is also accessible via http.

Note: It appears that the current version of U-Boot on the ArmadaXP defaults to using 'bootm' for PXE-booting, therefore we are using the U-Boot wrapped images in the PXE config file, however both versions of the kernel and initrd images are provided in the image directory of the install tree in case this changes.


{{admon/note|Default Operation|The current version of U-Boot on Highbank defaults to using 'bootz' instead of 'bootm' for PXE-booting, therefore the 'raw' images need to be copied to the server. The version of U-Boot on other systems may have the opposite default (use U-Boot wrapped images). Both versions of the kernel and initrd are provided in the images/pxeboot directory of the install tree and may be copied to the server.


Please use this example F17-highbank.ks file as a base for test installions.

To boot to the PXE install image, interrupt the autoboot on the system and perform a PXE-boot. For convenience a script can be defined to do this, for example:

 bootcmd_pxe=setenv autoload no; dhcp; pxe get; pxe boot;


It can then be automatically performed on boot, or run manually, for example:

 run bootcmd_pxe


U-Boot should display the boot menu defined in the PXE config file for the system. Once the default is selected (or autoboots) the kickstart install should begin. This may take a long time, and since it is command line driven (kickstart via serial console) there is not much feedback. Be patient. Depending on the system and network performance the installation may take more than an hour.


Warning (medium size).png
IMPORTANT NOTE
This will wipe out anything on the hard drive in order to perform the new installation. It is not interactive, and no prompts or warnings will be provided. Only run this on a 'scratch' system for installation testing.