Categories
Linux

Setup a new Ubuntu or Debian system on the Utilite

This is a guide to setup a recent Ubuntu system on a Utilite ARM computer, to replace the official Ubuntu 12.04 OS.

Prerequisites

  • You need to prepare a [kernel with cgroups](/?p=1073 "Building a new Linux kernel for your Utilite Computer") support.
  • An ARM bootable microSD or USB. You can use the official Ubuntu 12.04 [Linux Utilite Image](http://www.compulab.co.il/utilite-computer/wiki/index.php/Utilite_Linux_Image "Linux Utilite Image") on the removable device.
  • Backup any data you have on the original system!

Preparations

  1. Boot from microSD or USB.
  2. Update the system and install debootstrap:

    $ sudo apt-get update
    $ sudo apt-get install debootstrap
    

  3. Mount the SATA root filesystem on /mnt:
    $ sudo mount /dev/sda2 /mnt
    
  4. Clear the filesystem:

    Note
    Make sure you save any data you need, before doing this!.

    $ sudo rm -fr /mnt/*
    

Installation of an Ubuntu or Debian base system

  1. Use debootstrap to install the Ubuntu base system:
    $ sudo debootstrap --foreign --arch=armhf trusty /mnt http://ports.ubuntu.com/
    

    You can use vivid instead of trusty if you are feeling adventurous.

    For a Debian system use this command instead:

    $ sudo debootstrap --foreign --arch armhf jessie /mnt http://ftp.uk.debian.org/debian
    

    You can use stretch or sid instead of jessie if you are feeling lucky.

  2. Chroot into the new system:

    $ sudo mount -o bind /dev /mnt/dev
    $ sudo mount -o bind /dev/pts /mnt/dev/pts
    $ sudo mount -t sysfs /sys /mnt/sys
    $ sudo mount -t proc /proc /mnt/proc
    $ sudo cp /proc/mounts /mnt/etc/mtab
    $ sudo chroot /mnt
    

  3. Second stage debootstrap:

    After you enter the chroot jail, we need to complete the second stage of the base setup:

    # /debootstrap/debootstrap --second-stage
    

Installing additional packages

  1. Setup the correct timezone:
    # dpkg-reconfigure tzdata
    
  2. Add repositories in /etc/apt/sources.list.
  • For Ubuntu:

    deb http://ports.ubuntu.com/ trusty main restricted universe multiverse
    deb http://ports.ubuntu.com/ trusty-security main restricted universe multiverse
    deb http://ports.ubuntu.com/ trusty-updates main restricted universe multiverse
    deb http://ports.ubuntu.com/ trusty-backports main restricted universe multiverse
    
    deb-src http://ports.ubuntu.com/ trusty main restricted universe multiverse
    deb-src http://ports.ubuntu.com/ trusty-security main restricted universe multiverse
    deb-src http://ports.ubuntu.com/ trusty-updates main restricted universe multiverse
    deb-src http://ports.ubuntu.com/ trusty-backports main restricted universe multiverse
    

  • For Debian:
    deb http://ftp.uk.debian.org/debian jessie main contrib non-free
    deb http://ftp.debian.org/debian/ jessie-updates main contrib non-free
    deb http://security.debian.org/ jessie/updates main contrib non-free
    
    deb-src http://ftp.uk.debian.org/debian jessie main contrib non-free
    deb-src http://ftp.debian.org/debian/ jessie-updates main contrib non-free
    deb-src http://security.debian.org/ jessie/updates main contrib non-free
    
  • Run update after adding the repositories:
    # apt-get update
    
  1. Install additional software.
  • We need to create a fake /sbin/initctl to prevent apt from breaking:
    # dpkg-divert --local --rename --add /sbin/initctl
    # ln -s /bin/true /sbin/initctl
    
  • Install the software you need:
    # apt-get -y install language-pack-en ssh isc-dhcp-client net-tools man lsof less
    
  • Remove the fake /sbin/initctl:
    # rm /sbin/initctl
    # dpkg-divert --local --rename --remove /sbin/initctl
    
  1. Setup users:
    # passwd root
    # useradd -m -s /bin/bash utilite
    # passwd utilite
    # usermod -a -G adm,cdrom,sudo,dip,plugdev utilite
    
  2. Setup a kernel:

    Now you need to deploy the [kernel we prepare earlier](/?p=1073#toc-deploy-the-tarball "Building a new Linux kernel for your Utilite Computer") and reboot.

Choose a role for your system

  1. After you reboot you may find that networking is not working. If you are in a dhcp enabled network run dhclient to get an IP address:

    # dhclient
    

  2. Upgrade the system to the latest upgrades:
    # apt-get update
    # apt-get -y dist-upgrade
    
  3. Check the available roles
  • On Ubuntu you may want to install tasksel (already installed on Debian):

    # apt-get install tasksel

  • See the available roles on Ubuntu:

    # tasksel --list-tasks
    i server Basic Ubuntu server
    i openssh-server OpenSSH server
    u dns-server DNS server
    u lamp-server LAMP server
    u mail-server Mail server
    u postgresql-server PostgreSQL database
    u print-server Print server
    u samba-server Samba file server
    u tomcat-server Tomcat Java server
    u cloud-image Ubuntu Cloud Image (instance)
    u virt-host Virtual Machine host
    u ubuntustudio-graphics 2D/3D creation and editing suite
    u ubuntustudio-audio Audio recording and editing suite
    u edubuntu-desktop-gnome Edubuntu desktop
    u kubuntu-active Kubuntu Active
    u kubuntu-desktop Kubuntu desktop
    u kubuntu-full Kubuntu full
    u ubuntustudio-font-meta Large selection of font packages
    u lubuntu-desktop Lubuntu Desktop
    u lubuntu-core Lubuntu minimal installation
    u mythbuntu-frontend Mythbuntu frontend
    u mythbuntu-backend-master Mythbuntu master backend
    u mythbuntu-backend-slave Mythbuntu slave backend
    u ubuntustudio-photography Photograph touchup and editing suite
    u ubuntustudio-publishing Publishing applications
    u ubuntu-gnome-desktop Ubuntu GNOME desktop
    u ubuntu-desktop Ubuntu desktop
    u ubuntu-usb Ubuntu desktop USB
    u ubuntustudio-video Video creation and editing suite
    u xubuntu-desktop Xubuntu desktop
    u edubuntu-dvd-live Edubuntu live DVD
    u kubuntu-active-live Kubuntu Active Remix live CD
    u kubuntu-live Kubuntu live CD
    u kubuntu-dvd-live Kubuntu live DVD
    u lubuntu-live Lubuntu live CD
    u ubuntu-gnome-live Ubuntu GNOME live CD
    u ubuntustudio-dvd-live Ubuntu Studio live DVD
    u ubuntu-live Ubuntu live CD
    u ubuntu-usb-live Ubuntu live USB
    u xubuntu-live Xubuntu live CD
    u manual Manual package selection

  • See the available roles on debian:

    $ tasksel --list-tasks
    i desktop   Debian desktop environment
    u gnome-desktop GNOME
    u xfce-desktop  Xfce
    u kde-desktop   KDE
    u cinnamon-desktop  Cinnamon
    u mate-desktop  MATE
    i lxde-desktop  LXDE
    u web-server    web server
    u print-server  print server
    u ssh-server    SSH server
    u laptop    laptop
    

  1. Choose a role.

    If you would like a Desktop system, I suggest you choose something light like lubuntu-desktop or lxde-desktop.

  • Installing Lubuntu (Ubuntu):

    # tasksel --task-packages lubuntu-desktop | xargs apt-get -y install
    

    I prefer this method rather than the [TUI](https://en.wikipedia.org/wiki/Text-based_user_interface "Text-based User Interface") of tasksel, so as to have better overview and control of the process. Keep an eye on it every now and then, because it will ask you about keyboard-configuration and other questions. Select the default settings if you are unsure.

  • Installing LXDE Desktop (Debian):

    # apt-get install task-lxde-desktop network-manager
    

    For Desktop systems it may be a good idea to install network-manager as well.

  • Add the vivante GPU module on startup:

    # echo vivante >> /etc/modules
    

After you finish you can reboot your system and start playing.

References

  • https://github.com/umiddelb/armhf/wiki/Installing-Ubuntu-14.04-on-the-utilite-computer-from-scratch
  • https://wiki.debian.org/InstallingDebianOn/CompuLab/PC-Utilite/wheezy

By Theodotos Andreou

An old school Linux guy, a founding member of Ubuntucy and a founding member of Cyprus FOSS community. Currently working as sysadmin in the Cyprus University of Technology.

https://www.ubuntucy.org

https://ellak.org.cy

2 replies on “Setup a new Ubuntu or Debian system on the Utilite”

Hello Theodos!

Thank you for this article, it helped me on switching from Arch Linux ARM to Ubuntu 14.04 LTS on my Utilite home server. Few remarks and hints:

1) If you use the official Ubuntu 12.04 Linux Utilite Image, the bootstrap version is too old and you cannot update the system to Debian Jessie. If you have advice how to install newer version which support it would be nice.

2) Adding reposities for apt was a pain for newbie because you have to use vi editor instead something simpler like nano/pico. Google can help of course…

3) After install the user account “utilite” was not functional (could not even log in with it), I’ve had to re-create it afterwards.

I did no have time to compile kernel my self -> I’ve just used the Arch Linux Arm kernel from the installation package and renamed it. At least server system which need only the network interface seems to work ok.

Hello Theodos!

Hi!

Thank you for this article, it helped me on switching from Arch Linux ARM to Ubuntu 14.04 LTS on my Utilite home server. Few remarks and hints:

I am glad you found it useful :).

1) If you use the official Ubuntu 12.04 Linux Utilite Image, the bootstrap version is too old and you cannot update the system to Debian Jessie. If you have advice how to install newer version which support it would be nice.

It’s been a long time when I did this so not sure. I guess you could build a user space chroot jailed Ubuntu 14.04 under 12.04 and run debootstrap inside there. Obviously an overkill but a nice drill if you have the time to play.

2) Adding reposities for apt was a pain for newbie because you have to use vi editor instead something simpler like nano/pico. Google can help of course…

You can run this:

cat > /etc/apt/sources.list << EOF
deb http://ports.ubuntu.com/ trusty main restricted universe multiverse
deb http://ports.ubuntu.com/ trusty-security main restricted universe multiverse
deb http://ports.ubuntu.com/ trusty-updates main restricted universe multiverse
deb http://ports.ubuntu.com/ trusty-backports main restricted universe multiverse

deb-src http://ports.ubuntu.com/ trusty main restricted universe multiverse
deb-src http://ports.ubuntu.com/ trusty-security main restricted universe multiverse
deb-src http://ports.ubuntu.com/ trusty-updates main restricted universe multiverse
deb-src http://ports.ubuntu.com/ trusty-backports main restricted universe multiverse
EOF

3) After install the user account “utilite” was not functional (could not even log in with it), I’ve had to re-create it afterwards.

These commands didn’t work in the first place?

useradd -m -s /bin/bash utilite
passwd utilite

I did no have time to compile kernel my self -> I’ve just used the Arch Linux Arm kernel from the installation package and renamed it. At least server system which need only the network interface seems to work ok.

Kernels are generally independent from user space programs so I am not surprised :).

Leave a Reply

Your email address will not be published. Required fields are marked *