Architectures/ARM/Anaconda

From FedoraProject

< Architectures | ARM(Difference between revisions)
Jump to: navigation, search
(Anaconda Kickstart Install on ARM)
 
(Using Anaconda to install on ARM systems)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
== Using Anaconda to install on ARM systems ==
 
== Using Anaconda to install on ARM systems ==
 +
 +
{{admon/note|Note: | This information was written for Fedora 17 and is now largely obsolete.  The Fedora 18 secondary architecture release includes the ARM install tree.  All modifications to Anaconda and Lorax are also now in Fedora 18, so no custom tool versions are necessary.  Please see the [[Architectures/ARM/F18_Release_Announcement#Release_Notes | Fedora 18 board specific release pages]] for more information.}}
  
 
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.
 
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.
Line 11: Line 13:
 
* 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.}}
 
  
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.
+
{{admon/note|Server Setup|How to set up the server (DHCP/TFTPBoot/PXE) is covered in other [http://docs.fedoraproject.org/en-US/Fedora/17/html/System_Administrators_Guide/index.html Fedora documentation], and is not specific to ARM, so it will not be covered in this document.}}
  
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 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 [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 30:
 
   .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 56: Line 61:
 
</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 should be placed in the pxelinux.cfg directory and 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, including 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.,  
  
 
<pre>
 
<pre>
  /tftpboot/f17-mvebu/
+
  /tftpboot/f17-highbank/
     mvebu.ks
+
     highbank.ks
     initrd-mvebu.img
+
     initrd-highbank.img
     vmlinuz-mvebu
+
     vmlinuz-highbank
     uImage-mvebu
+
     uImage-highbank
     uInitrd-mvebu
+
     uInitrd-highbank
 
</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.
 
  
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.
+
The kickstart config file could reside elsewhere, but it was included here with the other images, just to keep things together.  This implies that the tftpboot directory is also accessible via http.
  
{{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.
+
{{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.}}
  
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:
+
 
 +
Please use this example [https://fedoraproject.org/w/uploads/9/9d/Highbank.ks F17-highbank.ks] file as a base for test installations.  By default it points to the public yum repository and install tree.
 +
 
 +
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, if one does not already exist, for example:
  
 
<pre>
 
<pre>
 
  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 105:
 
  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.}}
 +
 +
=== Quick Setup Notes for using the public FTP server ===
 +
Red Hat is currently providing a public FTP server with the Fedora repositories at ftp://ftp.ges.redhat.com. This repository can be used for quick testing of PXE configuration using the example kickstart file provided (above).
 +
 +
When setting up a PXE server and an install instance for use with the public FTP server, use:
 +
[ftp://ftp.ges.redhat.com/pub/fedora-secondary/releases/17/Everything/armhfp/os/images/pxeboot/vmlinuz-highbank ftp://ftp.ges.redhat.com/pub/fedora-secondary/releases/17/Everything/armhfp/os/images/pxeboot/vmlinuz-highbank] and [ftp://ftp.ges.redhat.com/pub/fedora-secondary/releases/17/Everything/armhfp/os/images/pxeboot/initrd-highbank.img ftp://ftp.ges.redhat.com/pub/fedora-secondary/releases/17/Everything/armhfp/os/images/pxeboot/initrd-highbank.img] for the kernel and initrd files, respectively.
 +
Append "ip=eth0:dhcp" to the kernel command line for the initial PXE boot.

Latest revision as of 23:54, 4 February 2013

[edit] Using Anaconda to install on ARM systems

Note.png
Note:
This information was written for Fedora 17 and is now largely obsolete. The Fedora 18 secondary architecture release includes the ARM install tree. All modifications to Anaconda and Lorax are also now in Fedora 18, so no custom tool versions are necessary. Please see the Fedora 18 board specific release pages for more information.

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 should be placed in the pxelinux.cfg directory and 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, including 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-highbank/
    highbank.ks
    initrd-highbank.img
    vmlinuz-highbank
    uImage-highbank
    uInitrd-highbank


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


Note.png
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 installations. By default it points to the public yum repository and install tree.

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, if one does not already exist, 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.

[edit] Quick Setup Notes for using the public FTP server

Red Hat is currently providing a public FTP server with the Fedora repositories at ftp://ftp.ges.redhat.com. This repository can be used for quick testing of PXE configuration using the example kickstart file provided (above).

When setting up a PXE server and an install instance for use with the public FTP server, use: ftp://ftp.ges.redhat.com/pub/fedora-secondary/releases/17/Everything/armhfp/os/images/pxeboot/vmlinuz-highbank and ftp://ftp.ges.redhat.com/pub/fedora-secondary/releases/17/Everything/armhfp/os/images/pxeboot/initrd-highbank.img for the kernel and initrd files, respectively. Append "ip=eth0:dhcp" to the kernel command line for the initial PXE boot.