From Fedora Project Wiki
mNo edit summary
 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Fedora ARMv7]]
== Creating a Fedora Install Image for ARM Systems ==  
== Creating a Fedora Install Image for ARM Systems ==  


This will track the work to add ARM support to the standard Fedora installation tools (Anaconda/Lorax).
This will track the work to add ARM support to the standard Fedora installation tools (Anaconda/Lorax).


The plan is to initially use livemedia-creator to create disk images that can be stored directly on an SDCard to boot a device (e.g., Trim Slice), or booted via an ARM emulator like QEMU.  Since most of these devices do not boot from standard media (CD/DVD), the ultimate goal is to be able to perform network installs via Anaconda after PXE-booting a device.  Hopefully, the interim work to add ARM support and create disk images will move us closer to that goal.
The plan is to use livemedia-creator to create disk images that can be stored directly on an SDCard to boot a device (e.g., Trim Slice), or booted via an ARM emulator like QEMU.  Since most of these devices do not boot from standard media (CD/DVD), and lack the resources to perform standard Anaconda installs, these images can be used for testing, or copied to other storage (i.e., hard drive) for installations.


{{admon/warning|Pre-Alpha Quality Code|This is a work in progress and is Pre-Alpha quality code.  Do not use this on production systems, as it may break things or destroy your current installation.  It is for development and testing only, and has received no formal testing.  <b>Use at your own risk!</b>}}
{{admon/warning|Warning|This is a work in progress and has not been thoroughly tested.  Do not use this on production systems, as it may break things or damage your current installation.  It is for development and testing only.  <b>Use at your own risk!</b>}}


== Creating a Disk Image for Trim Slice ==
== Creating a Disk Image ==


Anaconda and Lorax have been modified to recognize some common ARM systems that we are using and select the appropriate kernel for installation.  The livemedia-creator tool can be run on an ARM build host to create a disk image for that target.  The installation is controlled by a kickstart configuration file.  The image created can be copied directly to an SDCard and used to boot the system, for systems so equipped.   
Anaconda and Lorax have been modified to recognize some common ARM systems and select the appropriate kernel for installation.  The livemedia-creator tool can be run on an F17 ARM build host to create a disk image.  The installation is controlled by a kickstart configuration file.  The image created can be copied directly to an SDCard and used to boot the system, for systems so equipped.   


A Trim Slice was used for development and testing of this process because 1) it has an easily accessible SDCard slot, 2) U-Boot is pre-installed on internal storage, so does not have to be set up on the boot media, 3) no special formatting is required for the /boot partition, and ext3 loads are supported, and 4) U-Boot is configured to automatically boot from the SDCard, if present.
The modified versions of Anaconda, Lorax, and grubby are not available from the F17 Fedora-ARM mirrors (changes not committed to F17), so they must be installed from the F17 xpfa repo.
 
The modified versions of Anaconda, Lorax, and grubby are not available from the Fedora-ARM mirrors (changes not committed to F17), so they must be installed from the F17 xpfa repo.




Line 22: Line 21:
* get the eXtra Packages for Fedora ARM (xpfa) yum repository definition:
* get the eXtra Packages for Fedora ARM (xpfa) yum repository definition:
<pre>
<pre>
sudo yum --nogpgcheck install http://dmarlin.fedorapeople.org/packages/FedoraArm/RPMS/noarch/xpfa-17-1.noarch.rpm
sudo yum --nogpgcheck install http://dmarlin.fedorapeople.org/packages/FedoraArm/RPMS/noarch/xpfa-17-1.2.noarch.rpm
</pre>
* update grubby to get the modified version:
<pre>
sudo yum --enablerepo=xpfa update grubby
</pre>
* make any changes to the U-Boot configuration (if needed):
<pre>
sudo vi /etc/sysconfig/uboot
</pre>
</pre>
* install Anaconda and Lorax
* install Anaconda and Lorax
Line 36: Line 27:
sudo yum --enablerepo=xpfa install anaconda lorax
sudo yum --enablerepo=xpfa install anaconda lorax
</pre>
</pre>
{{admon/warning|Default Change|The default U-Boot directory is changed to /boot in this modified version of grubby.  This works fine for the Trim Slice, but may break kernel installs for other boards.}}


