Mini210/ubuntu

Page last edited 3,829 days ago
From FriendlyARM
Jump to navigation Jump to search

FriendlyArm has provided an ubuntu image and tools on the ftp site, it works with the rootfs via an ext4 partition on an SD card.


Things you will need[edit | edit source]

  • Ubuntu downloads from the friendlyArm ftp site (FTP) so you have the desktop or server rootfs archive.
  • mktools from one of the dvd images
  • mini210S
  • serial console access to the mini (for giggles)
  • network connection
  • 4GB micro SD card, already fused with SD-Flasher.exe and an ext4 partition added to it, doesn't matter too much how big the fat partition is, just make sure the ext4 partition is a couple of GB.

Make sure you've got superboot on the SD card[edit | edit source]

If you haven't burnt superboot.bin to your SD card, [http://armworks.cc/index.php?title=Mini210S_Burn_rootfs_to_Nand#Burning_... follow the section in this link for information on how to do that] and remember to backup the SD card before you start as it will destroy all of your data.

For the ext4 partition you will need to use a disk resizing app. like gparted on a linux machine. When you open gparted and look at your SD card, you'll notice that there is 151MB of unallocated space, this is where superboot is, so don't touch it, it's supposed to be there!!

In gparted, resize the fat partition that you made, it doesn't matter too much how big it is, I made mine 512MB so I can mess with other stuff on the card at a later date, using gparted, I had to click on the green tick to actually resize the fat partition before it would let me partition the rest of the sd card.

Once you've resized the fat partition, you can format the unallocated space that is freed up by the resizing, it's easiest to just right click on the unallocated space to the right of the fat partition, choose new partition and then set the filesystem to ext4, click add and then click the green tick to execute the changes.

That's it for the SD card, you can now move onto the next sections.

Unpack and prepare your Image[edit | edit source]

First off we need to unpack our rootfs archive, I'll be using the ubuntu-desktop-1204_20120628.tgz file, open a command prompt browse to wherever you downloaded the rootfs and the images_18714.rar files to and do:

 sudo tar -xvzf ubuntu-desktop-1204_20120628.tgz

That will keep the permissions intact, and unpack the archive into a folder called ubuntu-desktop, now we need to copy them to the ext4 partition, so put your uSD card in a reader and plug it into your PC, you will need to know the path to the ext4 partition on your SD card.

 sudo cp -varP ubuntu-desktop/* <path to ext4 partition>

It will take a while, once it's finished,

Next you'll need to unpack the the images folder and copy that to your fat partition on the sd card, so do:

 rar x images_18714.rar
 cp -varP images/ <path to fat partition>

Edit all of the things[edit | edit source]

Next you'll need to edit a couple of files, otherwise you won't be able to sudo from the serial console and you'll miss out on all the universe repo goodies!!

You'll need root privs. to open these files, from the ext4 partition, edit /etc/sudoers, scroll down to line 19 and add a line to make it look like this:

 # User privilege specification
 root    ALL=(ALL:ALL) ALL
 fa      ALL=(ALL:ALL) ALL

Save and exit the file. fa is the username and password to logon to the system (I think!! there might be others, it auto logs you in and serial console won't let you use root!!) so adding it to sudoers gives us root privs when we need them.

Next we need to edit /etc/apt/sources.list, scroll down to line 15, we're going to uncomment the 4 deb/deb-src lines, this will give us access to all the useful universal tools from the ubuntu repos, so uncomment the lines so it looks like this:

 ## Uncomment the following two lines to add software from the 'universe'
 ## repository.
 ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
 ## team. Also, please note that software in universe WILL NOT receive any
 ## review or updates from the Ubuntu security team.
 deb http://ports.ubuntu.com/ubuntu-ports/ precise universe
 deb-src http://ports.ubuntu.com/ubuntu-ports/ precise universe
 deb http://ports.ubuntu.com/ubuntu-ports/ precise-updates universe
 deb-src http://ports.ubuntu.com/ubuntu-ports/ precise-updates universe

Once you've saved and exited we need to edit a file on the fat partition, in /images/ you'll find a file called riendlyARM.ini, open it in your favourite editor, you should be ok with the defaults but I like to change the StatusType to the following:

 StatusType = LED

I hate it when the mini210S screams at me when *it* did something wrong.

Burn the kernel then run Ubuntu[edit | edit source]

Now that you've prepared the card you can safely remove it from your system and plug it into your mini210S, we're going to burn the kernel and superboot to nand, so flip your bootmode switch to SD and power on the mini210S, in about 10seconds it should be all over and you should be ready to boot.

Once it's finished burning the kernel, flip the bootmode switch back to nand, and toggle the power switch, that's pretty much it, if you have a serial console connected to con1 then you should see the usual junk flying past your screen and you will be presented with a login prompt at the serial console, on screen (mine is a H43 lcd) you should see the ubuntu desktop, as I mentioned, it automatically logs you into the desktop (unity sucks on a 4.3" screen), the touchscreen afaik isn't setup (or at least not enough to work but it did seem to be detected at least) so you'll want a usb hub, mouse and keyboard.

From the serial console I would suggest doing sudo apt-get update and then you can go and hunt down any of your favourite apps and install them.

That's about it, have fun!


Issues[edit | edit source]

You will see 3 errors at least on your travels :

 mountall: Event failed
 init: Failed to create pty - disabling logging for job implemented
 sudo: unable to resolve host localhost.localdomain

mountall probably gimps out because something it wants doesn't exist, no idea what though, failed to create pty is alledgedly to do with something that, again, doesn't exist when init starts logging and sudo is a host thing, just needs setting accordingly somewhere.

If anyone fixes these issues before i do, post the fix here!!

For the touch screen, you'll probably want to apt-get install libts, and probably the x11 stuff for it too, you'll also probably need /etc/friendlyarm-ts-input.conf from maybe the linux 2.6.35 image, and etc/ts.conf(should be installed with libts I think but it'll need to be edited to look like the one in linux image)

Update[edit | edit source]

After translating the ubuntu readme, it seems that there are a number of other issues, touchscreen is not supported (yet) and the multimedia system (hardware codecs etc.) are all turned off!

There is a fix for the pty issue and it's pretty simple too, from a command prompt on the mini210S, do:

 wget https://launchpad.net/ubuntu/+source/upstart/1.5-0ubuntu8/+build/3710339/+files/upstart_1.5-0ubuntu8_armhf.deb --no-check-certificate
 dpkg -i upstart_1.5-0ubuntu8_armhf.deb