Skip to main content

Create a Custom ROS Kinetic ISO using Ubuntu Desktop 16.04

Install Prerequisites in the build machine

sudo apt-get -y install uck syslinux syslinux-utils
  • UCK needs a working directory. By default it is ~/tmp
  • All UCK tools require root privileges for mounting and unmounting
  • When this is done, the root filesystem will be located in ~/tmp/remaster-root

Mount source ISO image

sudo uck-remaster-unpack-iso ubuntu-16.04.4-desktop-amd64.iso
sudo uck-remaster-unpack-rootfs

Change root to the image filesystem. Now you can install packages using apt-get

sudo uck-remaster-chroot-rootfs

Add Ubuntu repository list

cat | awk '$0' <<END > /etc/apt/sources.list
deb xenial main restricted
deb xenial-updates main restricted
deb xenial universe
deb xenial-updates universe
deb xenial multiverse
deb xenial-updates multiverse
deb xenial-backports main restricted universe multiverse
deb xenial-security main restricted
deb xenial-security universe
deb xenial-security multiverse

Add ROS repository

# Accept software from
sh -c 'echo "deb $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

# Setup repository keys
apt-key adv --keyserver hkp:// --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116

Update repository list and upgrade linux packages

apt-get -y update
apt-get -y upgrade

Install ROS Kinetic Desktop Full package

apt-get -y install ros-kinetic-desktop-full

Setup environment variables

grep -q -F "source /opt/ros/kinetic/setup.bash" /etc/bash.bashrc || echo 'source /opt/ros/kinetic/setup.bash' | tee --append /etc/bash.bashrc

Change the environment of your current shell

source /etc/bash.bashrc

Install Aziro dependancies

apt-get install -y vim libopencv-dev ros-kinetic-opencv-candidate python-rosinstall python-rosinstall-generator python-wstool build-essential libconfig++-dev ros-kinetic-serial ros-kinetic-navigation ros-kinetic-yocs-cmd-vel-mux ros-kinetic-frontier-exploration ros-kinetic-rviz-visual-tools ros-kinetic-joy ros-kinetic-joy-teleop ros-kinetic-teleop-twist-joy ros-kinetic-urg-node ros-kinetic-usb-cam libopenni2-0 dh-make devscripts

Install some management tools

apt-get install -y openssh-server htop

Remove software that you don't need

apt-get remove libreoffice-core libreoffice-common thunderbird --purge -y
apt-get remove unity-lens-shopping --purge -y
apt-get autoremove --purge -y

Initialize rosdep

# Run this as root
rosdep init

Create Aziro User

adduser --gecos "Aziro" aziro
Password: [email protected]

Add Aziro user into sudoers group

usermod -aG sudo aziro

Avoid password prompt when executing the sudo commands. Add the following line into /etc/sudoers


Disable APT updates.

cat | awk '$0' <<END > /etc/apt/preferences
Package: *
Pin: release *
Pin-Priority: -1

Clear terminal history and exit from the chroot

cat /dev/null > ~/.bash_history && history -c && exit

Now you can create the remastered ISO image. You MUST exit from the chroot before creating the ISO. Remastered ISO file can be found under ~/tmp/remaster-new-files

sudo uck-remaster-pack-rootfs -c
sudo uck-remaster-pack-iso aziro-ubuntu-16.04.4-desktop-amd64-$(date '+%Y%m%d%H%M%S').iso -h -g -d "Aziro Ubuntu"


  1. Customize Ubuntu Desktop Live CD/USB
  2. mkusb/isohybrid
  3. Ubuntu install of ROS Kinetic