The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)


Nemo/Installing

From Mer Wiki
< Nemo(Difference between revisions)
Jump to: navigation, search
(overview)
(Overview)
Line 191: Line 191:
 
* Mount N9 partition and copy image to fs
 
* Mount N9 partition and copy image to fs
 
* Boot device into Nemo
 
* Boot device into Nemo
 
You'll need the flasher mentioned in the [[#Nokia N950|N950]] instructions
 
  
 
== Single Boot by Loading The Kernel (Not recommended) ==
 
== Single Boot by Loading The Kernel (Not recommended) ==

Revision as of 14:25, 25 September 2012

Contents

Generic Notes

These instructions should guide you through installing Nemo Mobile on your desired device.

Images

The first thing you should do is visit our repository and download the latest image for your platform.

The First Boot

The first boot of Nemo on your N900/N950 is likely to be quite slow, so be patient for it to load completely, once loaded, reboot the phone and Nemo should be far more responsive.

Root Password

By default, the root password for Nemo is "nemo" (it used to be "meego" in the older images). Password can also be found in the .ks file, in the same directory you downloaded the image from.

Raw Image Write

Some devices use raw images that are written to SD card and then device is booted by incerting the sd card to the device. Here is instructions how to write raw disk images to the sdcards on different host OS.

Linux Host

The process of installing the Nemo image to your MicroSD card is quite straight forward. Firstly, downloaded an image and put it somewhere easy to remember. Insert the card into the card reader, your distribution will probably automatically mount it, so we must first find where it is mounted with:

sudo mount

NOTE: Below /dev/sdX is used as an example and may vary, so use the mount point listed from the mount output, can be also /dev/mmcblkX when using some build-in card readers

Then, unmount it with:

sudo umount /dev/sdX

Once you have confirmed which device it is, and unmounted it, it is time to copy the image to the MicroSD card using the command below. The command contains two parts first bzcat that uncompresses the image after which the output is redirected to dd which writes it to the card:

bzcat directory/file_goes_here.bz2 | sudo dd bs=4096 of=/dev/sdX

NOTE: "of=" is the output file/location, since we are copying it to the MicroSD card, we put its location here, and since it contains a partition table, we don't specify which partition it is written to. e.g. /dev/sdX, not /dev/sdX1

DD will not show any output until the image has been completely written, so please be patient. (You can, however, press Ctrl+t or pipe trough 'pv' [1] to get information about the progress.)

Example:

bzcat directory/file_goes_here.bz2 | dd bs=4096 | pv -s 3816M | sudo dd bs=4096 of=/dev/sdX

Windows Host

The process of installing the Nemo image to your MicroSD card on windows is also quite straight forward.

  • First, extract the .bz2 image, if you don't have any software to do so, you can use Bzip2 for Windows.
    • Download Bzip2 for Windows from here, choosing the first option, to download the setup without the sources.
    • Install Bzip2 for Windows
    • Open run by pressing 'Windows Key + R' and type cmd, press enter to open the command prompt.
    • Navigate to where bzip2.exe was installed and run the command 'bzip2.exe directory/file_goes_here.bz2 '
  • The extracted image file will have the extension .raw, but the program we use to write the image doesn't associate with this extension, so right click the file and choose rename, and replace the .raw with .img
  • Download the image writer from here, choosing the latest release of the binary [the first download link].
  • Extract the contents of the .zip to a known directory.
  • Run the .exe labled 'W32DiskImager.exe'
  • Select the Nemo Image file
  • Select the drive letter/mount point for the MicroSD card [please verify this is the correct device]
  • Click 'Write' to begin writing the image to the MicroSD card.

Nokia N900

IT IS RECOMMENDED YOU READ THIS THOROUGHLY BEFORE YOU FLASH YOUR DEVICE

