Running Ubuntu on a Nokia N8x0
Running Ubuntu Jaunty on a N8x0 is fairly simple using our drop-in image. To achieve reasonable performance the image uses LXDE as the desktop environment. The image is a work in progress but the current version, 7.1, is quite usable with the most noticeable missing functionality being audio and, in the case of N810, GPS.
These instructions describe the process of installing Ubuntu on an external SD but apply to installing on the internal card as well with the only difference being swapping the device id.
Also, although for the purposes of this document it is assumed that the installation is being done using the device itself, the process of preparing the card with a card reader-equipped desktop computer is basically identical. Whatever gets the card partitioned, the filesystems created and the rootfs extracted should do just fine.
0. Prerequisites
- a 2GB+ card
- rootsh
- e2fsprogs
1. Install the boot menu
(If you already have a linuxrc-capable boot menu installed, skip to step 2.)
Add the deblet repository key:
$ wget http://packages.tspre.org/repo.key $ apt-key add repo.key
Install the boot menu itself; the easiest way is probably to type the location of the install file in the browser and use the application manager to handle the installation. The install files can be found at (pick one according to the os version you're running):
http://trac.tspre.org/svn/deblet/trunk/deblet-chinook.install http://trac.tspre.org/svn/deblet/trunk/deblet-diablo.install
Remember to actually run "Install Bootmenu" from Utilities.
Alternatively, you can follow the instructions on the Maemo wiki page on booting from a flash card or some similar source.
2. Partition the card and create filesystems
At this point it's probably a good idea to remind that, due to a bug/feature, the device id's are assigned differently in Diablo/Chinook from everywhere else so the apparent inconsistency between the device id's used while partitioning the card and in the bootmenu entry and fstab is actually correct.
These instructions assume that you have a 2GB card but in case you have a larger one, you might want to increase the size of the swap partition (512MB is a good idea.) The unpacked rootfs is around 1.2GB in size so a swap partition of 256MB is used here to leave a bit of room to play in.
Insert the card you want to install Jaunty on and as root, enter:
$ sfdisk -uM /dev/mmcblk1 mmcblk1p1: ,256,S mmcblk1p2: ,,L mmcblk1p3: mmcblk1p4:
Reboot to ensure the partition table is re-read correctly and:
$ mkswap /dev/mmcblk1p1 $ mkfs.ext3 /dev/mmcblk1p2
About partitioning with sfdisk:
- the "-uM" parameter tells sfdisk to use MB instead of blocks,
- "mmcblk1p1:" and such are prompts from sfdisk,
- the input is "start, size, type",
- ",256,S" means "start from the beginning of free space, use 256MB, use type S",
- empty size means "use all available space",
- "L" as partition type is an alias for type 83 (ext2/3),
- "S" is type 82 (Solaris/Linux swap),
- for empty rows simply press enter.
3. Install the rootfs
Grab the rootfs tarball here.
Create a mount point for the rootfs partition, make sure the necessary modules are loaded and Diablo/Chinook has not already mounted the partition, mount it and untar the rootfs:
$ mkdir -p /mnt/jaunty $ insmod /mnt/initfs/lib/modules/$(uname -r)/mbcache.ko $ insmod /mnt/initfs/lib/modules/$(uname -r)/ext2.ko $ insmod /mnt/initfs/lib/modules/$(uname -r)/jbd.ko $ insmod /mnt/initfs/lib/modules/$(uname -r)/ext3.ko $ umount /dev/mmcblk1p2 $ mount /dev/mmcblk1p2 /mnt/jaunty -o noatime $ tar -C /mnt -xvzf /path/to/jaunty-n8x0-lxde-7.3.tar.gz
4. Update fstab to reflect the partition scheme
Check that /mnt/jaunty/etc/fstab has correct partition id's. The file should contain at least
rootfs / rootfs defaults,errors=remount-ro,noatime,nodiratime 0 1 proc /proc proc defaults 0 0 /dev/mmcblk0p1 swap swap defaults 0 0
Also, you may want to add:
/dev/mtdblock4 /mnt/rootfs jffs2 defaults 0 0
5. Update initfs
Create a bootmenu item file, for example "jaunty.item" in /etc/bootmenu.d/ with the contents:
ITEM_NAME="Jaunty on external p2" ITEM_ID="extp2" ITEM_DEVICE="mmcblk0p2" ITEM_MODULES="mbcache jbd ext3" ITEM_FSTYPE="ext3" ITEM_FSOPTIONS="noatime,ro" ITEM_LINUXRC="linuxrc"
Note that you can (and in case of a different version of bootmenu, may have to) include the boot item in /etc/bootmenu.conf.
Reflash the initfs (answer yes to all):
$ refresh_bootmenu.d
Again, it's assumed that you're using the version of bootmenu installed from deblet, other versions may provide "flash_initfs" or some other command. In any case, they should do pretty much the same thing.
...and that's actually all there is to it. Reboot and enjoy.
An image describing the keymappings can be found here.
NOTES
In case you wish to tweak the installation in chroot, it's a good idea to do a couple of bind mounts:
$ mount -o bind /proc /mnt/jaunty/proc $ mount -o bind /sys /mnt/jaunty/sys $ mount -o bind /dev /mnt/jaunty/dev $ mount -o bind /dev/pts /mnt/jaunty/dev/pts $ mount -o bind /tmp /mnt/jaunty/tmp
Also,
$ export LC_ALL=C
inside chroot helps keep apt locale complaints in check.
Attachments
-
jaunty-n8x0-lxde-7.3.tar.gz
(326.8 MB) - added by https://openid.nomovok.info/aapi.hamalainen@…
8 months ago.
LXDE flavour Jaunty for N8x0, "7.3"
-
n810-lxde-7.3-keymap.png
(25.0 KB) - added by https://openid.nomovok.info/aapi.hamalainen@…
8 months ago.
Keymap for Jaunty/N8x0 "7.3"