Utilite Linux Installation and Update

From Utilite Wiki

Jump to: navigation, search

Contents

Overview

The procedure described below outlines the steps necessary to update or re-install Ubuntu Linux onto Utilite.

Installation target media

  • Utilite Value and Utilite Standard models use micro-SD card for O/S storage.
  • Utilite Pro model uses internal SSD for O/S storage.

Installation onto SSD

Prepare Installer

  • Download the latest Utilite Linux Installer image to your host PC.
  • Ensure the integrity of the file with md5sum utility. For example:
md5sum  cl-installer_utilite-2_kernel-6.3_2014-12-17.img.xz
output: 82eeb54c4d5245c60fd82c3e983d10e9
  • Unzip the archive to get the dd image of installer (.img file)
  • Create a bootable micro-SD card using dd image of installer from the package. Please refer to Installation From Img Files for instructions.
Admolition note.png Any commercially available SD card of 4GB (or larger) may be used for the installation.

Launch Installer

  • Insert the bootable micro-SD card into the Utilite micro-SD socket and turn on the device.
  • Utilite will automatically boot into the installer LXDE desktop.
  • Double click on the Utilite Image Installer icon to begin installation and follow the installation wizard instructions.

Booting after Installation

  • After the installation is complete, shut down Utilite and remove the installation SD card.
  • Restart Utilite.
Admolition note.png If the installation SD card is not removed, Utilite will automatically boot into the installer.

Installation onto micro-SD

Pre-installation setup requirements

  • Utilite with valid U-Boot boot-loader.
  • Display connected to the HDMI primary display output.
  • USB keyboard and mouse.
  • Power supply.
  • SD card with at least 4GB capacity.
Admolition note.png Any commercially available SD card of 4GB (or larger) may be used for the installation.

Installation procedure prerequisites

  • Use a Linux workstation to download latest Utilite Linux Image.
  • root privileges are required for creating a bootable media.

Installation Using Script

Insert the target micro-SD card into the host Linux workstation.
Download dep-procedure.sh.

Admolition note.png The script has to have executable permission.
chmod 0744 ~/dep-procedure.sh

The following command structure can be used to run the deployment (installation) script for MMC/SD card:

sudo SD=<SD card device as detected by Linux - eg. /dev/sde or /dev/mmcblk0> ROOTFS_IMAGE=<path to the image directory>/utilite_ubuntu-12.04.3_2013-12-11.tar.bz2 <path to the script directory>/dep-procedure.sh

For example if the micro SD detected by Linux as /dev/mmcblk0, the root filesystem image is located in /tmp/ directory, and the dep-procedure.sh is located in the home directory, then the command should look like:

sudo SD=/dev/mmcblk0 ROOTFS_IMAGE=/tmp/utilite_ubuntu-12.04.3_2013-12-11.tar.bz2 ~/dep-procedure.sh

Manual Installation

Insert the target micro-SD card into the host Linux workstation.
Define the following environment variables:

export ROOTFS_IMAGE=<path to the image directory>/utilite_ubuntu-12.04.3_2013-12-11.tar.bz2
export BOOT_MEDIA=<SD card device as detected by the host Linux workstation - eg. /dev/sde or /dev/mmcblk0>

Unmount all boot media partitions

mount | awk -v boot=${BOOT_MEDIA} '{ if ($0~boot) { print "fuser -k "$3" ; umount "$1 } }' | sh -x

Clean up old disk layout:

dd if=/dev/zero of=${BOOT_MEDIA} bs=1M count=1

Re-read partition table:

hdparm -z ${BOOT_MEDIA}

Create partition table:

echo -e "n\np\n1\n\n+100M\na\n1\nt\nc\nn\np\n2\n\n\nw\neof\n" | fdisk ${BOOT_MEDIA}

Re-export BOOT_MEDIA variable:

Admolition note.png SD card can have either 'sdX' or 'mmcblkX' special file name. If a device named as an “mmcblkX” then “p” suffix will appear in the device partition's name after the disk layout has been created by “fdisk”. That is why the BOOT_MEDIA variable has to be reexported in order to meet the device name convention.
export BOOT_MEDIA=`awk -v boot=$BOOT_MEDIA 'BEGIN { if (boot~/mmcblk/) { printf("%s%s",boot,"p") } else { print boot } }'`

