NB: While this guide is still valid, a simpler way to install and boot Nemo N9 is now availible at http://wiki.merproject.org/wiki/Nemo/Installing#Nokia_N9 WARNING: Installing Nemo Mobile on your Nokia N9 will likely void your waranty. You have been warned! WARNING: If you follow these instructions, you will be messing with some really essential boot stuff. Any mistake and you WILL brick your phone. You have been warned! WARNING: This procedure has only been tested on a single Nokia N9 64GB phone. While it *probably* works on any Nokia N9, I can't know that for sure. NB: Nemo Mobile for Nokia N9 is still of pre-alpha quality, and a lot of stuff (including all phone functionality) does not work as intended. These instructions will therefore show you how to install it in a way that leaves MeeGo 1.2 Harmattan installed on the device and booting by default. You will need to use an USB cable in order to boot Nemo Mobile. == Host Preparation == Make sure you have the following packages installed: flasher parted fatresize e2fsprogs tar qemu-user-static util-linux NB: flasher is not in the Debian or Ubuntu archives, but you can get it at: http://tablets-dev.nokia.com/maemo-dev-env-downloads.php Download these additional files: Nemo Mobile N950 image: http://repository.maemo.org/meego/Nemo/0.20120315.1.NEMO.2012-03-19.1/images/nemo-handset-armv7hl-n950/nemo-handset-armv7hl-n950-0.20120315.1.NEMO.2012-03-19.1.tar.bz2 N950 MeeGo kernel: http://stskeeps.subnetmask.net/n950liberator/vmlinuz-2.6.32.20112201-11.2-adaptation-n950-bootloader N950 MeeGo rescue initrd: http://stskeeps.subnetmask.net/n950liberator/initrd.img-rescue-2.6.32.20112201-11.2-n950 N950 MeeGo kernel package: http://download.meego.com/live/devel:/devices:/n900:/n950/Trunk_Testing/armv7hl/kernel-adaptation-n950-bootloader-2.6.32.20112201-11.2.armv7hl.rpm Nemo Mobile N9 initrd init script: https://jon.severinsson.net/NemoN9/init == Device Installation == 1. Unplug the usb cable from your phone. 2. Turn your phone off. 3. Load the N950 MeeGo kernel and N950 MeeGo rescue initrd using flasher: $ sudo flasher --load -k vmlinuz-2.6.32.20112201-11.2-adaptation-n950-bootloader -n initrd.img-rescue-2.6.32.20112201-11.2-n950 --boot 4. Insert the usb cable. 5. Wait about minute until a new USB mass storage decice appears on the host. You should now have three partitions: /dev/sdX1 with is MyDocs, /dev/sdX2 which is MeeGo 1.2 Harmattan rootfs, and /dev/sdX3 which is the MeeGo 1.2 Harmattan home directory. 6. Please verify that the three partions above are the same as on my phone, as the following steps WILL brick your phone if they aren't... 7. Start parted and verify that it finds all three partitions: $ sudo parted /dev/sdX (parted) unit s (parted) print 8. On my phone, parted didn't recognize the second partition. If you have the same problem, recreate it between (end of "1" + 1) and (start of "3" - 1): (parted) mkpart Partition type? primary/extended? primary File system type? [ext2]? ext4 Start? 112672768s End? 121061375s 9. Resize the MyDocs partition to leave at least 2 GiB for Nemo Mobile. For good performance the new partition should start on a whole multiple of 8 MiB, or 16384 sectors, which means that the MyDocs partition should end on sector (N * 16384 - 1): (parted) resize 1 1024s 95895551s 10. Create a new partition between (end of "1" + 1) and (start of "2" - 1): (parted) print (parted) mkpart Partition type? primary/extended? primary File system type? [ext2]? ext4 Start? 95895552s End? 112672767s 11. Quit parted: (parted) quit 12. Create a new file system on the new partition: $ sudo mkfs.ext4 /dev/sdX4 -E discard -G 32 -L nemo-rootfs -O ^huge_file $ sudo tune2fs -E mount_opts=journal_checksum -o user_xattr,acl,discard /dev/sdX4 13. Mount the newly created filesystem: $ mkdir rootfs $ sudo mount -t ext4 /dev/sdX4 rootfs 14. Unpack the Nemo Mobile N950 image: $ sudo tar --numeric-owner -xf nemo-handset-armv7hl-n950-0.20120315.1.NEMO.2012-03-19.1.tar.bz2 -C rootfs 15. Prepare the rootfs for use as a chroot: $ sudo cp /usr/bin/qemu-arm-static rootfs/usr/bin/ $ sudo cp /etc/resolv.conf rootfs/etc/ $ sudo mount -t proc proc rootfs/proc $ sudo mount -t sysfs sysfs rootfs/sys $ sudo mount --bind /dev rootfs/dev 16. Install the MeeGo kernel package inside the chroot: $ sudo cp kernel-adaptation-n950-bootloader-2.6.32.20112201-11.2.armv7hl.rpm rootfs/tmp/ $ sudo chroot rootfs rpm --install --nodeps /tmp/kernel-adaptation-n950-bootloader-2.6.32.20112201-11.2.armv7hl.rpm $ sudo rm rootfs/tmp/kernel-adaptation-n950-bootloader-2.6.32.20112201-11.2.armv7hl.rpm 17. Unmount the rootfs: $ sudo umount rootfs/{dev,sys,proc} $ sudo umount rootfs $ rmdir rootfs 18. Unplug the usb cable from your phone. == Initrd Creation == 1. Copy the rescue initrd to a tmpfs: $ mkdir initrd.rescue initrd $ sudo mount -t cramfs -o loop initrd.img-rescue-2.6.32.20112201-11.2-n950 initrd.rescue $ sudo mount -t tmpfs -o size=4m,mode=0775 tmpfs initrd $ sudo cp -a initrd.rescue/* initrd $ sudo umount initrd.rescue $ rmdir initrd.rescue 2. Replace the rescure init script with Nemo Mobile N9 initrd init script: $ sudo cp init initrd/sbin/init 3. Optionally remove the kernel modules from the initrd, as we don't need them: $ sudo rm -r initrd/lib/modules/2.6.32.20112201-11.2-adaptation-n950-bootloader 4. Create the initrd image: $ sudo mkfs.cramfs -b 4096 -n meego-initrd initrd initrd.img-nemo-2.6.32.20112201-11.2-n950 5. Unmount the tmpfs: $ sudo umount initrd $ rmdir initrd == Device Booting == 1. Unplug the usb cable from your phone. 2. Turn your phone off. 3. Load the N950 MeeGo kernel and Nemo Mobile N9 initrd using flasher: $ sudo flasher --load -k vmlinuz-2.6.32.20112201-11.2-adaptation-n950-bootloader -n initrd.img-nemo-2.6.32.20112201-11.2-n950 --boot 4. Insert the usb cable. 5. Wait several minutes while Nemo Mobile boots.