PDA

View Full Version : N800 + OS2008 + MMC boot (this worked for me)


TXFI
01-27-2008, 07:17 PM
EDIT 2008-09-30: these are somewhat outdated by now, please check e.g. post #73 on this thread instead: http://www.internettablettalk.com/forums/showpost.php?p=229168&postcount=73


(my first post so be gentle...)

hi,


it took me forever to first _find_ all this stuff and then make it _work_ so I thought I'd record it here. Maybe someone else will benefit from this.

In short, this is what I did to get my N800 to boot OS2008 from MMC. My steps were:

1) upgraded my N800 to OS2008, http://europe.nokia.com/A4305010
2) enabled the Maemo Extras repository in Application Manager and added http://repository.maemo.org, Distribution: (blank) Components: free non-free
3) installed openssh using Application Manager
4) defined a root password (openssh's installer prompted for this)
5) opened xterm and:

# ssh root@localhost
# visudo

Added to following lines to the end of sudoers:

user ALL = (ALL) NOPASSWD: ALL
root ALL = (ALL) NOPASSWD: ALL

6) created two (512 MB and 7 GB) partitions on my 8 GB SD card:

# apt-get install e2fsprogs
# umount /media/mmc1
# umount /media/mmc2
# sfdisk /dev/mmcblk0
/dev/mmcblk0p1:1,16384,6
/dev/mmcblk0p2:16385,,83
/dev/mmcblk0p3:
/dev/mmcblk0p4:
# reboot

7) created file systems on the card:

# umount /media/mmc1
# umount /media/mmc2
# mkdosfs /dev/mmcblk0p1
# mke2fs /dev/mmcblk0p2
# reboot

8) downloaded http://fanoush.wz.cz/maemo/initfs_flasher.tgz using the N800 browser and saved it to: /home/user/MyDocs/.documents/ (default location)

9) unpacked it and ran the script:

# cd /home/user/MyDocs/.documents/
# tar zxvf initfs_flasher.tgz
# cd initfs_flasher
# ./initfs_flash

10) installed the kernel modules:

# insmod /mnt/initfs/lib/modules/2.6.21-omap1/mbcache.ko
# insmod /mnt/initfs/lib/modules/2.6.21-omap1/ext2.ko

11) mounted the file systems to be cloned:

# mount /dev/mmcblk0p2 /opt
# mount -t jffs2 -o ro /dev/mtdblock4 /floppy

12) cloned the files from /floppy to /opt:

# ./tar cf - -C /floppy . | ./tar xvf - -C /opt

13) set up the MMC as a boot option and rebooted the device:

# umount /opt
# umount /floppy
# chroot /mnt/initfs cal-tool --set-root-device ask:mmc2
# reboot


and it seems to work perfect for me. Thanks to Marius Gedminas, Milhouse and Maemo Wiki maintainers!


Thnx,


TXFI

coffeedrinker
01-27-2008, 08:13 PM
The wiki had something about using gnu tar rather than the built in one. Is this no longer necessary?

TXFI
01-29-2008, 01:40 AM
not sure, I only tried the "regular" tar that was there already and it worked for me.

mooler
01-29-2008, 01:54 AM
worked for me too. I skipped step 5. I also used a slightly different partition approach because I have a 4gb SDHC and i had to install GNU tar but i now am booting from a cloned OS2008! Thanks! however i have a question...

Have you noticed anything funny with your battery icon such as disappearing when plugged in? I am using a custom kernel from fanoush but I noticed this before I flashed

fanoush
01-29-2008, 05:03 AM
The wiki had something about using gnu tar rather than the built in one. Is this no longer necessary?
You can run the tar cloning phase without 'v' in tar arguments (i.e. tar cf - ... | tar xf - ...). This does not print all file names so you see only errors and warnings. If you don't see any errors about filename too large or exceeding xx (=100?) characters then it may be fine. Warnings about old timestamps are harmless.

Maybe busybox tar in OS2008 finally supports long file names. Would be nice if someone who used default (=busybox) tar for cloning would confirm there are really no errors and the clone is complete.

TXFI
01-29-2008, 07:41 AM
fanoush,

you made me so worried about the default tar not creating a 100% clone that I rebooted from internal flash and said as root in Xterm:

# mount -t jffs2 -o ro /dev/mtdblock4 /floppy
# mkdir /media/mmc1/tartest
# tar cf - -C /floppy . | tar xf - -C /media/mmc1/tartest

(MMC1 is my other SD card) and it produced only these two errors:

tar: cannot create directory './var/lib/gconf/system/bluetooth/device/00:0C:0A:03:7F:2A': Invalid argument
tar: can't open './var/lib/gconf/system/bluetooth/device/00:0C:0A:03:7F:2A/%gconf.xml': No such file or directory

probably because of the VFAT on the SD card being unable to handle ":" (right?). I rebooted from MMC2 and those had been copied correctly during my previous clone to MMC/Ext2fs. Since there were no other problems I should be okay with my cloned OS2008, right?


mooler,


the battery icon on my cloned MMC2 boot seems to work just fine for me.


thanks,


TX FI

fanoush
01-29-2008, 09:20 AM
probably because of the VFAT on the SD card being unable to handle ":" (right?). I rebooted from MMC2 and those had been copied correctly during my previous clone to MMC/Ext2fs. Since there were no other problems I should be okay with my cloned OS2008, right?

Thanks for testing. Yes this looks good. tar in OS2006 had the 100 character limit and definitely did not copy everything (tried myself). Also I've seen many reports with OS2007 where default tar also did not make 100%clone (never tried). Looks like finally in OS2008 we have tar which is good enough for cloning :-)

TXFI
01-29-2008, 07:01 PM
Here's a slightly updated version of my steps. In short, this is what I did to get my N800 to boot OS2008 from MMC. Note that all shell commands need to be entered as root (except for the very first command).


1) upgraded my N800 to OS2008, http://europe.nokia.com/A4305010
2) enabled the Maemo Extras repository in Application Manager and added http://repository.maemo.org, Distribution: (blank) Components: free non-free
3) installed openssh using Application Manager
4) defined a root password (openssh's installer prompted for this)
5) opened xterm and:

# ssh root@localhost

(optional step - Added to following lines to the end of sudoers)
# visudo
user ALL = (ALL) NOPASSWD: ALL
root ALL = (ALL) NOPASSWD: ALL

