Home » Featured, Hacks, Headline

[How-To] Using rescue initrd on the N900

20 February 2012Entry by

Note: this how-to is aimed at advanced users. Messing something up during the installation or usage may harm your device, everything is done at your own risk.

Being an ultimate hacker device, the N900 is often prone to getting software issues during your playful experiments. When that happens, don’t go strait to reflashing your device, it may still be rescued with a rescue initrd image provided by MeeGo! This how-to will show you how to install and use the initrd image for rescuing your N900.

The first part of the how-to assumes you’re using a *nix system (GNU/Linux, BSD, Solaris, MacOS) on your PC , information on Windows installation can be found below.

On your PC, open up the terminal. Make a new directory, where the image will be kept, and cd into it:

mkdir n900-rescue-initrd

cd n900-rescue-initrd

Now, get the rpm files for the image from the MeeGo repos:

wget http://repo.meego.com/MeeGo/releases/1.1/core/repos/armv7l/packages/armv7l/nokia-n900-rescue-initrd-0.1-2.157.armv7l.rpm

wget http://repo.meego.com/MeeGo/releases/1.1/core/repos/armv7l/packages/armv7l/kernel-n900-2.6.35.3-10.3.armv7l.rpm

Now, you’ll need to unpack the rpm packages using rpm2cpio. If you don’t have it, it should be available from your distribution’s repos. Else, you might try using a BASH or Perl versions, execute them the same way, as you would execute rmp2cpio.

rpm2cpio nokia-n900-*.rpm | cpio -vid ./boot/initrd*

rpm2cpio kernel-*n900-*.rpm | cpio -vid ./boot/vmlinuz*

Now you will have a directory named boot that will contain the files required.

Before you start the initrd charge your battery completely. The initrd doesn’t support charging and you want to be sure your phone won’t die when the initrd is in use.

To start the initrd, you’ll need to use the N900 flasher, please read this article, if you don’t understand what I mean. Note, we’re not reflashing the device, we’re just loading the image into the device’s memory on boot.

Shutdown the device by removing the battery and putting it back, then start the flasher in the same directory with

sudo flasher-3.5 -k boot/<vmlinuz-n900> -n boot/<initrd.img> -l -b”rootdelay=1 root=/dev/ram0″

Replace <vmlinuz-n900> and <initrd.img> with the actual file names.

After it is started, plug your N900 to your PC with a USB cord. Your device should now boot and you’ll get a menu with the following features:

  • Toggle USB networking on/off (N)
  • Reboot the device (R)
  • Shutdown the device (S)
  • Start recovery terminal (T)
  • Toggle USB storage mode on/off (U)

Here, now you can use the provided functionality to fix your breakages. You can also do a backup by toggling the storage mode on (U) and mounting the device.

Enjoy!

Windows Installation

If you’re using a Windows machine, installation on Windows can be tricky, as unpacking the rpm packages is required. Most of the process is basically the same, make a directory and download the rpm files from the wget links above to it. Now to unpack the packages you can do several things:

1. Set up a virtual machine with a small GNU/Linux distribution and use the rpm2cpio commands there.

2. Use Cygwin with the BASH rpm2cpio script mentioned above. cpio should be included in it, but if not, just get the cpio for Windows.

3. Get ActivePerl and try the Perl script mentioned above together with the cpio for Windows.

After you unpacked the packages, just use the flasher from cmd.exe with

flasher-3.5.exe -k boot/<vmlinuz-n900> -n boot/<initrd.img> -l -b”rootdelay=1 root=/dev/ram0″

Again replace the things in <> with the actual file names.

Your device should boot into the rescue image.

 


Have a suggestion or a problem? Put them up in the comments, or on our forum, and we’ll be sure to give them a look!

Comments:


Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.