Installing Nemo Mobile on the N900 is relatively simple, in nearly all cases it is installed on the external MicroSD card, so that will be what this guide will be focusing on.

  • What you will need:
    • A Nokia N900, updated to PR 1.3.
    • A MicroSD card with a capacity of at least 4GiB (more notes on this below)
    • U-Boot (installed on the phone[more on this below])
    • Either a Windows or Linux PC
    • And the image, for N900, the filename of the file you will want will look like:
 nemo-handset-armv7hl-n900-X.XXXXXXXX.X.NEMO.XXXX-XX-XX.X-mmcblk0p.raw.bz2
  • Nemo generally runs well off the MicroSD card, probably better than from the internal eMMC, depending on some of the following factors:
    • Speed/Class of the MicroSD card; a class 10 card should provide adequate performance, though note that the classes aren't a guarantee of performance.
    • Quality/brand of the card; some cards have issues with the N900 and offer slow performance due to I/O errors.
    • If reading reviews/benchmarks of cards before buying, look at the ones with the highest random read/write, not sequential.

Update with the current latest Nemo kernel (Jan 26 2012) there are issues with proper initialization of the SD card due to a potential kernel bug (race condition) together with the Pali version of u-boot. This has been confirmed on at least Samsung cards (8 GB class 6 and CLass 10 by Netweaver and Flocke000), also on others (unknown brand, by Pali and plipp). Bug report is entered. [2] Seems to be fixed in kernel-adaptation-n900-2.6.37-12.1.Nemo.Adaptation.N900 (2012-08-12).

  • For U-boot there are 2 options:
  • 1.) If you use the Nokia Linux Kernel on your N900, install U-Boot through the Hildon Application Manager. Enable the extras-devel repository. In the Hildon Application Manager, install the U-Boot package, found in "System" category. (The package is 'uboot-pr13' at the time of writing).
  • 2.) !WARNING! In case you use the power kernel for Maemo, the U-Boot package found in Extras-devel will replace it with Nokia kernel! If you want to install U-Boot alongside kernel-power, you need to use a different version of U-Boot written by Pali Rohar, it's found here: U-Boot by Pali . This will still replace your power kernel, but you can boot it from a bootimage. For detailed instructions, see the power kernel thread on talk.maemo.org
  • Verify the package has been installed correctly by rebooting your N900, at start-up there will be mention of U-Boot and possibly a penguin logo.
  • After verifying the install, you may want to disable the extras-devel repository to prevent applications being updated to development versions.
  • Once it has been copied to the MicroSD card, you can remove it from your card reader and put it in your N900.
  • 1.) If you have "uboot-pr13" by Carsten Munk installed from the Extras-devel repository, booting the N900 with the card present, the rear cover in place, the MicroSD card inserted and U-Boot correctly installed should result in Nemo Mobile booting.
  • 2.) If you are using U-Boot 2012.04-2 (or other version) from Pali, with the MicroSD card in place etc., you need to power up N900 with the keyboard opened. From the bootmenu, select "U-Boot console". Possible commands are listed, enter "run sdboot" to boot Nemo from the MicroSD card.

Nokia N950

IT IS RECOMMENDED YOU READ THIS THOROUGHLY BEFORE YOU FLASH YOUR DEVICE

Single boot/loading

  • You will need:
    • Nokia Harmattan Flash Tool from here.
      • If you get a 'bb5_rdc_cert_read failed' error or similar during flashing, you should try downloading The Beta 1 flasher tool and try flashing your device with that version.
    • The MOSLO bootloader rootfs available here.
    • An N950 that can flash the MOSLO, 34 and 39 work.
    • Adequate knowledge/skills for what you are doing as THESE INSTRUCTIONS ARE OFFERED WITHOUT WARRANTY.
    • A Linux OS
    • The Nemo image for the N950, the filename of the file you will want will look like:
nemo-handset-armv7hl-n950-X.XXXXXXXX.X.NEMO.XXXX-XX-XX.X.tar.bz2

If you want to keep your Harmattan installation, you should check the dual-booth method below.

NOTE: Before you begin, assure that the device lock is disabled on the Harmattan installation (Settings>Security>Device Lock>Autolock)

NOTE: Additionally, before installing the bootloader, boot into Harmattan at least once and wait for it to fully load (2-4 mins).

  • Make sure your device is fully charged before beginning.
    • Power off your N950, disconnecting the USB/Charger cable.
    • Run the flasher, pointing it at your MOSLO image:
sudo flasher -F moslo-rootfs-X.XXXX.XX-X_RM680-OEM1-XX_X.X.XX-XX.X.bin -f

The flasher will now be ready to program your device, waiting for it to be connected.

  • Connect your N950, it should begin flashing, wait for it to finish flashing. DO NOT DISCONNECT WHILE FLASHING
  • Do not disconnect. Read next steps.
  • After flashing MOSLO, boot the device by disconnecting, then immediately re-connecting the USB cable. You will see a warning, then the MOSLO welcome screen (green text). Wait for the text "Rootfs now exported via USB"
    • If your device doesn't proceed to the MOSLO screen after flashing MOSLO, let it proceed into Harmattan then power down the device, waiting a short time before reconnecting it to the USB.
  • Your OS may automount the drive, unmount it [do not 'eject' it from the OS] with cmd:
sudo umount mount_point_here_eg_/dev/sdX

If you get a 'bb5_rdc_cert_read failed' error or similar during flashing, you should try downloading The Beta 1 flasher tool and try flashing your device with that version.

After this reformat the device (Here we say device because moslo export partition in such way that host os sees it as a full device node):

sudo mkfs.ext4 /dev/sdX

You will see a warning about it being the entire device, not just one partition, check you have the correct device, then proceed, this is expected.

Next thing is to move the rootfs to the device Nokia N950 & Nokia N9 Rootfs Installation.

The device should automatically boot to Nemo after removing the USB cable, however, if it doesn't, hold the power button and turn it on. You will be shown a disclaimer, then briefly the MOSLO screen, after this, wait until the desktop appears.

Dual-boot method

This method allows you to keep both Harmattan and alternative OS such as Nemo on the device, and select which OS to boot when powering the device up.

It's highly adviced to have the latest available Harmattan release for N950. OCF (one-click-flasher) installers can be found here: http://harmattan-dev.nokia.com/release/N950/firmware/.

Get modified MOSLO

wget -r -l1 -nd --no-parent -Amoslo-0.*.rpm http://repo.pub.meego.com/home:/marquiz:/n950/CE_Adaptation_N950_Mer_Core-next-armv7hl/armv7hl/

and extract the contents

rpm2cpio moslo-*.armv7hl.rpm | cpio -vidu