6) created two (512 MB and 7 GB) partitions on my 8 GB SD card. Adjust the values for mmcblk0p1 and mmcblk0p2 to reflect the SD card you are using. One unit is equal to 32768 bytes so 16384 units/blocks is 512 MB.

# apt-get install e2fsprogs
# umount /media/mmc1
# umount /media/mmc2
# sfdisk /dev/mmcblk0
/dev/mmcblk0p1:1,16384,6
/dev/mmcblk0p2:16385,,83
/dev/mmcblk0p3:
/dev/mmcblk0p4:
# reboot

7) created file systems on the card:

# umount /media/mmc1
# umount /media/mmc2
# mkdosfs /dev/mmcblk0p1
# mke2fs /dev/mmcblk0p2
# reboot

8) downloaded http://fanoush.wz.cz/maemo/initfs_flasher.tgz using the N800 browser and saved it to: /home/user/MyDocs/.documents/ (default location)

9) unpacked it and ran the script:

# cd /home/user/MyDocs/.documents/
# tar zxf initfs_flasher.tgz
# cd initfs_flasher
# ./initfs_flash

10) installed the kernel modules:

# insmod /mnt/initfs/lib/modules/2.6.21-omap1/mbcache.ko
# insmod /mnt/initfs/lib/modules/2.6.21-omap1/ext2.ko

11) mounted the file systems to be cloned:

# mount /dev/mmcblk0p2 /opt
# mount -t jffs2 -o ro /dev/mtdblock4 /floppy

12) cloned the files from /floppy to /opt:

# tar cf - -C /floppy . | tar xf - -C /opt

(This takes quite a while. Observe any errors it might, but shouldn't, display. Change to "tar xvf" if you want verbose output.)

13) set up the MMC as a boot option and rebooted the device:

# umount /opt
# umount /floppy
# chroot /mnt/initfs cal-tool --set-root-device ask:mmc2
# reboot

hjeng
02-07-2008, 07:40 PM
I have problem executing mke2fs command...is there any package I need to install? I have upgraded to OS 2008

-sh: mke2fs: not found

everythingsablur
02-08-2008, 12:18 PM
I have problem executing mke2fs command...is there any package I need to install? I have upgraded to OS 2008

-sh: mke2fs: not found

Yes, you need to install e2fsprogs.

See Milhouse's original instructions here. http://www.internettablettalk.com/forums/showthread.php?t=8631

martinjk
02-08-2008, 05:11 PM
Hi,

I repeated your steps. The was not problem first but it does not work for me.
I have copy of file system on mmc but I can not boot fom it.
The boot menu is present but I received two situations, first it boot up from mmc but when the load status bar was over it rebooted again. Second, I have message "boot from mmc failed" and it load from flash.
I tried later from fresh flesh of os2008 but no progress.
What I shoud try?

_____________________
UPDATE
Problem solved!
It does not work with A-DATA 8GB SDHC Class6 card but with my second card it works without problems.
I have found similar information in other forums too.
I do not know why.

nokian111
02-08-2008, 10:47 PM
what is the advantage of booting off the mmc?

TXFI
02-09-2008, 01:22 AM
hjeng, you probably missed step 6)

# apt-get install e2fsprogs

martinjk, I wish I could help but all I can think of is for you to re-format your SD card with the Panasonic tool: http://www.internettablettalk.com/forums/showthread.php?t=10417&page=2 and re-flash OS2008 and try again

nokian111, if you boot from MMC you get more space for your apps, games, etc.

martinjk
02-09-2008, 11:30 AM
to nokian111: you can install KDE with office suite. That's what I am experimenting with.
As well the system is faster from MMC because internal flash filesystem uses compresed file system.

bunanson
02-09-2008, 12:46 PM
to nokian111: you can install KDE with office suite. That's what I am experimenting with.
As well the system is faster from MMC because internal flash filesystem uses compresed file system.

It is faster in principle. In practice, the difference is too small to be appreciated. I measured in 770, 2006Os and 2007Os, there is NO measureable difference, http://www.internettablettalk.com/forums/showthread.php?t=7718&highlight=MMC+boot+faster.

The blue pregressing bar on the bottom of the screen with the Nokia logo upon booting is a calibration tool. Upon flash boot, it reaches to the end, the right boundary, whereas it stopped at approximately 89% upon MMC boot. I guess one can 'implied' it is 11% faster with MMC boot. One gets more speed improvement by this, http://www.internettablettalk.com/forums/showthread.php?t=7342&highlight=mmcplus.

The MMC boot is mainly to increase app installlation space, and is much for critical for 770 as it has 64 MB instead of 256 on the N8x0.
MMC boot also provides a safety net for the OS, in case one messes up the MMC OS, one can always fall back to the flash boot.

Just a note,


bun

dont
02-09-2008, 03:08 PM
MMC boot also provides a safety net for the OS, in case one messes up the MMC OS, one can always fall back to the flash boot.


You can also take snapshot backups of the MMC file system from your PC so that you can recover to an earlier or a different state without having to re-install everything. On Windows, I use Acronis True Image to take backups of ext2 or ext3 file systems.

dont
02-09-2008, 03:13 PM
The blue pregressing bar on the bottom of the screen with the Nokia logo upon booting is a calibration tool.

Is it? I thought that at least some of this time (maybe most?) was spent booting from the Flash memory regardless of whether the final OS came from Flash or MMC.

bunanson
02-10-2008, 05:27 PM
You can also take snapshot backups of the MMC file system from your PC so that you can recover to an earlier or a different state without having to re-install everything. On Windows, I use Acronis True Image to take backups of ext2 or ext3 file systems.

I dl Acronis True Image Home and have a 15 day trial. I tried to clone a 4G regular size SDHC, which has KDE on it, to a 4G micro/regular size adapter, and the process failed. It cannot read from the micro/SD adapter. I was able to resurrect the card by its add a disk and reformat function. I am kind of scare to try it again. Have you try the restore function? Or you have only backup, but have not try the restore? Or one have to retore with the same disk format?


I like your idea of backing up, still looking for a tool though.


The progress bar, I am still looking around. I think it is from Fanoush readme.txt initfs.tgz.


bun

