[Adam Android Development] tillum:
Natty ubuntu.img

The great thing about writing essays is the sheer amount of stuff you get done procrastinating doing them...lol.

Here's the minimal natty build I made from rootstock last night using the omap4-kernel:

http://www.curiouslegends.com.au/misc/projects/linux/ubuntu-natty-minimal-omap4kernel.img

Md5sum: 48994750337425cbd2f7ddbfd564e0ef

Wait an hour or so after I post this before trying to download it, as I'm uploading to my server now. The image is 2.9Gb, inside an ext2 file system image. Here's the rootstock command I used to create it:

rootstock -d natty -f ubuntu -l dickens -p dickens -i 1G --no-root --seed ubuntu-minimal linux-image-omap

Why dickens? Why not...

After that I used this guide to create the .img: http://androlinux.com/android-ubuntu-development/how-to-build-chroot-arm-ubuntu-images-for-android/

Works on my nexus one, though I needed to add /dev/prt into the image. Still not sure it's mounting correctly, but it boots into Ubuntu fine. This build was made inside Natty beta 1 on my netbook. For some reason doing it without --no-root didn't work, even with sudo access. The above command however ran fine. I tried the same thing on my 10.04.2 server... couldn't run it without sudo, spat these errors at me on several attempts, and died:

I: Extracting zlib1g...
qemu: fatal: cp15 insn ee1d6f70

R00=4009f960 R01=420822e8 R02=0d696914 R03=000086a8
R04=00008ef0 R05=00000000 R06=000097c9 R07=42082308
R08=00020040 R09=00000000 R10=4009f000 R11=00000000
R12=00008b88 R13=4007f868 R14=4008f450 R15=4008aea0
PSR=20000030 --C- T usr32
I: Killed ...

No idea what's going on there... unless it didn't like using the natty repos, I didn't try it without. Running rootstock on my netbook (Natty remember) defaults to the natty repos, but thought I'd add them in anyway just for kicks.

Found this thread this morning: http://www.omappedia.org/wiki/Get_started_with_ubuntu_on_omap4

Would have saved a lot of trouble last night.... the 'correct' way to create a arm image is to go in 2 stages. The first is making an image based on ubuntu-minimal, and a very sparse selection of other files. (this could be the kernel, vncserver, etc) The second step is to actually run this image either natively or in a chroot, THEN add the other packages, such as ubuntu-netbook, etc. "ubuntu-netbook" incidentally is the correct package for natty on arm in all it's goodness, and installs everything, including the unity 2d launcher.

Here's where it gets hairy... firslty, I tried this multiple times and learnt a few things:

a. rootstock is dependant on ram memory for the generation of it's image. This means that having only 2Gb, I couldn't make anything over 1Gb in size. This is apparently quite common.

b. The arm repos are exceedingly slow.... seemed to hang out around the 32kb/s mark. Took hours once I booted into Ubuntu on my nexus one to download all the packages for ubuntu-netbook

c. When creating a ubuntu.img from the rootstock filesystem, you need to increase the size. Made this mistake the first time, and after several hours downloading packages the install hung at extraction point.

Finally, all was good, had the 2.9Gb image of the ubuntu.img I'm uploading, had downloaded all the packages for ubuntu-netbook, my phone had extracted them... and the whole install hung while configuring gconf. Left it for a few hours, then killed it. Will probably need to wipe the image on my nexus phone and start again, but have been trying to rescue it by running "apt-get -f install" and "dpkg --configure -a". That's a lot of packages (many of which installed fine) to wipe...

So where to next? Would love some feedback as to why my install hung at gconf... any ideas? Also keen to see if there's any difference on the ADAM. I was using a phone after all. Next I suppose I'll try and install of something smaller, xfce perhaps, you get the idea. My goal is unity though... with ubuntu-netbook there are some 1080 something packages to install. With unity-2d only there were around 500 something (ubuntu-netbook installs EVERYTHING). Still hung at gconf. I think. It was late and I was tired.

Ok, kids are out, on to essay number 2. Cheers.

~Tilllum