Format boot-partition:

mkfs.vfat -n boot ${BOOT_MEDIA}1

Format rootfs-partition:

mkfs.ext4 -O ^has_journal -E stride=2,stripe-width=1024 -b 4096 -L rootfs ${BOOT_MEDIA}2

Mount both partitions:

mkdir -p /media/rootfs && mount ${BOOT_MEDIA}2 /media/rootfs && mkdir -p /media/rootfs/boot && mount ${BOOT_MEDIA}1 /media/rootfs/boot
Admolition note.png Mounting order is important.

Extract the content of the root file system image onto the second partition mounted as /media/rootfs:

tar --numeric-owner -xjpf ${ROOTFS_IMAGE} -C /media/rootfs && sync

Fix up a known dbus-helper issue:

ROOTFS=/media/rootfs
DBUS_HELPER=${ROOTFS}/usr/lib/dbus-1.0/dbus-daemon-launch-helper
MESSAGEBUS_MODE=04754
MESSAGEBUS_GID=`awk '/messagebus/ { split($0,a,":") ; print a[3] }' ${ROOTFS}/etc/group`
chown root:${MESSAGEBUS_GID} ${DBUS_HELPER}
chmod ${MESSAGEBUS_MODE} ${DBUS_HELPER}

Unmount both boot media partitions:

umount ${BOOT_MEDIA}{1,2}

Kernel Update Procedure

cd /tmp
wget "http://compulab.co.il/utilite-computer/download/utilite/kernel/linux-image-imx6_3.0.35-cm-fx6-6.3_all.deb"
  • Ensure the integrity of the file with md5sum utility. For example:
md5sum  linux-image-imx6_3.0.35-cm-fx6-6.3_all.deb
output: c7f7bb53f1346a475e84411594164c47

On The Device Update

Means that the procedure is invoked on a running Utilite.

dpkg -i /tmp/linux-image-imx6_3.0.35-cm-fx6-6.3_all.deb

Off The Device Update

Means that the procedure is invoked on a Linux host with a Utilite boot media.

Admolition note.png The script has to have executable permission.
cd /tmp/
wget "http://utilite-computer.com/download/utilite/tools/kernel-update.sh"
chmod 0744 /tmp/kernel-update.sh
  • Run this script in order to install the latest kernel and modules onto the installation media:
sudo BOOT_MEDIA=<SD/SSD device as detected by the host Linux workstation - eg. /dev/sde or /dev/mmcblk0> KERNEL_DEB_IMAGE=/tmp/linux-image-imx6_3.0.35-cm-fx6-6.3_all.deb /tmp/kernel-update.sh

Booting Utilite with the newly created SD card

Insert the micro-SD card into the Utilite micro-SD socket and turn on the device.
Utilite will automatically boot into the O/S.

Post Install Procedure

Generating openssh-server keys

Admolition note.png The CompuLab Ubuntu image has been released with a pre-installed openssh-server. As a part of the installation procedure the package postinstall script generates RSA, DSA and ECDSA keys for the board it was installed on. Preventing a security issue these keys have been whipped out from the Ubuntu image. In order to regenerate the keys with respect to a new board the openssh-server postinstall script has to be issued once again.

Boot up the Utilite using a created media. Login and issue:

dpkg-reconfigure openssh-server

Serial console package

The purpose of this package is to address the "init 1" serial console issue.

cd /tmp
wget "http://utilite-computer.com/download/utilite/tools/utilite-tools-console-compulab_1.01_all.deb"
dpkg -i utilite-tools-console-compulab_1.01_all.deb

Firmware package

cd /tmp
wget "http://utilite-computer.com/download/utilite/firmware/firmware-cm-fx6_3.0.35-4.0.0_armel.deb"
  • Remove old firmware packages:
Admolition note.png firmware-imx linux-firmware have to be removed.
dpkg -r firmware-imx linux-firmware
  • Install the package:
dpkg -i firmware-cm-fx6_3.0.35-4.0.0_armel.deb
Personal tools