JFX
02-21-2008, 11:12 AM
Little issue here, if anyone knows the answer that would be stellar. I'm just starting the process of the instructions on the first page to boot from MMC, I have an 8GB sdhc in the internal slot, and I can't seem to unmount it, I try it , and I am root, but everytime I try unmount/media/mmc2 or mmc1 it says
/bin/sh: unmount/media/mmc2: not found
Not sure what the fix for this is, I installed the latest of e2fsprogs and did all the previous steps. Pleeeease help Captain Noob. me. Also I did do a search found one thing but didn't fix it.

PS. Im on N800 os 2008

nhanquy
02-21-2008, 11:53 AM
Little issue here, if anyone knows the answer that would be stellar. I'm just starting the process of the instructions on the first page to boot from MMC, I have an 8GB sdhc in the internal slot, and I can't seem to unmount it, I try it , and I am root, but everytime I try unmount/media/mmc2 or mmc1 it says
/bin/sh: unmount/media/mmc2: not found
Not sure what the fix for this is, I installed the latest of e2fsprogs and did all the previous steps. Pleeeease help Captain Noob. me. Also I did do a search found one thing but didn't fix it.

PS. Im on N800 os 2008

It is because you have swap file in mmc2. Delete the swap file (virtual memory in control panel) then you will be able to umount it.

JFX
02-21-2008, 12:05 PM
Thanks so much for the help, any quick way of deleting the swap file? Is it titled .swap? I'll look with elfm2

fanoush
02-21-2008, 12:08 PM
Is it? I thought that at least some of this time (maybe most?) was spent booting from the Flash memory regardless of whether the final OS came from Flash or MMC.When the blue bar is shown first it is already booting from mmc for some time. Right after you see the 'booting from mmc2 ..." message or similar, the mmc card is mounted and boot continues there.

The (almost 2x) speedup was visible with 770 with hacked kernel with faster MMC (http://fanoush.wz.cz/maemo/#sdhc). With N8x0 mmc is faster too but so is CPU so the jffs2 (de)compression is faster too and boot speed from SD is only slightly faster. But still the CPU usage with jffs2 is much higher, reading from MMC is almost free (CPU-wise), reading from jffs2 needs CPU a lot. Of course this bonus effect is visible only if CPU already does something.

As others said - speed is not the primary reason for mmc boot, more space and possibility or easier backup is.

JFX
02-21-2008, 12:17 PM
Well I see nothing on the 8gb i have in the internal slot now, browsing with windows and nothing on there using the emelfm2 manager, must be hidden? Still getting bin/sh: not found error.

fanoush
02-21-2008, 12:21 PM
but everytime I try unmount/media/mmc2 or mmc1 it says
/bin/sh: unmount/media/mmc2: not found
The easiest thing to let the system unmount it for you is to open card door (or remove battery cover with internal card in N800). As long as you don't remove the card you can safely partition it or format or whatever. System will not touch it until you close the door. Unfortunately this is not possible with builtin N810 mmc card.

JFX
02-21-2008, 12:24 PM
Oh how interesting, so I would need to pop the card into the external slot then, yes? Thanks for your help

JFX
02-21-2008, 12:36 PM
Alright when I pop off the lid and then skip the unmount command obviously, i go to type the # sfdisk /dev/mmcblk0 and it says the same thing as above. not found...

JFX
02-21-2008, 01:11 PM
Somehow got past it, worked, did all this big process answered couple questions, said flashing, but I have no idea what it was flashing, VERY * confusing and tedious, I feel like a passenger onboard a pilot less plane taking the controls and not knowing a thing about process, actually that's exactly what it is. Anyways I'm lost and if anyone would help a chap out that would be awesome beyond. After doing the flash thing on this post
#sfdisk /dev/mmcblk0 -uM

/dev/mmcblk0p1: 0,7300,0C
/dev/mmcblk0p2: ,,,
/dev/mmcblk0p3:
/dev/mmcblk0p4:

But without the -uM command, also even though I did those command I only have my 8GB in the internal slot, which is mmc1 or mmc2 ?? After this It rebooted and it said to get boot menu hold menu button which I missed so its not back to my original 2008 os nothing is different where do i go from here? This is the most confusing peve job I've ever done on electronics, good lord.

So i'm at step 10) installing the kernels. Also Do i need to be mounted (the lid on) or the lid off, unmounted during the rest of this process? I've kept it offthus far. I am confused let me tell you.. I'm JUST a graphics designer.

JFX
02-21-2008, 06:04 PM
Thank you for this guide, i followed it to the doctor's orders, while quite a few times actually and now I have 6.4 gbs free on my Unit, thanks so much for this.

mdonkers
03-02-2008, 09:09 AM
> Here's a slightly updated version of my steps.

This works very fine! Aside from the increase in root file system space (very substantial with my 8GB mmc) there's a noticeable increase in speed. For the initial startup of applications differences are hard to discern, but during their use they're much faster..

A minor problem that sometimes occurs (possibly most when charging and switching off and then back on), is that the root file system is mounted read only. This results in all kinds of trouble that may go unnoticed at first sight. E.g are the upper statusbar icons.

A simple reboot -I use a reboot command from a root shell- solves the problem though :-)

JFX
03-02-2008, 03:57 PM
Yea, when charging my icon goes away until I unplug. Also it doesn't display the charging action when it IS visible.

thepenguinonthetelly
03-04-2008, 05:43 PM
I need some help, please!

OK, I used to have a 770 cloned using the whole process in the Wiki and on the forum and had no problems (except for a bad download, but that wasn't me causing that). My daughter destroyed my 770, and finally, I got a n800 (because of the spiffy FM radio tuner) and a 2GB Sandisk SD card.

So I'm following the instructions about creating a partition in the Wiki, and after I'm down and ready to mount the partitions, I get "card is corrupted or unformatted" error messages. Now, Sandisk isn't under the posts about some cards needing low level formatting as it seems no one uses them. Am I to assume that this message means that my card needs formatting then or is it just a bad card? (I don't have a card reader, so I can't just pop it into my PC and format the card, so I'd rather it be a bad card so I can exchange it.)

GeraldKo
03-04-2008, 06:06 PM
penguin on the telly,

