Difference between revisions of "Installing Ubuntu 10.04 on Gumstix Overo"

From Gumstix User Wiki
Jump to: navigation, search
Line 1: Line 1:
I have installed Ubuntu 10.04 on a gumstix overo using a collection of instructions found online. A summary of the instructions is below for convenience. This is my first attempt and there are a few issues that I am going to try to resolve.
+
== Ubuntu on Overo ==
 +
Constructing an Ubuntu root file system for the Gumstix Overo is surprisingly easy with the rootstock utility.  Unfortunately, Ubuntu (particularly a version including a graphical desktop) likes lots of RAM but the familiarity of Ubuntu for some users may outweigh occasional sluggishness. These instructions were tested on an Ubuntu 10.04 desktop machine; they should work for any recent Debian-based flavour of Linux.
  
I used an ubuntu 10.04 desktop machine as my working environment for these instructions.
+
== Make a MicroSD card ==
 +
The rootstock utility builds a root file system inside a virtual arm machine supplied by qemu.  First, install the required packages.
 +
<code>
 +
$ sudo apt-get install rootstock qemu
 +
</code>
 +
Next, use a command like the one shown below to make a root file system; check out 'man rootstock' for some extra options.  Note: this will take an hour or two.
 +
<code>
 +
$ sudo rootstock -serial ttyS2 -d lucid -f "gumstix" -s lxde,gdm,openssh-server,x11vnc
 +
</code>
 +
* the '-d' option specifies the distribution release: in this case, Ubuntu Lucid (10.04).
 +
* the '-s' option specifies the list of packages to install: in this case, we install a lightweight desktop and a standard login manager as well as ssh & VNC servers so we can connect remotely.
 +
* the user name ('-l') and password ('-p') options don't seem to work at the moment; see [Configuring Ubuntu] for more information.
  
1. Install rootstock: ‘sudo apt-get install rootstock qemu’
+
You should now have a spiffy root file system tarball so now we just need to create a bootable microSD with a standard bootloader and kernel.
  
