From Fedora Project Wiki
(Created page with "{{needs love}} {{admon/note|We need more hands on board!| We need more folks to improve the distribution process. We need '''YOU'''!}} =How To Make a Fedora Image on an ARM H...")
 
mNo edit summary
 
(23 intermediate revisions by 2 users not shown)
Line 4: Line 4:
=How To Make a Fedora Image on an ARM Host(Arndale)=
=How To Make a Fedora Image on an ARM Host(Arndale)=


== ARM host Hardware Requirements ==
== ARM Host Hardware Requirements ==


RAM >= 2GB
  RAM >= 2GB
  SSD (for swap and storage)


SSD (for swap and storage)
We will use an Arndale board (running '''F17''') with ADATA SP900 128G SSD to make an '''F18''' image in this Wiki.


So we will use Arndale board(running '''F17''') and ADATA SP900 128G SSD to make '''F18''' image in this Wiki.
[[File:Arndale with SSD.jpg|800px]]


You can find the SSD supported by Arndale at [https://wiki.linaro.org/Boards/Arndale/Setup/EnterpriseUbuntuServer Linaro website].


== Deloying a Fedora 17 on Arndale ==
{{admon/note|Why did I choose Arndale?|It is the most powerfull development board I could get, and it meets all the requirements (RAM is 2GB and a SATA interface is built in). }}


[[http://tekkamanninja.fedorapeople.org/boards/arndale/images/F17-arndale-201304221157.img.gz|Fedora 17 image for Arndale Board]].


Decompression the file and Flash the image to SD card:


{{{
{{admon/note|Why do we have to make the Fedora 18 image on Fedora 17|Because the current version of livemedia-creator (using anaconda, lorax, and python-blivet) in Fedora 18 is unreliable (only works a small percentage of the time), but the tools (the 'patched' versions) on Fedora 17 work consistently and reliably to make images (note: they require a different kickstart configuration file than stock Fedora 18 tools would use). }}
$ sudo dd if=F17-arndale-201304221157.img of=${DEV}
}}}


Flash u-boot to SD card:
== Deploying Fedora 17 on Arndale ==


{{{
[[http://tekkamanninja.fedorapeople.org/boards/arndale/images/F17-arndale-201304221157-uboot-buildin.img.gz Fedora 17 image for Arndale Board]].
$ wget http://tekkamanninja.fedorapeople.org/boards/arndale/u-boot/arndale-bl1.bin
$ wget http://tekkamanninja.fedorapeople.org/boards/arndale/u-boot/smdk5250-spl.bin
$ wget http://tekkamanninja.fedorapeople.org/boards/arndale/u-boot/u-boot.bin
$ sudo dd if=arndale-bl1.bin  of=${DEV} bs=512 seek=1
$ sudo dd if=smdk5250-spl.bin of=${DEV} bs=512 seek=17
$ sudo dd if=u-boot.bin of=${DEV} bs=512 seek=49
$ sync
}}}


where ${DEV} can be `/dev/mmcblkN` or `/dev/sdN`.
Decompress the file and flash the image to the SD card:


Then insert the SD card into the Arndale and boot.
  $ sudo dd if=F17-arndale-201304221157-uboot-buildin.img of=${DEV}


== Attach a SSD to ARM host ==
where ${DEV} can be `/dev/mmcblkN` or `/dev/sdN`.
 
We need a SSD for bigger swap and storage.


Format SSD into two partitions like below :
Then insert the SD card into the Arndale board and boot.


{{{
== Attach an SSD to ARM host ==
[root@arndale-f17-v7hl fuwei]# fdisk -l /dev/sda


Disk /dev/sda: 128.0 GB, 128035676160 bytes
We need an SSD for bigger swap and storage.
255 heads, 63 sectors/track, 15566 cylinders, total 250069680 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x6fea5476


  Device Boot      Start        End      Blocks  Id  System
Format the SSD into two partitions like below :
/dev/sda1            2048    8390655    4194304  83  Linux
/dev/sda2        8390656  250069679  120839512  83  Linux
}}}


  # fdisk -l /dev/sda
 
  Disk /dev/sda: 128.0 GB, 128035676160 bytes
  255 heads, 63 sectors/track, 15566 cylinders, total 250069680 sectors
  Units = sectors of 1 * 512 = 512 bytes
  Sector size (logical/physical): 512 bytes / 512 bytes
  I/O size (minimum/optimal): 512 bytes / 512 bytes
  Disk identifier: 0x6fea5476
 
    Device Boot      Start        End      Blocks  Id  System
  /dev/sda1            2048    8390655    4194304  83  Linux
  /dev/sda2        8390656  250069679  120839512  83  Linux


=== format 4BG swap partition and mount it ===
=== format 4GB swap partition and mount it ===
{{{
# mkswap /dev/sda1
# swapon /dev/sda1
# swapoff /dev/mmcblk1p2
# free
            total      used      free    shared    buffers    cached
Mem:      2062708      73120    1989588          0      3180      21252
-/+ buffers/cache:      48688    2014020
Swap:      4194300          0    4194300


}}}
  # mkswap /dev/sda1
  # swapon /dev/sda1
  # swapoff /dev/mmcblk1p2
  # free
              total      used      free    shared    buffers    cached
  Mem:      2062708      73120    1989588          0      3180      21252
  -/+ buffers/cache:      48688    2014020
  Swap:      4194300          0    4194300


=== format another partition and mount it as Extended Storage(ES) ===
=== format another partition and mount it as Extended Storage (ES) ===
{{{
# mkfs.ext4 -L "es" /dev/sda2
# mount /dev/sda2 /es/
}}}


=== make directory structure on Extended Storage(ES) ===
  # mkfs.ext4 -L "es" /dev/sda2
{{{
  # mount /dev/sda2 /es/
[root@arndale-f17-v7hl /]# tree /es/
/es/
├── lost+found
└── scratch
    └── fuwei
        ├── arndale
        │  ├── F18
        │  │  ├── images
        │  │  └── kickstarts
        │  └── u-boot
        └── scripts


}}}
=== make the directory structure on Extended Storage (ES) ===


  # tree /es/
  /es/
  ├── lost+found
  └── scratch
      └── username
          ├── arndale
          │  ├── F18
          │  │  ├── images
          │  │  └── kickstarts
          │  └── u-boot
          └── scripts


== Install anaconda and lorax ==
== Install anaconda and lorax ==


For making image on ARM host, we need to install the 'patched' versions of anaconda and lorax from '''xpfa'''.
For making an image on the F17 ARM host, we need to install the 'patched' versions of anaconda and lorax from the '''xpfa''' repository.


{{{
  # yum --nogpgcheck install http://dmarlin.fedorapeople.org/packages/FedoraArm/RPMS/noarch/xpfa-17-1.2.noarch.rpm
# yum --nogpgcheck install http://dmarlin.fedorapeople.org/packages/FedoraArm/RPMS/noarch/xpfa-17-1.2.noarch.rpm
  # yum --enablerepo=xpfa install anaconda lorax
# yum --enablerepo=xpfa install anaconda lorax
}}}


== Get a kickstart file ==
== Get a kickstart file ==


You can download a example kickstart file from [[http://tekkamanninja.fedorapeople.org/boards/arndale/kickstarts/F18-arndale-console_in_f17.ks|Fedora 17 kickstart file for Arndale Board]]
You can download an example kickstart file from [[http://tekkamanninja.fedorapeople.org/boards/arndale/kickstarts/F18-arndale-console_in_f17.ks Fedora 17 kickstart file for the Arndale Board]]


This kickstart file can make a '''F18''' image in '''F17''' ARM host for Arndale Board.
This kickstart file can make an '''F18''' image for the Arndale Board on an '''F17''' ARM host.


Put it to /es/scratch/fuwei/arndale/F18/kickstarts/
Put the kickstart configuration file in /es/scratch/username/arndale/F18/kickstarts/.


== Building image using livemedia-creator ==
== Building image using livemedia-creator ==


The shell script for making image is below:
The shell script for making the image is below:
 
{{{
#!/bin/sh
BUILD_TIME=`date +%Y%m%d%H%M`


livemedia-creator \
  #!/bin/sh
--no-virt --make-disk \
  BUILD_TIME=`date +%Y%m%d%H%M`
--armplatform=None \
 
--tmp=/es/scratch/fuwei/arndale/F18/images/ \
  livemedia-creator \
--image-name=F18-arndale-${BUILD_TIME}.img \
  --no-virt --make-disk \
--ks=/es/scratch/fuwei/arndale/F18/kickstarts/F18-arndale-console_in_f17.ks
  --armplatform=None \
}}}
  --tmp=/es/scratch/username/arndale/F18/images/ \
  --image-name=F18-arndale-${BUILD_TIME}.img \
  --ks=/es/scratch/username/arndale/F18/kickstarts/F18-arndale-console_in_f17.ks


Put it into /es/scratch/fuwei/scripts, add execute permission and execute it.
Put it into /es/scratch/username/scripts, add execute permission and execute it.


Note: If you met any error in build procedure. you had better to reboot the board and execute "anaconda-cleanup", then try again.
Note: If you encounter any errors in the build procedure, you are better off rebooting the board and executing "anaconda-cleanup", and then trying again.

Latest revision as of 18:22, 6 May 2013

Cog.png
This page needs some love
This page should be revised or reconstructed to be more helpful. Problems may include being out of step with current team or project status or process.
Note.png
We need more hands on board!
We need more folks to improve the distribution process. We need YOU!

How To Make a Fedora Image on an ARM Host(Arndale)

ARM Host Hardware Requirements

 RAM >= 2GB
 SSD (for swap and storage)

We will use an Arndale board (running F17) with ADATA SP900 128G SSD to make an F18 image in this Wiki.

Arndale with SSD.jpg

You can find the SSD supported by Arndale at Linaro website.

Note.png
Why did I choose Arndale?
It is the most powerfull development board I could get, and it meets all the requirements (RAM is 2GB and a SATA interface is built in).


Note.png
Why do we have to make the Fedora 18 image on Fedora 17
Because the current version of livemedia-creator (using anaconda, lorax, and python-blivet) in Fedora 18 is unreliable (only works a small percentage of the time), but the tools (the 'patched' versions) on Fedora 17 work consistently and reliably to make images (note: they require a different kickstart configuration file than stock Fedora 18 tools would use).

Deploying Fedora 17 on Arndale

[Fedora 17 image for Arndale Board].

Decompress the file and flash the image to the SD card:

 $ sudo dd if=F17-arndale-201304221157-uboot-buildin.img of=${DEV}

where ${DEV} can be /dev/mmcblkN or /dev/sdN.

Then insert the SD card into the Arndale board and boot.

Attach an SSD to ARM host

We need an SSD for bigger swap and storage.

Format the SSD into two partitions like below :

 # fdisk -l /dev/sda
 
 Disk /dev/sda: 128.0 GB, 128035676160 bytes
 255 heads, 63 sectors/track, 15566 cylinders, total 250069680 sectors
 Units = sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 512 bytes
 I/O size (minimum/optimal): 512 bytes / 512 bytes
 Disk identifier: 0x6fea5476
 
    Device Boot      Start         End      Blocks   Id  System
 /dev/sda1            2048     8390655     4194304   83  Linux
 /dev/sda2         8390656   250069679   120839512   83  Linux

format 4GB swap partition and mount it

 # mkswap /dev/sda1
 # swapon /dev/sda1
 # swapoff /dev/mmcblk1p2 
 # free
              total       used       free     shared    buffers     cached
 Mem:       2062708      73120    1989588          0       3180      21252
 -/+ buffers/cache:      48688    2014020
 Swap:      4194300          0    4194300

format another partition and mount it as Extended Storage (ES)

 # mkfs.ext4 -L "es" /dev/sda2
 # mount /dev/sda2 /es/

make the directory structure on Extended Storage (ES)

 # tree /es/
 /es/
 ├── lost+found
 └── scratch
     └── username
         ├── arndale
         │   ├── F18
         │   │   ├── images
         │   │   └── kickstarts
         │   └── u-boot
         └── scripts

Install anaconda and lorax

For making an image on the F17 ARM host, we need to install the 'patched' versions of anaconda and lorax from the xpfa repository.

 # yum --nogpgcheck install http://dmarlin.fedorapeople.org/packages/FedoraArm/RPMS/noarch/xpfa-17-1.2.noarch.rpm
 # yum --enablerepo=xpfa install anaconda lorax

Get a kickstart file

You can download an example kickstart file from [Fedora 17 kickstart file for the Arndale Board]

This kickstart file can make an F18 image for the Arndale Board on an F17 ARM host.

Put the kickstart configuration file in /es/scratch/username/arndale/F18/kickstarts/.

Building image using livemedia-creator

The shell script for making the image is below:

 #!/bin/sh
 BUILD_TIME=date +%Y%m%d%H%M
 
 	livemedia-creator \
 	--no-virt --make-disk \
 	--armplatform=None \
 	--tmp=/es/scratch/username/arndale/F18/images/ \
 	--image-name=F18-arndale-${BUILD_TIME}.img \
 	--ks=/es/scratch/username/arndale/F18/kickstarts/F18-arndale-console_in_f17.ks

Put it into /es/scratch/username/scripts, add execute permission and execute it.

Note: If you encounter any errors in the build procedure, you are better off rebooting the board and executing "anaconda-cleanup", and then trying again.