Changes

Jump to: navigation, search

Pidora SOP

6,475 bytes added, 20:00, 6 February 2015
Setting up environment
{{Pidora}}[[Category:Pidora 18 (Raspberry Pi Fedora Remix)]][[Category:OSTEP SOP]]
 
{{Admon/important|Seneca-Specific SOP|This SOP is specific to the environment at Seneca CDOT since it refers to specific hosts, configurations, and tools. It is intended solely as a reference for the OSTEP team at CDOT, but the content may be useful to readers in other contexts.}}
 
= Intro =
This page covers how one can manage the various needed parts of a complete release process. This includes the other SOP pages containing file configurations and/or quick command line references for the following procedures:
# Setting up environment
# Building packages
# Signing packages
# Creating repositories
# Composing images
 
= Setting up environment =
 
Follow the instructions on Chris's blog post: http://blog.chris.tylers.info/index.php?/archives/272-Acessing-the-armv6hl-Koji-Buildsystem.html
 
For Fedora 21 or later, you need to enable MD5 verification before using koji commands (according to [https://bugzilla.redhat.com/show_bug.cgi?id=1157260 here]):
<pre>
export OPENSSL_ENABLE_MD5_VERIFY=1
</pre>
= Building Packages =
== Post Commands ==
* Repo analysis: <pre>repoclosure --arch=armv6hl --arch=noarch --repofrompath=v6,http://japan.proximity.on.ca/repos/f18f20-build/latest/armv6hl/ -r v6 | tee /tmp/reporeport.log</pre>
= Sign, Mash, and Rsync Together! =
== Prerequisites ==
* Must setup passwordless passphraseless logins from root@japan to all users in the script
* Must have a working mash configuration: [[Pidora_SOP#Creating_Repositories | See mash below]]
* Must have a configured sigul user with access to the signing key
* Make sure that any externally called scripts are in the correct locations
 
== Running pidora-update.py ==
* Check which hosts can connect successfully
 
** Also shows default configurations
* Get a list of unsigned packages
 
** Can check a single tag with --koji-tag=<tag-name>
pidora-smr --list-unsigned --pidora 19
pidora-smr --list-unsigned --pidora 20
 
 
</pre>
* Changing the configurations with command line options
 
** Sign using a different user, on a single koji tag
= Composing Images =
<s>Before you can attempt to run a compose you should check to make sure that the following packages are installed:
* anaconda
* lorax</s> Because livemedia-tools is not stable software for creating pidora images we have a modified version of livemedia-creator that works well however this software is currently out of date, so we have decided to keep using this version of livemedia to produce future images. You can accessing our custom version of livemedia which is located on the host machine cal-7-2 within a chroot log onto the host machine iraq.proximity.on.ca then ssh into the compose node host machine cal-7-2.*ssh user@iraq.proximity.on.ca*ssh root@cal-7-2 *Note if you restart or the node is shutdown you will need to bind mount /proc, /dev, /sys to f17v6/proc, f17v6/dev, f17v6/sys with the following command before you chroot.*mount -o bind /proc/ f17v6/proc*mount -o bind /dev/ f17v6/dev*mount -o bind /sys/ f17v6/sys 
SSH to the arm device you want to run the compose on.
chroot into the armv6hl directory on the arm device.
* chroot /root/f17v6
cd into the livemedia directory or where ever your kickstart file is located.
* cd /livemedia/f20
Run the provided Livemedia-Creator command provided below to start the compose process.
== Example Livemedia-Creator Command ==
* livemedia-creator --make-disk --no-virt --image-only --keep-image --ks=pidora-f20.ks
 
Estimated time for compilation (15mins)
== Example Kickstart File ==
Pidora 18 kickstart: http://zenit.senecac.on.ca/wiki/index.php/Pidora_kickstart Pidora 2014 kickstart: http://zenit.senecac.on.ca/wiki/index.php/Pidora-2014-kickStart == Example Livemedia-Creator Command Package List File ==* livemedia Pidora 2014 Package List kickstart: http://zenit.senecac.on.ca/wiki/index.php/Pidora-creator 2014-Packagelist-make-disk --no-virt --image-only --keep-image --ks=rpfr-18.ks Estimated time for compilation (27mins)kickStart
* command details
<br>LABEL="boot" /boot vfat noauto,comment=systemd.automount 1 2
<br>EOF
 
 
== Preparing The Final Image ==
 
When you have a successful disk image ready the boot partition needs to be reformatted with a vfat filesystem type, the Raspberry Pi will only boot with a vfat boot partition. This can be done manually or by using the script provided below. The final image's rootfs also needs to be resized to minimize the size of file system, there is also a script provided to do this.
 
* all the preparation scripts are located in /var/tmp/ directory along with the disk*.img file created by livemedia-creator.
* <s>Note these scripts work best if you copy them to your host machine and run them locally.</s> If you choose todo so you will need to scp the disk_image to your host machine.
 
== Vfat Reformating Script ==
This script copies the boot partition to a temporary folder then reformat's that partition to vfat from ext4 it also removes the swap partition that is created by live-media-creator the swap partition is created during the firstboot process by the user.
 
Pidora 2014 Reformating Boot Partition Script: http://zenit.senecac.on.ca/wiki/index.php/Pidora-2014-Reformating-Boot-Script
 
Example usage
* revfat disk_image.img
 
== Checking The Partition FStype ==
After executing the revfat script your partition layout should look similar to this:
 
*fdisk -l disk_image.img
<pre>
Device Boot Start End Blocks Id System
diskz9llIY.img1 * 2048 104447 51200 c W95 FAT32 (LBA)
diskz9llIY.img2 104448 6248447 3072000 83 Linux
</pre>
 
== Shrinking The Image ==
Script to take an SD card image (such as for a Raspberry Pi) with a dos disklabel and two partitions (boot vfat and rootfs extX), and shrink it so that the rootfs (2nd partition) is as short as possible plus a small free space allowance.
Pidora 2014 Shrink Script: http://zenit.senecac.on.ca/wiki/index.php/Pidora-2014-Shrink-Script
 
Example usage
* shrink disk_image.img
 
*Note sometimes this script does not unmount the tmp directory it mounts /tmp/tmp.v9ADZEWeP2.
 
script output
<pre>
Shrinking /var/tmp/diskTLTF4t.img to minimum size plus 220 MB.
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/loop0p2 2.9G 1.8G 1.1G 63% /tmp/tmp.v9ADZEWeP2
220+0 records in
220+0 records out
230686720 bytes (231 MB) copied, 2.30747 s, 100 MB/s
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/loop0p2 2.9G 2.0G 832M 71% /tmp/tmp.v9ADZEWeP2
e2fsck 1.42 (29-Nov-2011)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
rootfs: 77485/192000 files (0.1% non-contiguous), 516702/768000 blocks
 
 
Disk /var/tmp/diskTLTF4t.img: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders, total 8388608 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: 0x0009c1ec
 
Device Boot Start End Blocks Id System
/var/tmp/diskTLTF4t.img1 * 2048 104447 51200 c W95 FAT32 (LBA)
/var/tmp/diskTLTF4t.img2 104448 4234064 2064808+ 83 Linux
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/loop0p2 2.0G 2.0G 0 100% /tmp/tmp.v9ADZEWeP2
removed `/tmp/tmp.v9ADZEWeP2/resize-reserve'
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/loop0p2 2.0G 1.8G 133M 93% /tmp/tmp.v9ADZEWeP2
Image shrink completed.
</pre>
 
== Preparing Pidora Noobs distribution ==
This script extracts and compresses the boot and rootfs of a Pidora image. It also generates and updates all the necessary json files, images and release notes required by the Noobs distribution.
Pidora 2014 Noobs Script: http://zenit.senecac.on.ca/wiki/index.php/Pidora-2014-Noobs-Script
 
*Note this script uses PV (pipe viewer), if it's not already installed on the system please install it.
 
Example Usage
* makenoobs disk_image
 
== Testing Pidora Noobs ==
 
Download the latest version of Noobs: http://www.raspberrypi.org/downloads/ (NOOBS Offline and network install)
unzip the Noobs package then replace the files located in the os/Pidora directory with the files generated by the makenoobs script
 
<pre>NOOBs Pidora OS location: ./Noobs-Pidora/14-08-18
./Noobs-Pidora/14-08-18
├── boot.tar.xz
├── os.json
├── partition_setup.sh
├── partitions.json
├── Pidora.png
├── release-notes.txt
├── rootfs.tar.xz
├── slides
│ ├── A.png
│ ├── B.png
│ ├── C.png
│ ├── D.png
│ └── E.png
└── slides_vga
├── A.png
├── B.png
├── C.png
├── D.png
├── E.png
└── Pidora.png
 
2 directories, 21 files
</pre>

Navigation menu