Rootstock is a utility used to make a rootFS for a port
+
Format a microSD card as per [http://www.gumstix.net/Documentation/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/109.html usual]; you should copy a [http://www.sakoman.com/feeds/omap3/glibc/images/overo/201009091145/ recent] MLO, u-boot, and uImage to the boot partition.  Extract the generated root file system to the second partition of the microSD card.
Qemu is required and for some reason was not installed at the same time
+
  
2. make rootfs using rootstock. This may take several hours
+
Finally, the loadable modules in the file system should match the kernel. For users that don't want to build a kernel, you can use this [http://dl.dropbox.com/u/211887/Ubuntu/uImage-2.6.34-r88-overo.bin 2.6.34 kernel] and the associated [http://dl.dropbox.com/u/211887/Ubuntu/modules-2.6.34-r88-overo.tgz modules] tarball; this is approximately the Gumstix Overo kernel from September 9th, 2010. Extract the modules file into the second partition over top of the root file system. E.g. for a root partition mounted at /media/rootfs:
 
+
<code>
I used the following command but doing ‘man rootstock’ will give you a list of advanced commands
+
sudo tar xaf modules-2.6.34-r88-overo.tgz -C /media/rootfs
I set my distribution with -d to lucid because I wanted ubuntu 10.04
+
</code>
 
+
the openssh-server will allow you to connect your gumstix to the internet and ssh in
+
 
+
‘sudo rootstock -f “Gumstix” -l “gumstix” -p “overo” -n “Gumstix Overo
+
Ubuntu” -s lxde,gdm,openssh-server,x11vnc -t “America/Vancouver” –serial ttyS2 -d lucid –locale en_US.UTF-8′
+
 
+
Note 1: the user gumstix and password overo do not work because the user does not get created properly. More on how to deal with that later
+
 
+
Note 3: the lxde,gdm is good for a minimal install for use on a small device with limited power and storage space. Good for a headless system.
+
 
+
Link for more info on making a rootfs
+
https://wiki.ubuntu.com/ARM/RootfsFromScratch
+
 
+
3. Get MLO and u-boot from this link
+
http://www.sakoman.com/feeds/omap3/glibc/images/overo/201009091145/
+
 
+
4. Get your kernel u-image This kernel is based on the 2.6.34 kernel. Newer and older kernels should work but you will have to find modules for that kernel. (see step 8 )
+
http://dl.dropbox.com/u/211887/Ubuntu/uImage-2.6.34-r88-overo.bin
+
 
+
5. Format your microSD card as per usual
+
http://www.gumstix.net/Documentation/view/Overo-Setup-and-Programming/Creating-a-bootable-microSD-card/109.html
+
 
+
6. put MLO, u-boot, u-image on microSD card boot partition
+
 
+
7. extract generated rootfs to second partition
+
 
+
8. Download and extract modules and copy them to second partition (where you extracted the rootfs)
+
http://dl.dropbox.com/u/211887/Ubuntu/modules-2.6.34-r88-overo.tgz
+
 
+
9. On the second partition open the /etc/shadow file. ‘sudo gedit /path/to/second/partition/etc/shadow’
+
Delete the ‘*’ for the root entry. This will allow you to login as root and create a user.
+
  
 +
== Configuring Ubuntu ==
 +
The ''rootstock'' utility doesn't make passwords properly.  For now, it is easiest to remove the root password, boot your system to create new users and choose a new root password.  To do this, open the ''/etc/shadow'' file on the second partition and delete the '*' for the root entry. E.g.
 +
<code>
 +
$ sudo gedit /path/to/second/partition/etc/shadow
 +
</code>
 
Note: remember to put the ‘*’ back after you have created a user so someone can’t login as root and screw up your system
 
Note: remember to put the ‘*’ back after you have created a user so someone can’t login as root and screw up your system
  
10. open the /etc/network/interfaces’ file. ‘sudo gedit /path/to/second/partition/etc/network/interfaces’
+
For Overo boards with an ethernet interface, it is nice to have ethernet working right off the bat without having to have Network Manager installed. Open the ''/etc/network/interfaces'' file on the second partition.
add the following code to the bottom
+
<code>
auto eth0
+
$ sudo gedit /path/to/second/partition/etc/network/interfaces
iface eth0 inet dhcp
+
</code>
 
+
Add the following code to the bottom:
 +
<code>
 +
auto eth0
 +
iface eth0 inet dhcp
 +
</code>
 
You can now unmount the microSD card, place it in the gumstix and boot to it.
 
You can now unmount the microSD card, place it in the gumstix and boot to it.
  
Login using serial console using the gumstix instructions in the link below or you can plug an ethernet card in and ssh in
+
Login using serial console using these [http://www.gumstix.net/Documentation/view/Overo-Setup-and-Programming/Getting-started/109.html instructions] or you can plug an ethernet card in and jump in via ssh.
http://www.gumstix.net/Documentation/view/Overo-Setup-and-Programming/Getting-started/109.html
+
 
+
11. login as root and then create a user for yourself and give yourself sudo
+
sudo adduser youruser
+
sudo adduser youruser sudo
+
sudo apt-get install nano
+
nano /etc/shadow
+
 
+
add the ‘*’ back in that we removed earlier
+
log out as root
+
 
+
12. log in as your user
+
open the /etc/apt/sources.list file
+
 
+
add the following lines if they are not present
+
deb http://ports.ubuntu.com/ubuntu-ports lucid-updates main
+
deb http://ports.ubuntu.com/ubuntu-ports lucid-security main
+
then close the file
+
  
sudo apt-get update && sudo apt-get upgrade
+
Once you are logged in, you might make some other tweaks:
 +
* login as root and then create a user for yourself and give yourself sudo
 +
<code>
 +
$ sudo adduser youruser
 +
$ sudo adduser youruser sudo
 +
</code>
 +
* edit /etc/shadow and add the ‘*’ back in that we removed earlier. E.g.
 +
<code>
 +
$ nano /etc/shadow
 +
</code>
  
13. Have fun
+
* add some useful package repositories if they're not already present. Edit /etc/apt/sources.list and add these lines:
 +
<code>
 +
$ deb http://ports.ubuntu.com/ubuntu-ports lucid-updates main
 +
$ deb http://ports.ubuntu.com/ubuntu-ports lucid-security main
 +
</code>
 +
* get up-to-date:
 +
<code>
 +
$ sudo apt-get update && sudo apt-get upgrade
 +
</code>
 +
Have fun!
  
[[Category:How to - Ubuntu]]
+
== Related Links ==
 +
Here are some links I found useful when putting this post together:
 +
* https://wiki.ubuntu.com/ARM/RootfsFromScratch
 +
* http://labs.igep.es/index.php/How_to_get_the_Ubuntu_distribution
 +
* https://wiki.ubuntu.com/ARM/RootfsFromScratch
 +
* http://free-electrons.com/blog/ubuntu-1004-igepv2/
 +
* http://omapzoom.org/wiki/Ubuntu_rootfs

Revision as of 00:10, 5 October 2010

Ubuntu on Overo

Constructing an Ubuntu root file system for the Gumstix Overo is surprisingly easy with the rootstock utility. Unfortunately, Ubuntu (particularly a version including a graphical desktop) likes lots of RAM but the familiarity of Ubuntu for some users may outweigh occasional sluggishness. These instructions were tested on an Ubuntu 10.04 desktop machine; they should work for any recent Debian-based flavour of Linux.

Make a MicroSD card

The rootstock utility builds a root file system inside a virtual arm machine supplied by qemu. First, install the required packages.

$ sudo apt-get install rootstock qemu

Next, use a command like the one shown below to make a root file system; check out 'man rootstock' for some extra options. Note: this will take an hour or two.

$ sudo rootstock -serial ttyS2 -d lucid -f "gumstix" -s lxde,gdm,openssh-server,x11vnc 

  • the '-d' option specifies the distribution release: in this case, Ubuntu Lucid (10.04).
  • the '-s' option specifies the list of packages to install: in this case, we install a lightweight desktop and a standard login manager as well as ssh & VNC servers so we can connect remotely.
  • the user name ('-l') and password ('-p') options don't seem to work at the moment; see [Configuring Ubuntu] for more information.

You should now have a spiffy root file system tarball so now we just need to create a bootable microSD with a standard bootloader and kernel.

Format a microSD card as per usual; you should copy a recent MLO, u-boot, and uImage to the boot partition. Extract the generated root file system to the second partition of the microSD card.

Finally, the loadable modules in the file system should match the kernel. For users that don't want to build a kernel, you can use this 2.6.34 kernel and the associated modules tarball; this is approximately the Gumstix Overo kernel from September 9th, 2010. Extract the modules file into the second partition over top of the root file system. E.g. for a root partition mounted at /media/rootfs:

sudo tar xaf modules-2.6.34-r88-overo.tgz -C /media/rootfs

Configuring Ubuntu

The rootstock utility doesn't make passwords properly. For now, it is easiest to remove the root password, boot your system to create new users and choose a new root password. To do this, open the /etc/shadow file on the second partition and delete the '*' for the root entry. E.g.

$ sudo gedit /path/to/second/partition/etc/shadow

Note: remember to put the ‘*’ back after you have created a user so someone can’t login as root and screw up your system

For Overo boards with an ethernet interface, it is nice to have ethernet working right off the bat without having to have Network Manager installed. Open the /etc/network/interfaces file on the second partition.

$ sudo gedit /path/to/second/partition/etc/network/interfaces

Add the following code to the bottom:

auto eth0
iface eth0 inet dhcp

You can now unmount the microSD card, place it in the gumstix and boot to it.

Login using serial console using these instructions or you can plug an ethernet card in and jump in via ssh.

Once you are logged in, you might make some other tweaks:

  • login as root and then create a user for yourself and give yourself sudo

$ sudo adduser youruser
$ sudo adduser youruser sudo

  • edit /etc/shadow and add the ‘*’ back in that we removed earlier. E.g.

$ nano /etc/shadow

  • add some useful package repositories if they're not already present. Edit /etc/apt/sources.list and add these lines:

$ deb http://ports.ubuntu.com/ubuntu-ports lucid-updates main
$ deb http://ports.ubuntu.com/ubuntu-ports lucid-security main

  • get up-to-date:

$ sudo apt-get update && sudo apt-get upgrade

Have fun!

Related Links

Here are some links I found useful when putting this post together: