Reflashing and Setting Up My Nokia N900

This page contains instructions for myself, but they might be useful for others as well.

These instructions currently ignore the flashing part and focus on essential system setup and restoring from backup, for data transfer from a loaned N900 to my own N900.

Older stuff reflashing OS2006 on a Nokia 770, reflashing OS2008 on a Nokia N8x0.

Backing up stuff before reflashing

  1. Use the Backup/Restore application to create a backup.
  2. Run my backup-to-mmc shell script in an xterm (warning: it is very strongly tailored to the set of files I keep in my home directory).
  3. You'll also want to put restore.sh in the 'backups' directory in MyDocs.

Reflashing

See the wiki, or, in short:

  1. Download flasher-3.5 for Linux.
  2. Download the firmware image (RX-51-....bin).
  3. Make sure the battery is fully charged.
  4. Disconnect the charger.
  5. Power off the device.
  6. sudo ./flasher-3.5 -f -F RX-51_*.bin -R (replace RX-51_*.bin with the filename of the OS image).
  7. Connect the USB cable; the N900 will turn on by itself.
  8. Wait for the flasher to do its job.

When I did this the screen of the N900 was rather dark (backlight off) with a barely-visible Nokia logo, and without a progress bar.

After the flash and reboot I got the customary "confirm your regional settings and date/time" screen, after which it booted into the desktop with a bunch of applets jumbled on top of each other in the top-left corner of the screen. Bug!

Restoring stuff after reflashing

Restoring your backup makes some of these steps redundant (e.g. enabling Extras or installing OpenSSH).

  1. Open Application Manager.
  2. Enable the Extras catalogue (called "maemo.org" in newer firmware versions).
  3. Install OpenSSH client and server. It will ask and set a root password.
  4. ssh root@mg-n900 (replace mg-n900 with the IP of your device).
  5. Create a file /etc/sudoers.d/user
    user ALL = (ALL) NOPASSWD: ALL
    root ALL = (ALL) NOPASSWD: ALL
  6. Run update-sudoers
  7. vipw and make sure the user entry reads 'user:*:...' (no password, ssh key logins okay), instead of 'user:!:...' (locked account, no logins allowed) --- or try passwd -u which would be much simpler if it works
  8. sudo -u user sh /home/user/MyDocs/backups/restore.sh
  9. Verify that you can now log into your N900 with the SSH public key: ssh user@mg-n900 (replace mg-n900 with the IP of your device).
  10. Verify that you can now use sudo: sudo -s
  11. Lock down the root account: passwd -l root
  12. Exit from the root shell and log out from the ssh session.

Aside: the Restore app is dumb. "Device contains a file with the same name that is newer. Rename?" Well, you could at least tell me which file it is! And when I tap the screen to un-dim it so I can read the (buggily pre-selected) dialog text, I'd appreciate if you didn't treat that tap as a "cancel" action. So I don't know what file it was and which action I selected and what are the consequences of all that. All I know is that "12 MB restored; Settings: Cancelled, Application list: cancelled" so obviously I had to restore (and reboot) again. Grr!

Sadly, the next restore of the same backup gave me no prompts whatsoever and the same results: Settings cancelled, Application list cancelled. W T F???

Third restore from the same backup kinda worked: this time i selected only settings, got the stupid rename unknown file you'll never guess which prompt, agreed to rename, suffered through another reboot (remind me please, is it running Maemo or Windows?).

Okay, fourth restore to restore my applications. All's kinda well. Got the OpenSSH prompt for a root password in the middle. Got the useless ukeyboard informational dialog that pauses the installation until you notice and click Ok. Thank god not all apps do those.

Hermes failed to install: python-gobject (= 2.14.2-1maemo2) not present in Extras. unzip was unavailable. The other apps I had installed restored fine, although the whole process took a long time.

Icons are semi-broken: just after the restore most of my app launchers on the desktop show the generic blue square (with the exception of gPodder and mmpc). The app menu shows the icons just fine.

Installing avahi-daemon from extras-devel is also recommended, since then you won't need to look up IP addresses when you want to ssh into your Nokia. Well, if you also set up the hostname:

  1. sudo vim /etc/hosts /etc/hostname
  2. replace Nokia-N900-xx-xx with whatever you want (e.g. mg-n900).
  3. Be very very careful, a system hostname that cannot be resolved could break sudo, and render your device unbootable
  4. reboot