[Documentation] [TitleIndex] [WordIndex

(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Ubuntu for Intel Atoms

Description: Part one of a three part tutorial illustrating how to install, maintain and deploy a stripped down ubuntu (lucid) on pen drives for intel atoms using an i686 intel build platform.

Tutorial Level: INTERMEDIATE

Next Tutorial: Ubuntu in a Chroot

Installation

Preparations

Installing

Partitioning is actually not terribly important - we'll actually change the way we partition later, this is just so we can get a bootable pen drive up and running. You should now be able to remove the alternative installer pen drive and reboot into your installed pen drive.

Modifications

Once booted, there are some modifications we'll need to make.

Fstab

Actually this is redundant as we'll create our own partitions later, just for the first test.

Key point being, since we can't rely on UUID's (the image will be installed to other pen drives with different uuid's later) edit /etc/fstab and change the drive locations for root and swap.

# <file system> <mount point>   <type>  <options>       <dump>  <pass>

proc            /proc           proc    nodev,noexec,nosuid 0       0

# Root filesystem.
# /dev/sda1 /               ext4    noatime,errors=remount-ro 0       1
# Root filesystem with e2label (e.g. e2label /dev/sda1 ros)
LABEL=ros /               ext4    noatime,errors=remount-ro 0       1

# If using swap
# /dev/sda2 none            swap    sw              0       0
# Swap that has been labelled (e.g. mkswap -L ros_swap /dev/sda2)
# LABEL=ros_swap none            swap    sw              0       0

Grub

Grub2 has some issues in embedded robots, so we'll need some modifications there too.

#GRUB_HIDDEN_TIMEOUT=0
GRUB_CMDLINE_LINUX_DEFAULT="text"
GRUB_CMDLINE_LINUX=""

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
GRUB_DISABLE_LINUX_UUID=true

set timeout=-1 -> set timeout=${GRUB_TIMEOUT}

> sudo update-grub # this recreates /boot/grub/grub.cfg

> sudo grub-install /dev/sda # reinstalls to /dev/sda's mbr

Packages

Updating Repos

Just in case you need to change the mirror, you can edit by hand (probably an easier way to actually switch them all). You might also want to turn off sources. Don't strictly need anything nondefault yet, but its useful to have the partner repository flagged in addition to the defaults. Don't forget to update,

sudo nano /etc/apt/sources.list
sudo apt-get update

Added Packages

You may also want to add the ros ubuntu packages to the base install. However, it's not a bad idea to compile them yourself and optimise them globally for the intel atom. You can then easily install and maintain an ros tree with Unison.

Other

Sudoers

You might want to give the normal user passwordless sudo, and may need to give the apache user sudo rights as well, to do this:

> sudo su -
> cd /etc
> chmod 644 sudoers
> vim sudoers
    # Uncomment to allow members of group sudo to not need a password
    # (Note that later entries override this, so you might need to move
    # it further down)
    %sudo ALL=(ALL) NOPASSWD: ALL
    ros ALL=(ALL) NOPASSWD: ALL
    www-data ALL=NOPASSWD: ALL
> chmod 440 sudoers

Make sure this is at the END of the file otherwise it may get overwritten.

What Now?

The basic platform is now configured and you can use this if you wish. However you will probably run into some inconveniences:

There are also quite a few things you'll need to do to make it truly ros-ready and we'll need an internet connection for that. This is far easier in a chroot, so that will be the next tutorial - Ubuntu in a Chroot.


2019-11-09 12:40