I used a Sandisk Extreme III 4GB, but I formatted it first with the Panasonic software (Google this forum and you'll find it). I didn't know if I was supposed to or not, it's just the first thing I did. Then I formatted it for FAT, if I remember right, in my card reader on my Windows laptop. And then I went through the rest of the process. I don't know if I had to do that stuff first or not, to tell you the truth.

thepenguinonthetelly
03-04-2008, 06:37 PM
Well, it looks like I'll have to get a card reader then. Anyone know where I can get a cheap one?

Also, out of curiosity, my old RS-MMC (1G) which was used for the OS clone on the 770...is there a card reader for those so I can reformat it (to put MP3s or ROMs on it)?

Too bad I can't format these cards using the device.

bunanson
03-04-2008, 06:45 PM
Well, it looks like I'll have to get a card reader then. Anyone know where I can get a cheap one?


http://www.internettablettalk.com/forums/showthread.php?p=148885#post148885, thread #7

bun

thepenguinonthetelly
03-04-2008, 06:48 PM
Thanks! Much appreciated. :D

zen123
04-01-2008, 07:58 PM
Please go easy on me as I'm a total noob to all things Linux.
I just got a N800 from ebay & been loving using it adding all sorts of apps etc. However I've run out of memory space

After going through this & other relevant threads I decded to go for it. Anyway I'm stuck. Here's what I've done so far

- Updated to OS2008
- Installed OpenSSH
- Opened Xterm
- ssh root@localhost
- entered password
- # apt-get install e2fsprogs

That's it. After I enter the above command all I get the following response

Package e2fsprogs is not available but is referred to by another package.
This may mean the package is missing, has been obsoleted, or is only available from another source
E: Package e2fsprogs has no installation candidate

I've reflashed & reformtted the sd card tried 3 ohers & thats as far as I an get.

Please let me know what I'm doing wrong or have I missed something. Help is much appreciated thanks

cdmackay
04-01-2008, 08:16 PM
you need to add a new pkg repository: http://repository.maemo.org, I believe.

If you don't know quite how to do that, shout and I'll add more detail.

zen123
04-02-2008, 04:05 AM
you need to add a new pkg repository: http://repository.maemo.org, I believe.

If you don't know quite how to do that, shout and I'll add more detail.

Please do......I've tried and its not very clear to me

zen123
04-02-2008, 05:01 AM
I've given up spent most of last night going through threads here & googling but non the wiser. I'm gonna sell this thing & get an Archos 605 which is much more consumer friendly.

cdmackay
04-02-2008, 05:46 AM
that's a shame, since the Nokia is a much better device, and the support in these forums is very useful.

fanoush
04-02-2008, 06:33 AM
I'm gonna sell this thing & get an Archos 605 which is much more consumer friendly. Huh? I don't get it. You can easily install 3rd party applications on Archos 605? Where are they? If not and you don't need such feature then why you are trying to boot from mmc?

Looks like one can run custom stuff (http://code.google.com/p/arcwelder/) but it is not much consumer friendly or even supported by Archos.

GeraldKo
04-02-2008, 12:08 PM
I've given up spent most of last night going through threads here & googling but non the wiser. I'm gonna sell this thing & get an Archos 605 which is much more consumer friendly.

I have to say, I'm curious as to why you think/thought you needed to be able to boot from MMC. It's complicated and needed by very few users. Except for development, there's probably nothing discussed on these boards that is nearly so difficult to implement. By comparison, everything else is quite easy.

So why do you want to be able to dual-boot?

zen123
04-02-2008, 01:16 PM
OK I've just woken from a loonnggg sleep after marathon frustration last night.

I don't think I'll be ditching the N800 the Archos is just an expensive PMP. All that was said in a fit of frustration, now back to reality.

I need more space to load apps that why I'd like to dual boot. Or is there a way to load the apps onto the external memory cards that I missed something.

For now Ive just uninstalled & deleted everything I think I don't need. I'll try to get the hang of Linux & attempt this again later.

I'll be back (in my best Austrian/American accent)

schmots
04-02-2008, 01:41 PM
Zen, I just havn't finished the final two steps yet for OS2008, but I am redoing my really easy instructions for dual booting on my blog site. Expect to see the last two posts by the end of this weekend.

cdmackay
04-02-2008, 02:17 PM
I don't think I'll be ditching the N800 the Archos is just an expensive PMP. All that was said in a fit of frustration, now back to reality.

excellent news :); glad you're sticking with us. I hope you'll be glad of that decision.

I need more space to load apps that why I'd like to dual boot. Or is there a way to load the apps onto the external memory cards that I missed something.


No, you're absolutely right.

For now Ive just uninstalled & deleted everything I think I don't need. I'll try to get the hang of Linux & attempt this again later.

that's good. however, it is not too hard, and you were well on the way, but you got stumped since one of the required pkgs (e2fsprogs) isn't in a "default" repository, and that repos needed to be added manually, before you could proceed.

Give us a shout when you're ready to resume (ideally in the main dual-boot thread)

zen123
04-02-2008, 03:05 PM
Zen, I just havn't finished the final two steps yet for OS2008, but I am redoing my really easy instructions for dual booting on my blog site. Expect to see the last two posts by the end of this weekend.

Just took a look over there & I like. Looking forward to your next installment.

KotCzarny
04-03-2008, 12:06 PM
fanoush, shouldn't one mount --bind / /mnt/something_temporary and copy from there? that way you won't copy files created by initfs :)

fanoush
04-03-2008, 02:50 PM
fanoush, shouldn't one mount --bind / /mnt/something_temporary and copy from there? that way you won't copy files created by initfs :)
Not sure what exactly you are refering to but yes, you must mount rootfs again somewhere else before cloning to not to copy /mnt/iniitfs and also /sys, /proc and you also need real hidden contens of /dev, not udev stuff mounted over it. I'm not sure bind mount is good choice for this but regular mount is. You can mount same device more times in linux.

KotCzarny
04-03-2008, 03:00 PM
i was referring to the cloning stage :)
btw. here's my cloning script, btw. itt didn't allowed me to upload .sh file so i renamed it to .txt, just save it to /tmp on your nokia and run with: sh /tmp/clone.txt
BEWARE, it will FORMAT your second partition in external slot :)

ps. it's configurable
ps2. i assume card is partitioned properly (ie. 1st partition is vfat, 2nd is ext3)
ps3. i have added my bootmenu.conf

screener
04-08-2008, 05:39 PM
hi everyone

thank god i'm back . . . i love my N800