=== Building the Image ===
=== Building the Image ===
Line 45: Line 33:


* set up a kickstart file
* set up a kickstart file
I recommend first using the [https://fedoraproject.org/w/uploads/a/a2/F17-trimslice.ks F17-trimslice.ks] file as a test to make sure everything is set up and working as expected.  Then use it as a base for creating other kickstart configuration files.
I recommend first using the one of the [[#Example Kickstarts|example kickstart]] files as a test to make sure everything is set up and working as expected.  Then use it as a base for creating other kickstart configuration files.
 
{{admon/warning|SELinux|Typically images are created on Koji builders.  Koji requires that builders be configured with SELinux disabled.  In order to successfully create images using livemedia-creator, please disable SELinux, or at a minimum put it in <code>permissive</code> mode.}}
 
 
* run livemedia-creator
* run livemedia-creator
<pre>
<pre>
livemedia-creator \
livemedia-creator \
   --make-disk --no-virt --image-only --keep-image \
   --make-disk --no-virt --image-only --keep-image \
   --ks=/root/F17-trimslice.ks
   --ks=/root/F18-trimslice.ks
</pre>
 
 
By default livemedia-creator creates an image for the build host platform, for example, if run on a Trim Slice, use a Trim Slice kickstart file, and the target image will be for a Trim Slice.  The default platform can be overridden using the <code>--armplatform</code> option, for example, to create an image for Panda:
 
<pre>
livemedia-creator \
  --make-disk --no-virt --image-only --keep-image \
  --armplatform=omap
  --ks=/root/F18-panda.ks
</pre>
</pre>
To create an image for Versatile Express use <code>--armplatform=None</code>. Be sure to use the appropriate kickstart file for the selected target platform.


The disk image is created in <code>/tmp/disk<TempString>.img</code>.  When the process completes, the contents of the disk image may be examined by loop-mounting the image file.   
The disk image is created in <code>/tmp/disk<TempString>.img</code>.  When the process completes, the contents of the disk image may be examined by loop-mounting the image file.   
Line 57: Line 61:
The trimslice.ks defines three partitions:
The trimslice.ks defines three partitions:


<pre>
   /boot
   /boot
  swap
   /
   /
  swap
</pre>


These will be mapped in order, for example:
These will be mapped in order, for example:
Line 78: Line 84:
# mkdir -p /mnt/rootfs
# mkdir -p /mnt/rootfs


# mount -o loop /dev/dm-1 /mnt/rootfs
# mount -o loop /dev/dm-2 /mnt/rootfs
[108293.766690] EXT4-fs (loop1): mounted filesystem with ordered data mode. Opts: (null)
[108293.766690] EXT4-fs (loop1): mounted filesystem with ordered data mode. Opts: (null)


Line 90: Line 96:


# ls -l  
# ls -l  
total 74
total 54
lrwxrwxrwx   1 root root    7 Apr 25  2012 bin -> usr/bin
lrwxrwxrwx1 root root    7 Sep 13 15:47 bin -> usr/bin
dr-xr-xr-x.  4 root root  1024 Apr 25  2012 boot
dr-xr-xr-x.  4 root root  1024 Sep 13 15:53 boot
drwxr-xr-x. 2 root root  4096 Apr 25 2012 dev
drwxr-xr-x. 15 root root  2900 Dec 31 1969 dev
drwxr-xr-x 68 root root  4096 Apr 25  2012 etc
drwxr-xr-x. 83 root root  4096 Oct 11 18:36 etc
drwxr-xr-x   2 root root  4096 Feb 11 00:46 home
drwxr-xr-x2 root root  4096 Jul 23 07:53 home
lrwxrwxrwx   1 root root    7 Apr 25  2012 lib -> usr/lib
lrwxrwxrwx1 root root    7 Sep 13 15:47 lib -> usr/lib
drwx------.  2 root root 16384 Apr 25  2012 lost+found
drwx------.  2 root root 16384 Sep 13 15:46 lost+found
drwxr-xr-x   2 root root  4096 Feb 11 00:46 media
drwxr-xr-x2 root root  4096 Jul 23 07:53 media
drwxr-xr-x   2 root root  4096 Feb 11 00:46 mnt
drwxr-xr-x2 root root  4096 Jul 23 07:53 mnt
drwxr-xr-x   2 root root  4096 Feb 11 00:46 opt
drwxr-xr-x2 root root  4096 Jul 23 07:53 opt
drwxr-xr-x   2 root root  4096 Apr 25  2012 proc
dr-xr-xr-x. 91 root root     0 Dec 31 1969 proc
dr-xr-x---.  2 root root  4096 Apr 25  2012 root
dr-xr-x---.  3 root root  4096 Oct 11 17:40 root
drwxr-xr-x 14 root root 4096 Apr 25  2012 run
drwxr-xr-x. 20 root root   680 Oct 11 18:37 run
lrwxrwxrwx   1 root root    8 Apr 25  2012 sbin -> usr/sbin
lrwxrwxrwx1 root root    8 Sep 13 15:47 sbin -> usr/sbin
drwxr-xr-x   2 root root  4096 Feb 11 00:46 srv
drwxr-xr-x2 root root  4096 Jul 23 07:53 srv
drwxr-xr-x. 2 root root  4096 Apr 25  2012 sys
dr-xr-xr-x. 12 root root     0 Dec 31 1969 sys
drwxrwxrwt   2 root root 4096 Apr 25  2012 tmp
drwxrwxrwt.  7 root root   140 Oct 11 18:36 tmp
drwxr-xr-x 12 root root  4096 Apr 25  2012 usr
drwxr-xr-x. 12 root root  4096 Sep 13 15:47 usr
drwxr-xr-x 17 root root  4096 Apr 25  2012 var
drwxr-xr-x. 18 root root  4096 Sep 13 15:52 var
 


# ls -l boot/
# ls -l boot/
total 43468
total 53471
-rw------- 1 root root 1527901 Apr 15 09:36 System.map-3.3.2-2.fc17.armv7hl.tegra
-rw-r--r--. 1 root root      254 Sep 13 15:53 boot.cmd.mmc
-rw-r--r-- 1 root root      225 Apr 25  2012 boot.cmd
-rw-r--r--. 1 root root     254 Sep 13 15:53 boot.cmd.usb
-rw-r--r-- 1 root root      297 Apr 25  2012 boot.scr
-rw-r--r--. 1 root root      326 Sep 13 15:53 boot.scr
-rw-r--r-- 1 root root  107705 Apr 15 09:36 config-3.3.2-2.fc17.armv7hl.tegra
-rw-r--r--. 1 root root      326 Sep 13 15:53 boot.scr.mmc
drwxr-xr-x 2 root root    1024 Apr 25  2012 grub
-rw-r--r--. 1 root root      326 Sep 13 15:53 boot.scr.usb
-rw-r--r-- 1 root root 10645211 Apr 25  2012 initramfs-3.3.2-2.fc17.armv7hl.tegra.img
-rw-r--r--. 1 root root  117913 Oct  5 10:57 config-3.6.0-3.fc18.armv7hl.tegra
-rw-r--r-- 1 root root      27 Apr 25  2012 klist.txt
drwxr-xr-x. 3 root root    1024 Sep 13 15:49 grub2
drwx------. 2 root root    12288 Apr 25  2012 lost+found
-rw-r--r--. 1 root root 13835773 Sep 13 15:53 initramfs-3.6.0-3.fc18.armv7hl.tegra.img
-rw-r--r-- 1 root root  3578336 Apr 25  2012 uImage
-rw-r--r--. 1 root root  230391 Sep 13 15:52 initrd-plymouth.img
-rw-r--r-- 1 root root  3578336 Apr 25  2012 uImage-3.3.2-2.fc17.armv7hl.tegra
-rw-r--r--. 1 root root      27 Sep 13 15:53 klist.txt
-rw-r--r-- 1 root root 10645275 Apr 25  2012 uInitrd
drwx------. 2 root root    12288 Sep 13 15:46 lost+found
-rw-r--r-- 1 root root 10645275 Apr 25  2012 uInitrd-3.3.2-2.fc17.armv7hl.tegra
-rw-------. 1 root root  1578075 Oct  5 10:57 System.map-3.6.0-3.fc18.armv7hl.tegra
-rwxr-xr-x 1 root root  3578272 Apr 15 09:36 vmlinuz-3.3.2-2.fc17.armv7hl.tegra
-rw-r--r--. 1 root root  3684840 Sep 13 15:53 uImage
 
-rw-r--r--. 1 root root  3684840 Sep 13 15:53 uImage-3.6.0-3.fc18.armv7hl.tegra
-rw-r--r--. 1 root root 13835837 Sep 13 15:53 uInitrd
-rw-r--r--. 1 root root 13835837 Sep 13 15:53 uInitrd-3.6.0-3.fc18.armv7hl.tegra
-rwxr-xr-x. 1 root root  3684776 Oct  5 10:57 vmlinuz-3.6.0-3.fc18.armv7hl.tegra


# cat etc/system-release
Fedora release 17 (Beefy Miracle)


# cat etc/RELEASE
# cat /etc/system-release
F17-20120424-livemedia
Fedora release 18 (Spherical Cow)




Line 150: Line 158:


{{admon/note|Complete the Process|Please be sure to unmount the disk image partitions and delete the loop device.  Failing to do so may leave old allocated devices that are difficult to clean up.}}
{{admon/note|Complete the Process|Please be sure to unmount the disk image partitions and delete the loop device.  Failing to do so may leave old allocated devices that are difficult to clean up.}}
If you build a Versatile Express image for QEMU there is an additional step.  You need to extract the kernel and initramfs from the image in order to provide them to QEMU to boot.  Fortunately there is a script available ([http://fossjon.fedorapeople.org/packages/livemedia-modifier/livemedia-modifier-1.6-1.fc18.noarch.rpm livemedia-modifier]), which does this for you, and creates a compressed tarball that includes all you need to run the image from QEMU.
<pre>
livemedia-modifier --image=<PathToDiskImage> --platform=vexpress
</pre>
For other platforms, the disk image may be compressed using <code>xz</code> for storage or transferring to other systems, for example:
<pre>
xz -z9 <PathToDiskImage>
</pre>
The disk image file will be replaced by a compressed image (.xz extension added).
{{admon/note|Notice|Compressing an image on a resource constrained device may take a long time (hours).  You may wish to transfer the image to a more powerful system to perform the compression.}}


=== Installing the Image ===
=== Installing the Image ===


This disk image is suitable to be copied directly to an SDCard.  The disk image could similarly be copied to other media, but only using an SDCard has been tested.  To save space and make transfers faster, I typically compress the disk image using xz.
This disk image is suitable to be copied directly to an SDCard.  The disk image could similarly be copied to other media, but is configured by default to boot from the SDCard.


To copy this to an SDCard from my workstation, I plugged the SDCard into a USB adapter, inserted the adapter to an open USB slot, and checked <code>/proc/partitions</code> to see where it was located.  For this example, assume it was located on <code>/dev/sdb</code>.
To copy this to an SDCard from a workstation, plug the SDCard into a USB adapter, inserted the adapter to an open USB slot, and checked <code>/proc/partitions</code> to see where it is located.  For this example, assume it is located on <code>/dev/sdb</code>.


<pre>
<pre>
Line 167: Line 193:
</pre>
</pre>


To transfer the image to the device, make sure it is not mounted.
To transfer the image to the device, make sure none of the partitions on that device are mounted, for example:


<pre>
<pre>
Line 190: Line 216:


The device partitions may then be mounted and the contents examined, or the device may be ejected and moved to test booting on the target system.
The device partitions may then be mounted and the contents examined, or the device may be ejected and moved to test booting on the target system.
=== Running the Image from QEMU ===
The Versatile Express tarball includes all that is needed to boot the system, including the root filesystem image, and the pre-extracted kernel and initramfs. Also, included for your convenience are two scripts to boot your image.  To extract the files use:
<pre>
# tar Jxvf <PathToCompressedTarball>
</pre>
You can make use of the scripts provided in the <code>boot</code> directory to launch your image using QEMU:
<pre>
# cd ./<VExpressDirectory>/boot/
# ./boot-vexpress \
    vmlinuz-<Version-Release> \
    initramfs-<Version-Release>.img \
      ../<VExpressImageName>.img
</pre>
This boots to a command line login prompt.  To boot to the XFCE desktop add the "--gui" command line argument.
----
== Example Kickstarts ==
Example kickstart files are available via public git repository:
  http://fedorapeople.org/cgit/dmarlin/public_git/arm-kickstarts.git
== Example Application ==
Here is an example of using livemedia-creator on an Arndale board to make an [[Architectures/ARM/How_To_Make_a_Fedora_Image_on_an_ARM_Host|F18 based Fedora Remix image for Arndale]].

Latest revision as of 11:05, 6 June 2017

Creating a Fedora Install Image for ARM Systems

This will track the work to add ARM support to the standard Fedora installation tools (Anaconda/Lorax).

The plan is to use livemedia-creator to create disk images that can be stored directly on an SDCard to boot a device (e.g., Trim Slice), or booted via an ARM emulator like QEMU. Since most of these devices do not boot from standard media (CD/DVD), and lack the resources to perform standard Anaconda installs, these images can be used for testing, or copied to other storage (i.e., hard drive) for installations.

Warning
This is a work in progress and has not been thoroughly tested. Do not use this on production systems, as it may break things or damage your current installation. It is for development and testing only. Use at your own risk!

Creating a Disk Image

Anaconda and Lorax have been modified to recognize some common ARM systems and select the appropriate kernel for installation. The livemedia-creator tool can be run on an F17 ARM build host to create a disk image. The installation is controlled by a kickstart configuration file. The image created can be copied directly to an SDCard and used to boot the system, for systems so equipped.

The modified versions of Anaconda, Lorax, and grubby are not available from the F17 Fedora-ARM mirrors (changes not committed to F17), so they must be installed from the F17 xpfa repo.


Set Up the Repository

From an F17 ARM system, install the xpfa repo package:

  • get the eXtra Packages for Fedora ARM (xpfa) yum repository definition:
sudo yum --nogpgcheck install http://dmarlin.fedorapeople.org/packages/FedoraArm/RPMS/noarch/xpfa-17-1.2.noarch.rpm
  • install Anaconda and Lorax
sudo yum --enablerepo=xpfa install anaconda lorax

Building the Image

On the target build host, log in as 'root', and perform the following steps.

  • set up a kickstart file

I recommend first using the one of the example kickstart files as a test to make sure everything is set up and working as expected. Then use it as a base for creating other kickstart configuration files.

SELinux
Typically images are created on Koji builders. Koji requires that builders be configured with SELinux disabled. In order to successfully create images using livemedia-creator, please disable SELinux, or at a minimum put it in permissive mode.


  • run livemedia-creator
livemedia-creator \
  --make-disk --no-virt --image-only --keep-image \
  --ks=/root/F18-trimslice.ks


By default livemedia-creator creates an image for the build host platform, for example, if run on a Trim Slice, use a Trim Slice kickstart file, and the target image will be for a Trim Slice. The default platform can be overridden using the --armplatform option, for example, to create an image for Panda:

livemedia-creator \
  --make-disk --no-virt --image-only --keep-image \
  --armplatform=omap
  --ks=/root/F18-panda.ks

To create an image for Versatile Express use --armplatform=None. Be sure to use the appropriate kickstart file for the selected target platform.

The disk image is created in /tmp/disk<TempString>.img. When the process completes, the contents of the disk image may be examined by loop-mounting the image file.

The trimslice.ks defines three partitions:

  /boot
  swap
  /

These will be mapped in order, for example:

# kpartx -av <PathToDiskImage>
add map loop0p1 (253:0): 0 522240 linear /dev/loop0 2048
add map loop0p2 (253:1): 0 2621440 linear /dev/loop0 524288
add map loop0p3 (253:2): 0 1046528 linear /dev/loop0 3145728

# ls -l /dev/mapper
total 0
crw------- 1 root root 10, 236 Feb 11 00:46 control
lrwxrwxrwx 1 root root       7 Apr 25 18:49 loop0p1 -> ../dm-0
lrwxrwxrwx 1 root root       7 Apr 25 18:49 loop0p2 -> ../dm-1
lrwxrwxrwx 1 root root       7 Apr 25 18:49 loop0p3 -> ../dm-2

# mkdir -p /mnt/rootfs

# mount -o loop /dev/dm-2 /mnt/rootfs
[108293.766690] EXT4-fs (loop1): mounted filesystem with ordered data mode. Opts: (null)

# mount -o loop /dev/dm-0 /mnt/rootfs/boot
[108293.906412] kjournald starting.  Commit interval 5 seconds
[108293.906531] EXT3-fs (loop2): using internal journal
[108293.906545] EXT3-fs (loop2): mounted filesystem with ordered data mode

# pushd /mnt/rootfs/
/mnt/rootfs ~

# ls -l 
total 54
lrwxrwxrwx.  1 root root     7 Sep 13 15:47 bin -> usr/bin
dr-xr-xr-x.  4 root root  1024 Sep 13 15:53 boot
drwxr-xr-x. 15 root root  2900 Dec 31  1969 dev
drwxr-xr-x. 83 root root  4096 Oct 11 18:36 etc
drwxr-xr-x.  2 root root  4096 Jul 23 07:53 home
lrwxrwxrwx.  1 root root     7 Sep 13 15:47 lib -> usr/lib
drwx------.  2 root root 16384 Sep 13 15:46 lost+found
drwxr-xr-x.  2 root root  4096 Jul 23 07:53 media
drwxr-xr-x.  2 root root  4096 Jul 23 07:53 mnt
drwxr-xr-x.  2 root root  4096 Jul 23 07:53 opt
dr-xr-xr-x. 91 root root     0 Dec 31  1969 proc
dr-xr-x---.  3 root root  4096 Oct 11 17:40 root
drwxr-xr-x. 20 root root   680 Oct 11 18:37 run
lrwxrwxrwx.  1 root root     8 Sep 13 15:47 sbin -> usr/sbin
drwxr-xr-x.  2 root root  4096 Jul 23 07:53 srv
dr-xr-xr-x. 12 root root     0 Dec 31  1969 sys
drwxrwxrwt.  7 root root   140 Oct 11 18:36 tmp
drwxr-xr-x. 12 root root  4096 Sep 13 15:47 usr
drwxr-xr-x. 18 root root  4096 Sep 13 15:52 var


# ls -l boot/
total 53471
-rw-r--r--. 1 root root      254 Sep 13 15:53 boot.cmd.mmc
-rw-r--r--. 1 root root      254 Sep 13 15:53 boot.cmd.usb
-rw-r--r--. 1 root root      326 Sep 13 15:53 boot.scr
-rw-r--r--. 1 root root      326 Sep 13 15:53 boot.scr.mmc
-rw-r--r--. 1 root root      326 Sep 13 15:53 boot.scr.usb
-rw-r--r--. 1 root root   117913 Oct  5 10:57 config-3.6.0-3.fc18.armv7hl.tegra
drwxr-xr-x. 3 root root     1024 Sep 13 15:49 grub2
-rw-r--r--. 1 root root 13835773 Sep 13 15:53 initramfs-3.6.0-3.fc18.armv7hl.tegra.img
-rw-r--r--. 1 root root   230391 Sep 13 15:52 initrd-plymouth.img
-rw-r--r--. 1 root root       27 Sep 13 15:53 klist.txt
drwx------. 2 root root    12288 Sep 13 15:46 lost+found
-rw-------. 1 root root  1578075 Oct  5 10:57 System.map-3.6.0-3.fc18.armv7hl.tegra
-rw-r--r--. 1 root root  3684840 Sep 13 15:53 uImage
-rw-r--r--. 1 root root  3684840 Sep 13 15:53 uImage-3.6.0-3.fc18.armv7hl.tegra
-rw-r--r--. 1 root root 13835837 Sep 13 15:53 uInitrd
-rw-r--r--. 1 root root 13835837 Sep 13 15:53 uInitrd-3.6.0-3.fc18.armv7hl.tegra
-rwxr-xr-x. 1 root root  3684776 Oct  5 10:57 vmlinuz-3.6.0-3.fc18.armv7hl.tegra


# cat /etc/system-release
Fedora release 18 (Spherical Cow)


# popd
~

# umount /mnt/rootfs/boot
# umount /mnt/rootfs

# kpartx -dv <PathToDiskImage>
del devmap : loop0p3
del devmap : loop0p2
del devmap : loop0p1
loop deleted : /dev/loop0

Complete the Process
Please be sure to unmount the disk image partitions and delete the loop device. Failing to do so may leave old allocated devices that are difficult to clean up.


If you build a Versatile Express image for QEMU there is an additional step. You need to extract the kernel and initramfs from the image in order to provide them to QEMU to boot. Fortunately there is a script available (livemedia-modifier), which does this for you, and creates a compressed tarball that includes all you need to run the image from QEMU.

livemedia-modifier --image=<PathToDiskImage> --platform=vexpress


For other platforms, the disk image may be compressed using xz for storage or transferring to other systems, for example:

xz -z9 <PathToDiskImage>

The disk image file will be replaced by a compressed image (.xz extension added).

Notice
Compressing an image on a resource constrained device may take a long time (hours). You may wish to transfer the image to a more powerful system to perform the compression.

Installing the Image

This disk image is suitable to be copied directly to an SDCard. The disk image could similarly be copied to other media, but is configured by default to boot from the SDCard.

To copy this to an SDCard from a workstation, plug the SDCard into a USB adapter, inserted the adapter to an open USB slot, and checked /proc/partitions to see where it is located. For this example, assume it is located on /dev/sdb.

# cat /proc/partitions 
major minor  #blocks  name
   8        0   78150744 sda
   8        1     512000 sda1
   8        2   77637632 sda2
   8       16    7879680 sdb
   8       17    7875584 sdb1

To transfer the image to the device, make sure none of the partitions on that device are mounted, for example:

# umount /dev/sdb1

Then copy the disk image to the raw device.

# xzcat <PathToCompressedDiskImage> | dd of=/dev/sdb
Data Loss
Make certain the target of the dd command is the location of the SDCard device. All partitions and data on this device will be overwritten, so make sure it contains nothing you wish to keep. Again, ALL DATA WILL BE LOST!
Please Be Patient
Depending on the size and speed of the SDCard, this operation may take a while. Do not interrupt the process before it is complete. Do not remove the SDCard.

Once the transfer completes, the partition table will need to be rescanned and updated.

# partprobe /dev/sdb

The device partitions may then be mounted and the contents examined, or the device may be ejected and moved to test booting on the target system.

Running the Image from QEMU

The Versatile Express tarball includes all that is needed to boot the system, including the root filesystem image, and the pre-extracted kernel and initramfs. Also, included for your convenience are two scripts to boot your image. To extract the files use:

# tar Jxvf <PathToCompressedTarball>

You can make use of the scripts provided in the boot directory to launch your image using QEMU:

# cd ./<VExpressDirectory>/boot/

# ./boot-vexpress \
    vmlinuz-<Version-Release> \
    initramfs-<Version-Release>.img \
      ../<VExpressImageName>.img

This boots to a command line login prompt. To boot to the XFCE desktop add the "--gui" command line argument.



Example Kickstarts

Example kickstart files are available via public git repository:

 http://fedorapeople.org/cgit/dmarlin/public_git/arm-kickstarts.git


Example Application

Here is an example of using livemedia-creator on an Arndale board to make an F18 based Fedora Remix image for Arndale.