Flash modified MOSLO to NAND. (You need to grab the original MOSLO binary from http://tablets-dev.nokia.com/moslo.php, in order to be able to flash.)

sudo flasher -a moslo-rootfs-1.2011.34-2_RM680-OEM1-916_0.0.13-12.1.bin -L usr/share/moslo/moslo.img -f -R

The device is flashed and rebooted to the modified MOSLO. Next thing is to move the rootfs to the device Nokia N950 & Nokia N9 Rootfs Installation.

After removing the USB cable, you will be shown a selection to boot Harmattan or the alternative OS (Nemo). NOTE: if Harmattan fails to boot, plug in charger/USB cable right after selecting Harmattan in MOSLO screen and keep it connected.

Uninstalling the dual boot

Removing Nemo rootfs and the Alternative OS partition

Boot the device with USB cable connected so that it stays in the modified MOSLO screen. Then, telnet in the device in order to get to modified MOSLO console. Note you may have to setup the network interface on your host PC (e.g. ifconfig usb0 192.168.2.14 up).

$ telnet 192.168.2.15

Run the following in the modified MOSLO console (which you get after successful telnet):

/ # autopartition.sh delete /dev/mmcblk0

On the last line of the printout (in modified MOSLO console), you should see "Removal of Alt_OS partition completed successfully!". Now, you can turn off your device. Do not turn it on, before the next steps (i.e. wiping out modified MOSLO) are done, because otherwise the modified MOSLO will re-partition your device, again, in the next boot.

Removing the modified MOSLO

Now you're ready to remove the modified MOSLO. Create empty file (on your host PC)

$ touch empty.img

Flash the empty file

$ flasher -a moslo-rootfs-1.2011.34-2_RM680-OEM1-916_0.0.13-12.1.bin -L empty.img -f -R

If the flashing succeeds, MOSLO is removed and the device should boot to Harmattan.

(Source for this information: http://wiki.meego.com/User:Marquiz/N950)

Nokia N9

DISCLAIMER: These instructions are provided without any warranty what so ever and will break the warranty of your device. Following these instructions is done totally on your own risk. Because of the previously mentioned the instructions are only targetted for hackers/developers only.

By following these instructions you are being aware of following facts:

  • You may brick your device to state where it can't be returned to usage
  • You may not be able to reinstall Harmattan to your device
  • You may lose all the data from your device
  • You lose your device warranty

YOU HAVE BEEN WARNED!

Overview

  • Download a Nemo (or other suitable) image (see Images section)
  • Get flasher (see N950 instructions)
  • Get moslo
  • Get kernel
  • Flash moslo and kernel
  • Mount N9 partition and copy image to fs
  • Boot device into Nemo

Single Boot by Loading The Kernel (Not recommended)

NOTE: This single boot guide isn't working properly and needs fixing. Thus it is not recommended to be used. See the #Persistent Single Boot by Flashing the Dual Boot instead.

wget -r -l1 -nd --no-parent -Amoslo-n9-0.*.rpm http://repo.pub.meego.com/home:/marquiz:/n950/CE_Adaptation_N950_Mer_Core-next-armv7hl/armv7hl/
rpm2cpio moslo-n9-*.armv7hl.rpm | cpio -vidu
sudo flasher -k usr/share/moslo-n9/zImage-moslo -n usr/share/moslo-n9/initrd-moslo -l -b

After this the N9 is booted with moslo and you see warning about warranty, after which green text comes up that says the N9 is being repartitioned for AlternateOS. This takes a moment after which the newly created fs is exported via USB. If it doesn't, try the Troubleshooting section

Next thing is to move the rootfs to the device with Nokia N950 & Nokia N9 Rootfs Installation guide.

After this is done disconnect the USB cable and press volumedown key when asked whether to boot to Alternate OS or to Harmattan. In subsequent boots, device will boot directly to Harmattan. To get Alternate OS booting you need to run the above flasher command again.

Persistent Single Boot by Flashing the Dual Boot

NOTE: This guide is using the dual boot moslo, but doesn't still provide dualboot capability to Harmattan.

First get the packages and extract the needed files.

wget -r -l1 -nd --no-parent -Akernel-moslo-n9-2*.armv7hl.rpm http://repo.pub.meego.com/home:/marquiz:/n950/CE_Adaptation_N950_Mer_Core-next-armv7hl/armv7hl/
rpm2cpio kernel-moslo-n9-*.armv7hl.rpm | cpio -vidu

After we have the kernel-moslo-n9 we need to get also a fiasco image from which the ape algorithm is retrieved. This fiasco image can be retrieved with N9 Firmware recovery guide. After you have downloaded a fiasco image you can flash the kernel to the device with following command.

sudo flasher -a <FIASCO_IMG> -k ./usr/share/kernel-moslo-n9/zImage-kernel-moslo-n9 -f

After the flashing is done reboot the device by detaching the usb cable and quickly attaching it back. You will see warning about warranty and after that green text that should say that device is repartitioning for the alternative os. If you see error try theTroubleshooting setion.

When the repartitioning is done the device exports the new partition via usb (when ever the device is booted with usb cable attached) and you can follow the Root filesystem installation guide to get the Nemo installed to the device.

Removing Nemo rootfs and the Alternative OS partition

You can remove the Alternative OS partition with the modified MOSLO. Thus, you get all the space reserved Nemo back to use for Harmattan.

Load the modified MOSLO for N9, as described above, and keep the USB cable connected:

$ sudo flasher -k usr/share/moslo-n9/zImage-moslo -n usr/share/moslo-n9/initrd-moslo -l -b

Wait until the modified MOSLO is loaded - until you see the green text saying "You can telnet into 192.168.2.15"). Then, telnet in the device in order to get to modified MOSLO console. Note you may have to setup the network interface on your host PC, see Nemo/USBNetworking.

$ telnet 192.168.2.15

Run the following in the modified MOSLO console (which you get after successful telnet):

/ # autopartition.sh delete /dev/mmcblk0

On the last line of the printout (in modified MOSLO console), you should see "Removal of Alt_OS partition completed successfully!". Now, the partition is removed and you can turn off your device.

Recovering your N9 firmware

This will completely erase your device

If you have installed moslo and repartitioned the device see Remove Aternative OS partition guide.

There is script available that can be used to download the firmware image for your N9 at https://gist.github.com/1636192. For Windows you could use http://www.symbian-toys.com/navifirm.aspx.

git clone git://gist.github.com/1636192.git
cd 1636192

You need to download couple of perl packages needs to be installed to get it working. For Fedora/openSUSE following command was needed:

yum install perl-LWP-Protocol-https perl-SOAP-Lite

For ubuntu installation for the same dependencies goes with command:

apt-get install libsoap-lite-perl 

After this execute the script

perl naviperl.pl

And answer to the questions based on your need and device. The first question is "Select Nokia N9 SW Release:", where you probably want to pick the latest version which is the first one in the list e.g., 40.2012.21.3. Second question is about the device, e.g., "RM-696 NDT 16GB ROW CYAN" (in case you wonder, ROW means "Rest Of the World". For the 2nd question, if you're not sure what to pick, go for "80. RM-696 NDT NORTH EUROPE CYAN 16GB" as this supports pr001.

Last question is about which files you want to download, where you should pick at least file that looks similar to DFL61_HARMATTAN_40.2012.21-3_PR_LEGACY_001-OEM1-958_ARM.bin which is the actual image that is needed for flashing.

After the download is done it is time to flash the device. Remember to detach the USB cable from your device before starting the flasher.

After the file has been downloaded you can reflash your device.

sudo flasher -F DFL61_HARMATTAN_40.2012.21-3_PR_LEGACY_001-OEM1-958_ARM.bin -f --no-preserve 

When following text appears

Suitable USB interface (bootloader/phonet) not found, waiting...

Attach the USB cable between your N9 and host PC and the flashing begins.

When the flasher outputs Success you can detach the USB cable from your PC and your N9 should reboot to Harmattan.

Troubleshooting

FATAL: Re-partitioning failed! You might be in trouble!

Telnet into the device and `cat /var/log/repartition.log`. If you see:

FATAL: unable to find number of the Alt_OS partition! Very strange, this shouldn't happen...

This means that parted created new partition on a resized empty space, but assigned it a number of an existing partition (#2). Confirm it is so:

For Nokia N9 16GB

/ # fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 15.8 GB, 15896412160 bytes
4 heads, 16 sectors/track, 485120 cylinders
Units = cylinders of 64 * 512 = 32768 bytes
       Device Boot      Start         End      Blocks  Id System
/dev/mmcblk0p1              17      208512     6671872   c Win95 FAT32 (LBA)
/dev/mmcblk0p2          208513      288512     2560000  83 Linux
/dev/mmcblk0p3          419585      485120     2097152  83 Linux

You will need to delete partition 2, create partition 4 (same as #2 was) and restore partition 2 to that of original, so the final product looks like:

       Device Boot      Start         End      Blocks  Id System
/dev/mmcblk0p1              17      208512     6671872   c Win95 FAT32 (LBA)
/dev/mmcblk0p2          288513      419584     4194304  83 Linux
/dev/mmcblk0p3          419585      485120     2097152  83 Linux
/dev/mmcblk0p4          208513      288512     2560000  83 Linux

To finish the job of autorepartition.sh you'll have to do this manually:

mkfs.ext4 -L 'Alt_OS' /dev/mmcblk0p4
backup_kernel.sh /dev/mmcblk0p4 boot-orig

Sync and reboot, flash into MOLSO again, this time it should get you to the Alt_OS partition exported via USB.

Nemo still does not boot

This is a tough one: on my originally Australian N9 with currently flashed/updated to DFL61_HARMATTAN_40.2012.21-3_PR_005 Nemo nor Harmattan would not boot from within MOLSO (as if MOLSO actually shuts N9 down upon kexec)

It booted only after I copied recent kernel's /lib/modules over to the Alt_OS USB-exported partition, but this is irrelevant, as MOLSO still booted an older Nemo kernel.

You can also try to boot Nemo kernels directly:

sudo flasher -k nemo-handset-armv7hl-n950-0.20120614.1.NEMO.2012-08-05.2-vmlinuz-2.6.32.20112201-14.1.Nemo.Adaptation.N950.N9-adaptation-n950 -b="root=/dev/mmcblk0p4 rootwait"

Further investigation ongoing...

Nokia N950 & Nokia N9 Rootfs Installation

You should see now /media/Alt_OS if your Linux Host OS has automatic mount enabled. If the device is not shown then you need to mount it manually with following commands:

sudo mkdir -p /media/Alt_OS/
sudo mount /dev/sdX /media/Alt_OS/

Now when the device is mounted, the next thing is to extract the selected Nemo release to the device.

sudo tar --numeric-owner -xf nemo-handset-armv7hl-n950-*.tar.bz2 -C /media/Alt_OS/

When the extract is ready you should umount the device

sudo umount /media/Alt_OS

PandaBoard

The installation for PandaBoard is very simple.

Download the nemo image (see: #Images), it is named nemo-handset-armv7l-pandaboard and the disk image has extension .raw.

After downloading the image follow the Raw image write guide how to put the image to the sd card. After the image is written put the sdcard to PandaBoard and turn on the power.

i586 (e.g., Lenovo Ideapad, ExoPC)

  • Get the nemo-handset-i586-*.img from http://repository.maemo.org/meego/Nemo/.
  • Write to a USB stick, using your favourite tool(eg. mic-image-writer).
  • Insert USB stick, and boot the machine from there (you might need to configure your BIOS settings to do that.)
  • After booting the image start Terminal from the application menu (should be on the second page).
  • When in terminal change user to root with su cmd (password is nemo by default)
su

Next it is time to start installer:

installer-shell

Next answer to the questions in a way that suits your needs best. When the installation is done type

halt -p

Now when the device powers off you can remove the usb stick and restart the device.

i586 Virtual Machine

VirtualBox

Note: it is currently recommended that CPU on your host system supports at least SSSE3 extensions (triple-S!, see http://en.wikipedia.org/wiki/SSSE3 ). If you are able to see the Nemo boot up screen but then when it switches to graphical mode you only get a black screen (and probably high CPU load), the CPU may lack some capabilities. To verify what your CPU supports, on Linux system you can run the command:

grep flags /proc/cpuinfo

Installation

  • First install VirtualBox on your host OS https://www.virtualbox.org/.
  • From Nemo repository http://repository.maemo.org/meego/Nemo/ select the latest release and download the image named nemo-handset-i586-vm-*.img
  • After downloading change the extension of the image from .img to .iso and start VirtualBox.
  • In VirtualBox click New and set following values:
Name: Nemo Mobile
Operating System: Linux
Version: Linux 2.6
Base Memory Size: 512 MB

Next comes Startup disk, you can either leave it out, create e.g. 4 GB disk (recommended) for the image or use existing disk.

Start-up Disk: Create new disk
File type: VDI (VirtualBox Disk Image)
Storage details: Dynamically allocated or Fixed size
Location: Where you want it
Size: 4 GB is recommended

After this the basic settings are there, but we need to edit some of them a bit more, so select the "Nemo Mobile" VM and click Settings:

System->Processor->Extended Features: Check 'Enable PAE/NX'
Storage->IDE Controller->Empty and then "Setup Virtual CD/DVD drive": Select the .iso file that was renamed earlier


  • Now you are ready to boot the image. This is done by selecting the "Nemo Mobile" VM and clicking Start
  • After booting the image start Terminal from the application menu (should be on the second page), or open a virtual terminal in text mode by pressing <Host>-F2 (<Host> key is typically mapped to RightCtrl)
  • When in Terminal, change user to root with su command (default password is nemo):
su
  • Next it is time to start the installer:
installer-shell
  • Next answer to the questions in a way that suits your needs best. When the installation is done, shut down the VM with:
halt -p
  • After the VM powers off go back to Settings->Storage->IDE Controller and remove the .iso image.
  • Now you are ready to boot Nemo Mobile.

FAQ

If you have installation problems, you can post them here.

More help on IRC chatrooms @irc.freenode.net on #Mer and #nemomobile channels and on our Mailing lists.

Personal tools