what if i wanted to do this with a 4G xtreme SD card . . . can you please help me with that ??

what are the numbers for the card size ??

thanx alot

GeraldKo
04-08-2008, 07:54 PM
what if i wanted to do this with a 4G xtreme SD card . . . can you please help me with that ??

what are the numbers for the card size ??

thanx alot

Look here (http://www.internettablettalk.com/forums/showpost.php?p=81635&postcount=49)for your specific question. I also recommend you look at my guide for easier cloning (http://www.internettablettalk.com/forums/showthread.php?t=18751).

(You'll also be glad to know I've successfully cloned to a SanDisk 4GB Extreme III card.)

screener
04-10-2008, 05:13 PM
im more than glad
thank you very much
what a nice first post

i will try it now and let you know !!

i have installed lots of software on my n800 and im going to try to clone it with the software on it . . . lets see

screener
04-11-2008, 02:18 PM
done
very nice very straightforward

thank you very much

Laughing Man
04-12-2008, 10:36 PM
Before I go ahead and do this, can I also do the screen rotating as well (requires flashing the kernel) and/or KDE?

L0cutus
05-08-2008, 01:19 PM
all worked ok here with a sandisk extreme III 8gb !
Thanks !

TheGogmagog
05-12-2008, 01:42 PM
so close...
12) cloned the files from /floppy to /opt:
# ./tar cf - -C /floppy . | ./tar xvf - -C /opt
gets me this: /bin/sh: ./tar:not Found

N800 with OS2008. On reboot get 'Booting from flash (mtdblock4 jffs2) message, but don't think it is (Device Memory is still 251.5MB). [Edit: when booting from MMC it says so, not flash]
Using a 2GB SD Card, partitioned with 1.3G and ~.5G method.
File manager shows Internal memory card with 40.5MB.

[Edit: I restarted from step 9 here (http://www.internettablettalk.com/forums/showthread.php?t=18751)] after copying the tar and nupgrade.sh files to MyDocs. Seems to have done the trick.] It might have been alright the first time, and I just missed pressing the boot from MMC2 option.

steffen800
05-31-2008, 03:17 PM
hello,
the above description worked for me too.
i had about 20MB left on my n800 und decieded to switch to dual boot from sd.
i wanted to give an 512MB SD card a second life as internal card.
i planned to leave 96MB for virtual memory (partition 1) and rest for system and apps.
after proceeding, my IT shows up with total memory of 378,1MB, used 355,6 free 22,6. (98MB available on internal vard, just as planned)
ok, i won 2,6MB for apps?
before proceeding, the tablet showed around 250MB of total memory. now 378, but free space (for apps) still is the same?
in / i printed the size of all files:
du -h|sort -n -r > space.txt
and
grep .0M space.txt
biggest one: /usr/lib/python2.5 (29.0M)
second: /var/cache/apt (4.M)
mh, nothing special.
am i wrong or should there be now around 100MB more free memory then before?
thanks

mrfan
06-06-2008, 09:43 AM
Hi all, first post for me.

There works perfectly on a single ext3 partition (2gb SD).

You must edit bootloader.sh in order to use a SINGLE partition.

Regards, mrfan (Fabrizio).

CyberCowboy
06-24-2008, 03:35 PM
Edited because I got my answer from a post in the newbie forum

jaeezzy
08-13-2008, 10:07 AM
Hi TXFI, I was very impressed to hear that booting from memory card will give more space for downloading application and help flash memory from wearing out as installations are done in removable memory card. The more good thing above all was that when I have to reflash my IT I won't lose the applications I've installed as it's all saved in mmc1. (Plz correct me if my belief about booting from mmc1 is wrong). So, I followed your steps. Btw, I'm using N810 with the latest software. Here's were I couldn't perform as stated and the final outcome:
-Step 6 was good.
-Step 7 was going fine but when it came to the command '# mke2fs /dev/mmcblk0p2' it said 'couldn't find mke2fs'. Ignoring it I went on and rebooted my IT.
-Step 8,9 and 10 was good.
-In step 11, when giving the '# mount dev/mmcblk0p2 /opt' cmd it gave me error. Another cmd went fine.
-Again in step 12, I got the error 'couldn't find ./tar'
-In step 13, I couldn't umount /opt but others went fine and rebooted my IT.

IT rebooted fine and I was shocked to see that my IT's internal memory (not the removable memory) was used instead of my removable memory as the internal memory which is supposed to have 2GB space now has only 511.7MB available and there are no any files I can see. My removable care is normal. So, was it suppose to be this way? What should I do to fix the above mentioned problems I faced while going through your steps thanks.

rash.m2k
08-16-2008, 07:16 AM
Hi all, first post for me.

There works perfectly on a single ext3 partition (2gb SD).

You must edit bootloader.sh in order to use a SINGLE partition.

Regards, mrfan (Fabrizio).

Where is bootloader.sh? I can't boot because it tries to boot from MMC internal parition 2, and I only have a single ex2 partition.

lawrencelaw
08-31-2008, 09:36 AM
Here's a slightly updated version of my steps. In short, this is what I did to get my N800 to boot OS2008 from MMC. Note that all shell commands need to be entered as root (except for the very first command).


1) upgraded my N800 to OS2008, http://europe.nokia.com/A4305010
2) enabled the Maemo Extras repository in Application Manager and added http://repository.maemo.org, Distribution: (blank) Components: free non-free
3) installed openssh using Application Manager
4) defined a root password (openssh's installer prompted for this)
5) opened xterm and:

# ssh root@localhost

(optional step - Added to following lines to the end of sudoers)
# visudo
user ALL = (ALL) NOPASSWD: ALL
root ALL = (ALL) NOPASSWD: ALL

6) created two (512 MB and 7 GB) partitions on my 8 GB SD card. Adjust the values for mmcblk0p1 and mmcblk0p2 to reflect the SD card you are using. One unit is equal to 32768 bytes so 16384 units/blocks is 512 MB.

# apt-get install e2fsprogs
# umount /media/mmc1
# umount /media/mmc2
# sfdisk /dev/mmcblk0
/dev/mmcblk0p1:1,16384,6
/dev/mmcblk0p2:16385,,83
/dev/mmcblk0p3:
/dev/mmcblk0p4:
# reboot

7) created file systems on the card:

# umount /media/mmc1
# umount /media/mmc2
# mkdosfs /dev/mmcblk0p1
# mke2fs /dev/mmcblk0p2
# reboot

8) downloaded http://fanoush.wz.cz/maemo/initfs_flasher.tgz using the N800 browser and saved it to: /home/user/MyDocs/.documents/ (default location)

9) unpacked it and ran the script:

# cd /home/user/MyDocs/.documents/
# tar zxf initfs_flasher.tgz
# cd initfs_flasher
# ./initfs_flash

10) installed the kernel modules:

# insmod /mnt/initfs/lib/modules/2.6.21-omap1/mbcache.ko
# insmod /mnt/initfs/lib/modules/2.6.21-omap1/ext2.ko

11) mounted the file systems to be cloned:

# mount /dev/mmcblk0p2 /opt
# mount -t jffs2 -o ro /dev/mtdblock4 /floppy

12) cloned the files from /floppy to /opt:

# tar cf - -C /floppy . | tar xf - -C /opt

(This takes quite a while. Observe any errors it might, but shouldn't, display. Change to "tar xvf" if you want verbose output.)

13) set up the MMC as a boot option and rebooted the device:

# umount /opt
# umount /floppy
# chroot /mnt/initfs cal-tool --set-root-device ask:mmc2
# reboot
Dear TXFI,

Thank you for your detailed instructions. How you figured it out is beyond me. I have managed to go through action 1-11 after few attempts without error finally. However action 12 shows up errors:-
1. /opt: Not found in archive.
2. Removing leading '/' from member names.
3. Removing leading '/' from hard link targets.
4. -C: Cannot write : No space left on device. Error not recoverable.

What have I done wrong- any clues?

Can I clarify something? I created 2 partitions in a 8G SD card as MMC2; 1st partition 7G (for general usage) and the second partition 0.6G (for OS boot. After going through 1-9, I noticed that I have 6.8G in my MMC2...is this correct? Reason for asking is that i when followed your instructions (1st partition 0.6G and second partition 7G) it resulted in the MMC showing about 0.6G.

Hope you can give some guidance .....stuck now....and the device memory is stuck at 3+MB!


Thanks
Regards
Lawrence

nhanquy
08-31-2008, 10:54 AM
Can I clarify something? I created 2 partitions in a 8G SD card as MMC2; 1st partition 7G (for general usage) and the second partition 0.6G (for OS boot. After going through 1-9, I noticed that I have 6.8G in my MMC2...is this correct? Reason for asking is that i when followed your instructions (1st partition 0.6G and second partition 7G) it resulted in the MMC showing about 0.6G.


This is correct. 6.8G is for the 1st partition. It did not show you the 2nd partition.

I have managed to go through action 1-11 after few attempts without error finally. However action 12 shows up errors:-
1. /opt: Not found in archive.
2. Removing leading '/' from member names.
3. Removing leading '/' from hard link targets.
4. -C: Cannot write : No space left on device. Error not recoverable.

What have I done wrong- any clues?

Actually you did not do step 11 correctly.
Pay attention spaces(" ") between commands.

Before step 11 try to do:
#ls /opt
#ls /floppy

Both of them should be empty

After step 11:

#ls /floppy

You should see something in there ....

Then do step 11, 12 .... Pay attention to spaces ....

lawrencelaw
08-31-2008, 11:32 PM
Dear nhanquy,

Thank you very much...I re-flashed with old OS and repeated the process.

I made extra care with spaces (copied the commands in note pad and looked extra careful for the spaces). A question is the following correct :
"tar cf - -C /floppy . | tar xf - -C /opt " or it should be
"tar cf - -C /floppy . / tar xf - -C /opt"?

Thanks
Regards

Lawrence

lawrencelaw
09-01-2008, 04:07 AM
Dear nhanquy,

I tried both and found that the 1st one was the correct command.

This is off topic but what does it mean to run debian from a partition and not from the img file? Is this similar to cloning the OS to the MMC?

I installed debian and found running the debian applications too slow to be practical. Would appreciate a link to another thread that is perhaps more relevant.

Thanks
Regards
Lawrence

Thanks

nhanquy
09-01-2008, 04:40 AM
This is off topic but what does it mean to run debian from a partition and not from the img file? Is this similar to cloning the OS to the MMC?


It means debian stays in a different partition; it doesn't need to be in the same partition of the booting OS.

No it is not the same as cloning the OS. It is more like an extension of the OS so people can run more apps under Debian.



I installed debian and found running the debian applications too slow to be practical.

Me too. If you feel you don't need it, you don't have to have it.
KDE is another one too.

lawrencelaw
09-01-2008, 07:10 AM
Dear nhanquy,

The OS in the MMC looks good. However I have trouble getting the PC to read it as it is used by the N800.

Does it mean every time I want the PC to read the MMC2, i have to boot from the device memory?:eek:

Thanks
Regards
Lawrence

nhanquy
09-01-2008, 07:32 AM
The OS in the MMC looks good. However I have trouble getting the PC to read it as it is used by the N800.


when the N800 uses it of course it doesn't want other machine comes in and mess up. right?
so if you boot from 2nd partition of the mmc then the PC can not access to that 2nd partition but the PC can access the first one, the FAT partition, as long as you don't use it for swap area.
if you do use the 1st partition for swap, turn it off then you can have the PC accessing to it (by using the USB cable).

lawrencelaw
09-01-2008, 08:31 AM
Dear nhanquy,

I did turn the swap memory off. The MMC2 is still not available to the PC via USB. So I did a device boot to copy stuff into the MMC2.

Also when i boot from device, the n800 does not have the same installed condition as when I boot from the MMC. I thought it was a cloning process...i.e. what i do for the MMC will get reflected in the device memory?

Somehow i think I did not get the process correct?:confused:

Thanks
Regards
Lawrence

nhanquy
09-01-2008, 08:59 AM
when i boot from device, the n800 does not have the same installed condition as when I boot from the MMC. I thought it was a cloning process...i.e. what i do for the MMC will get reflected in the device memory?


You should have had identical image at the time you cloned the OS from flash. Maybe you have changed something since.


I did turn the swap memory off. The MMC2 is still not available to the PC via USB. So I did a device boot to copy stuff into the MMC2.


I don't know. Sometimes it did not work as we wanted it to :) !
Boot from flash and then copy things to MMC2 is not so bad! You can also have your PC using the same WiFi share folders so both machines can access disk spaces from others.

Wzrd
09-08-2008, 01:00 AM
I finally was able to figure out how to do these instructions and have cloned my os.

It does seem to boot faster as well as bring up apps faster.

I have another question though. Is there any way to improve the web browser experience when bringing up web pages. It still seems as slow or slower than booting normally (as opposed to booting from the internal SD card) when bringing up web pages.

I have tried setting the web browser to 2048K as well as Auto. I also have the virtual memory extended to 128K in control panel.

Would a swap file on the memory card fix this problem or does the browser still kinda suck (although browsing in Diablo is a little better than Chinook as far as crashing and slowness goes).

How do I create a swap file? I tried following the instructions I searched for in the forum. I think I did it right but how can I be sure I did? Is there any way to check if I did it right?

Or, is there a way to increase the virtual memory more than 128K?

Wzrd
09-22-2008, 01:17 AM
14 days and no response to my post?

Thanks alot! I thought people would be more helpful here but I guess not.

I would like answers to my post please.

TXFI
09-30-2008, 10:35 PM
Here are the steps I took to boot my N800 from SD card to Diablo.

Note: All shell commands need to be entered as root.

1) First I removed both of my memory cards and upgraded my N800 to Diablo, http://europe.nokia.com/A4305010
2) Device booted and I went through the Start-up wizard and cancelled the Phone selecting-wizard
3) Created a working WiFi connection using Connection Manager in the Settings-menu
4) Enabled the Maemo Extras repository in Application Manager and added a new repository:

Catalog name: Maemo Chinook
Web address: http://repository.maemo.org
Distribution: chinook
Components: free non-free
Disabled: (unchecked)

5) Installed "rootsh" using Application Manager and shut down the device
6) Installed my 8 GB SDHC card to the internal slot and turned on the device. Activated my WiFi connection and opened "X Terminal" from the Utilities menu to install the filesystem tools:

# root
# apt-get install -y --force-yes e2fsprogs
# umount /media/mmc2

7) Created two (512 MB and 7 GB) partitions on my 8 GB SD card. Adjust the values for mmcblk0p1 and mmcblk0p2 to reflect the SD card you are using. One unit is equal to 32768 bytes so 16384 units/blocks is 512 MB.

# sfdisk /dev/mmcblk0
/dev/mmcblk0p1:1,16384,6
/dev/mmcblk0p2:16385,,83
/dev/mmcblk0p3:
/dev/mmcblk0p4:

(say yes to the question "Do you want to write this to disk?")

# reboot

8) Activated my WiFi connection and opened "X Terminal" from the Utilities menu. Created file systems on the card:

# root
# mkdosfs /dev/mmcblk0p1
# mke2fs /dev/mmcblk0p2
# reboot

9) Activated my WiFi connection and using the N800 web browser I downloaded:

http://fanoush.wz.cz/maemo/initfs_flasher.tgz

and saved it to the default location (/home/user/MyDocs/.documents/)

10) Closed the browser and opened "X Terminal" from the Utilities menu to unpack and install what I just downloaded

# root
# cd /home/user/MyDocs/.documents/
# tar zxf initfs_flasher.tgz
# cd initfs_flasher

Close all applications and disconnect any connections you might have.

# ./initfs_flash
Yes to "Are you sure to continue?"
No to "Create backup of current initfs"
Yes to "Remove unneeded extra (and factory testing) stuff?)
No to "install telnet server for network recovery?"
No to "install dropbear ssh server for advanced network recovery?"
Yes to "Part 2 - Ready for flashing this image?"
hit Enter to reboot

WHEN THE MENU APPEARS, BOOT FROM THE INTERNAL FLASH!

11) Activated my WiFi connection and opened "X Terminal" from the Utilities menu. and installed the kernel modules:

# root
# insmod /mnt/initfs/lib/modules/2.6.21-omap1/mbcache.ko
# insmod /mnt/initfs/lib/modules/2.6.21-omap1/ext2.ko

12) Mounted the file systems to be cloned:

# mount /dev/mmcblk0p2 /opt
# mount -t jffs2 -o ro /dev/mtdblock4 /floppy

13) cloned the files from /floppy to /opt:

# tar cf - -C /floppy . | tar xf - -C /opt

Note that the above command takes quite a while to execute (around 3 minutes for me). Observe any errors it might (but shouldn't) display. Change to "tar xvf" if you want verbose output.

14) Set up the MMC as a boot option and reboot the device:

# umount /opt
# umount /floppy
# chroot /mnt/initfs cal-tool --set-root-device ask:mmc2
# reboot

All done!

- - - - - - - - - - - - - - - - - - - - - - - -

If you used an 8 GB card, after reboot you should have over 6 GB of device memory and 512 MB on the internal memory card, to which you can extend virtual memory to.

Enjoy!

Next on my to-do list are:

- booting N800 from a 32 GB SDHC card (need to buy one first)
- booting N810 from a 8 GB MiniSDHC card (like this guy: http://tabletoid.blogspot.com/2008/01/finally-got-clean-way-to-boot-from.html)

heelio
10-30-2008, 02:17 PM
TXFi, those are some outstandingly clear instructions which worked great for me setting up a dual boot. However, I am trying to set up a triple boot. I want to clone my Diablo flash to two partitions that are just under a gig each on a 2 gig card mounted internally on an N800. Can you modify your instructions to that end, or failing that, point me in the direction of some good clear instructions (like yours) that will do this? Thanks.

nhanquy
11-07-2008, 10:55 AM
I am trying to set up a triple boot.

1. Use sfdisk to create an extra ext2 or ext3 partition on the same card (You should know the name of that partition by now; it should be mmcblkXp0Y. Most likely, X=0 Y=3)

2. Modify bootmenu.conf ( for option to boot from! you must pay attention to which modules to load before running initfs_flasher.
If an ext2 partition was used, then you only copy the item for mmcblk0p2 for the item of mmcblk0p3, bump up the number of items to one more.

I have posted my sample of bootmenu.conf in http://www.internettablettalk.com/forums/showthread.php?p=221952#post221952

Good luck!

jonathandueck
11-08-2008, 06:03 PM
Your instructions worked great for me! I've got a follow-up question: what's the wisest course when Nokia publishes a (seamless) upgrade for the OS (my goal would be to update the OS on the MMC-boot)? I'm guessing I should not just install it, if my MMC-Boot is my main boot for the Tablet.
Cheers,
Jon

nhanquy
11-10-2008, 06:29 PM
what's the wisest course when Nokia publishes a (seamless) upgrade for the OS (my goal would be to update the OS on the MMC-boot)? I'm guessing I should not just install it, if my MMC-Boot is my main boot for the Tablet.
Cheers,
Jon

if it was mmc-boot you should upgrade it on the mcc as normal and leave the flash intact if you don't wan to bother with it.

But if you want to upgrade the flash as well then upgrade it after the upgrade of the mmc. Also remember to back up your bootmenu.* files. You also need to down load initfs_flasher in advance into the mmc.

After the flash upgrading you will lose the bootmenu; just tar the newly downloaded initfs_flasher, then copy back bootmenu.* files, run initfs_flash. DONE!

drumaholic
01-21-2009, 07:16 PM
Here are the steps I took to boot my N800 from SD card to Diablo.

Note: All shell commands need to be entered as root.

1) First I removed both of my memory cards and upgraded my N800 to Diablo, http://europe.nokia.com/A4305010
2) Device booted and I went through the Start-up wizard and cancelled the Phone selecting-wizard
3) Created a working WiFi connection using Connection Manager in the Settings-menu
4) Enabled the Maemo Extras repository in Application Manager and added a new repository:

Catalog name: Maemo Chinook
Web address: http://repository.maemo.org
Distribution: chinook
Components: free non-free
Disabled: (unchecked)

5) Installed "rootsh" using Application Manager and shut down the device
6) Installed my 8 GB SDHC card to the internal slot and turned on the device. Activated my WiFi connection and opened "X Terminal" from the Utilities menu to install the filesystem tools:

# root
# apt-get install -y --force-yes e2fsprogs
# umount /media/mmc2

7) Created two (512 MB and 7 GB) partitions on my 8 GB SD card. Adjust the values for mmcblk0p1 and mmcblk0p2 to reflect the SD card you are using. One unit is equal to 32768 bytes so 16384 units/blocks is 512 MB.

# sfdisk /dev/mmcblk0
/dev/mmcblk0p1:1,16384,6
/dev/mmcblk0p2:16385,,83
/dev/mmcblk0p3:
/dev/mmcblk0p4:

(say yes to the question "Do you want to write this to disk?")

# reboot

8) Activated my WiFi connection and opened "X Terminal" from the Utilities menu. Created file systems on the card:

# root
# mkdosfs /dev/mmcblk0p1
# mke2fs /dev/mmcblk0p2
# reboot

9) Activated my WiFi connection and using the N800 web browser I downloaded:

http://fanoush.wz.cz/maemo/initfs_flasher.tgz

and saved it to the default location (/home/user/MyDocs/.documents/)

10) Closed the browser and opened "X Terminal" from the Utilities menu to unpack and install what I just downloaded

# root
# cd /home/user/MyDocs/.documents/
# tar zxf initfs_flasher.tgz
# cd initfs_flasher

Close all applications and disconnect any connections you might have.

# ./initfs_flash
Yes to "Are you sure to continue?"
No to "Create backup of current initfs"
Yes to "Remove unneeded extra (and factory testing) stuff?)
No to "install telnet server for network recovery?"
No to "install dropbear ssh server for advanced network recovery?"
Yes to "Part 2 - Ready for flashing this image?"
hit Enter to reboot

WHEN THE MENU APPEARS, BOOT FROM THE INTERNAL FLASH!

11) Activated my WiFi connection and opened "X Terminal" from the Utilities menu. and installed the kernel modules:

# root
# insmod /mnt/initfs/lib/modules/2.6.21-omap1/mbcache.ko
# insmod /mnt/initfs/lib/modules/2.6.21-omap1/ext2.ko

12) Mounted the file systems to be cloned:

# mount /dev/mmcblk0p2 /opt
# mount -t jffs2 -o ro /dev/mtdblock4 /floppy

13) cloned the files from /floppy to /opt:

# tar cf - -C /floppy . | tar xf - -C /opt

Note that the above command takes quite a while to execute (around 3 minutes for me). Observe any errors it might (but shouldn't) display. Change to "tar xvf" if you want verbose output.

14) Set up the MMC as a boot option and reboot the device:

# umount /opt
# umount /floppy
# chroot /mnt/initfs cal-tool --set-root-device ask:mmc2
# reboot

All done!

- - - - - - - - - - - - - - - - - - - - - - - -

If you used an 8 GB card, after reboot you should have over 6 GB of device memory and 512 MB on the internal memory card, to which you can extend virtual memory to.

Enjoy!

Next on my to-do list are:

- booting N800 from a 32 GB SDHC card (need to buy one first)
- booting N810 from a 8 GB MiniSDHC card (like this guy: http://tabletoid.blogspot.com/2008/01/finally-got-clean-way-to-boot-from.html)

what do i type in if i want to partion a 16gb sd card?

nhanquy
01-22-2009, 01:02 AM
what do i type in if i want to partion a 16gb sd card?

16G ~ 16000M

# umount /media/mmc2
# sfdisk -uM /dev/mmcblk0
/dev/mmcblk0p1:1,Z,6
/dev/mmcblk0p2:Y,,83
/dev/mmcblk0p3:
/dev/mmcblk0p4:

Z = 16000-X
Y = 16000-X+1
X is the space in M you want to have for linux, /dev/mmcblk0p2

drumaholic
01-27-2009, 08:27 PM
16G ~ 16000M

# umount /media/mmc2
# sfdisk -uM /dev/mmcblk0
/dev/mmcblk0p1:1,Z,6
/dev/mmcblk0p2:Y,,83
/dev/mmcblk0p3:
/dev/mmcblk0p4:

Z = 16000-X
Y = 16000-X+1
X is the space in M you want to have for linux, /dev/mmcblk0p2

I dont get it? I want it to have the same ratio as the 8gb one that was listed.

bunanson
01-28-2009, 01:20 AM
...
/dev/mmcblk0p1:1,Z,6
...

What is the difference of using 1,Z,6 compare to 0,Z,6? Is there any implication for file system instability/speed?

TIA,

bun