Monday, November 01, 2010

Running Meego Handset in an N900 chroot with Easy Debian: Part 1

I would like to document my process for getting Meego Handset to run in a Maemo chroot on the N900 using Easy Debian, so you don't have to multi-boot your phone.

But I can't document everything in one post, and I'm documenting as I go, so this first post will be the just first steps: how to get an Easy Debian compatible image out of the raw Meego images that the Meego project is posting.

I do these first steps on an Ubuntu desktop machine.

1. Download the latest Meego Handset image. I got mine from the builds directory of the Meego repository, here:  http://repo.meego.com/MeeGo/builds/

The file you are looking for ends in .raw.bz2 and you can get to it by choosing the biggest numbered directory twice, then going into .../handset/images/meego-handset-armv7l-n900/  and downloading the .raw.bz2 file.

This is the one I'm using.

2. Unzip the file on your Linux machine.

I recommend becoming root for the entirety of this procedure. I suggest doing it before you even unzip the file. I had problems unzipping the file as a regular user, and this may have been my problem; I don't know, but what can it hurt to gain root right away?

sudo su -

Unzipping the file is pretty straightforward on a Linux command line:

bunzip2 meego-handset-armv7l-n900.raw.bz2


In these instructions, I'm going to call the meego file "meego-handset-armv71-n900"; substitute the longer version as necessary.

3. Mount the Meego rootfs partition on loop. This is tricky, because the raw image has multiple partitions and so you have to use a little trick I found on the 'Net, here.

a. You need to first create a directory to mount on. I created /media/meego:

mkdir /media/meego

b. Now mount the first partition. First check to see where the partition starts:

fdisk -lu meego-handset-armv7l-n900.raw

See where the first partition starts. Multiply that number by 512, and use it as the offset. In my case, it starts at 1 so the calculation is easy. It is just 512. This will probably stay the same for future releases, but it might change. Better to document this, just in case.

mount -o loop,offset=512 meego-handset-armv7l-n900.raw /media/meego

4. Now make a new image file that will just have the Meego rootfs in it, so it can be mounted properly by Easy Debian. I made my image 1GB, but you can make it bigger if you want.

dd if=/dev/zero of=meego_1_1.img.ext3 bs=1024 count=0 seek=$[1024*1000]

You have to format the new image file! I used ext3.

mkfs.ext3 -m0 -L meego1_1 meego_1_1.img.ext3

5. Mount the new empty image file. I made a mount point, /media/meego2, but you can use whatever name you want.

mkdir /media/meego2
mount -o loop meego_1_1.img.ext3 /media/meego2

6. Copy the Meego rootfs to the new image file you created. Substitute the correct directories here.

cd /media/meego
tar -cf - . | ( cd /media/meego2 ; tar -xpvf - )

7. Unmount everything.

umount /media/meego
umount /media/meego2

8. Copy your new Easy Debian compatible image file to your N900. I would suggest using the USB cable, but there are lots of ways to do this. You can also zip up your file to keep a safe backup.

Next post:

I'll try to post again soon with directions for getting the Meego Handset UI started under Easy Debian's Xephyr nested X server.

Labels: , , , ,

9 Comments:

At Tue Nov 02, 12:38:00 pm GMT-7, Blogger Ernesto de Bernardis said...

You're always great, Alan. Looking forward to your results...

 
At Tue Nov 02, 01:22:00 pm GMT-7, Blogger Unknown said...

Thank you for this valuable post. Is it possible running NITDroid using the same method?

 
At Tue Nov 02, 06:35:00 pm GMT-7, Blogger Unknown said...

Why not! If a geniues such as yourself can find a way to run "Nitdroid & Meego" or any other sought after OS with the current resources we got (the N900) than I'm all for it. I have 23gb on my N900! It would be nice to run other OS mention above without buying a 4gb or whatever SD Card when I run as is. You rock by the way! You have my highest regards! Keep up the good work!

 
At Wed Nov 03, 12:21:00 am GMT-7, Blogger Unknown said...

Great! I'm not terribly interested in Meego since your Easy Debian made the N900 fulfill all my needs already, but it looks like fun to try out your instructions and learn a few things on the way! Looking forward to the next posts...

 
At Wed Nov 03, 05:40:00 am GMT-7, Blogger Sincereluck said...

hey plz put the how to for this with windows 7 and nokia n900
Thanks and keep up the good work

 
At Wed Nov 03, 07:08:00 am GMT-7, Blogger Unknown said...

Great work.
Any chance of making the image binary available for download (especially for us Windows types)?

 
At Thu Nov 04, 02:19:00 am GMT-7, Blogger shehab said...

very nice work buddy..keep it up

 
At Thu Nov 11, 06:21:00 am GMT-8, Blogger Aldon Hynes said...

Very cool. I've got it up and running. I've also tweeked debmee to be able to boot off of and older MeeGo load that I had on one of my SD partitions. I'll write more about this later.

 
At Thu Aug 18, 04:57:00 am GMT-7, Blogger int_ua said...

Can I suggest replacing longer dd with more readable
fallocate -l 1000m meego_1_1.img.ext3
? :)

Also, I didn't find the script to automate actions from this post. It wasn't written, right? I want to try it, but don't want to make already-done work :)

 

Post a Comment

<< Home