maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Upgrading (https://talk.maemo.org/forumdisplay.php?f=8)
-   -   N800 + OS2008 + MMC boot (this worked for me) (https://talk.maemo.org/showthread.php?t=15788)

TXFI 2008-01-27 23:17

N800 + OS2008 + MMC boot (this worked for me)
 
EDIT 2008-09-30: these are somewhat outdated by now, please check e.g. post #73 on this thread instead: http://www.internettablettalk.com/fo...8&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 2008-01-28 00:13

Re: N800 + OS2008 + MMC boot (this worked for me)
 
The wiki had something about using gnu tar rather than the built in one. Is this no longer necessary?

TXFI 2008-01-29 05:40

Re: N800 + OS2008 + MMC boot (this worked for me)
 
not sure, I only tried the "regular" tar that was there already and it worked for me.

mooler 2008-01-29 05:54

Re: N800 + OS2008 + MMC boot (this worked for me)
 
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 2008-01-29 09:03

Re: N800 + OS2008 + MMC boot (this worked for me)
 
Quote:

Originally Posted by coffeedrinker (Post 134565)
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 2008-01-29 11:41

Re: N800 + OS2008 + MMC boot (this worked for me)
 
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 2008-01-29 13:20

Re: N800 + OS2008 + MMC boot (this worked for me)
 
Quote:

Originally Posted by TXFI (Post 135164)
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 2008-01-29 23:01

Re: N800 + OS2008 + MMC boot (this worked for me)
 
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 2008-02-07 23:40

Re: N800 + OS2008 + MMC boot (this worked for me)
 
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 2008-02-08 16:18

Re: N800 + OS2008 + MMC boot (this worked for me)
 
Quote:

Originally Posted by hjeng (Post 139590)
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/fo...ead.php?t=8631

martinjk 2008-02-08 21:11

Re: N800 + OS2008 + MMC boot (this worked for me)
 
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 2008-02-09 02:47

Re: N800 + OS2008 + MMC boot (this worked for me)
 
what is the advantage of booting off the mmc?

TXFI 2008-02-09 05:22

Re: N800 + OS2008 + MMC boot (this worked for me)
 
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/fo...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 2008-02-09 15:30

Re: N800 + OS2008 + MMC boot (this worked for me)
 
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 2008-02-09 16:46

Re: N800 + OS2008 + MMC boot (this worked for me)
 
Quote:

Originally Posted by martinjk (Post 140258)
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/fo...MC+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/fo...hlight=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 2008-02-09 19:08

Re: N800 + OS2008 + MMC boot (this worked for me)
 
Quote:

Originally Posted by bunanson (Post 140281)
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 2008-02-09 19:13

Re: N800 + OS2008 + MMC boot (this worked for me)
 
Quote:

Originally Posted by bunanson (Post 140281)
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 2008-02-10 21:27

Re: N800 + OS2008 + MMC boot (this worked for me)
 
Quote:

Originally Posted by dont (Post 140319)
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 2008-02-21 15:12

Re: N800 + OS2008 + MMC boot (this worked for me)
 
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 2008-02-21 15:53

Re: N800 + OS2008 + MMC boot (this worked for me)
 
Quote:

Originally Posted by JFX (Post 145751)
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 2008-02-21 16:05

Re: N800 + OS2008 + MMC boot (this worked for me)
 
Thanks so much for the help, any quick way of deleting the swap file? Is it titled .swap? I'll look with elfm2

fanoush 2008-02-21 16:08

Re: N800 + OS2008 + MMC boot (this worked for me)
 
Quote:

Originally Posted by dont (Post 140320)
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. 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 2008-02-21 16:17

Re: N800 + OS2008 + MMC boot (this worked for me)
 
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 2008-02-21 16:21

Re: N800 + OS2008 + MMC boot (this worked for me)
 
Quote:

Originally Posted by JFX (Post 145751)
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 2008-02-21 16:24

Re: N800 + OS2008 + MMC boot (this worked for me)
 
Oh how interesting, so I would need to pop the card into the external slot then, yes? Thanks for your help

JFX 2008-02-21 16:36

Re: N800 + OS2008 + MMC boot (this worked for me)
 
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 2008-02-21 17:11

Re: N800 + OS2008 + MMC boot (this worked for me)
 
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 2008-02-21 22:04

Re: N800 + OS2008 + MMC boot (this worked for me)
 
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 2008-03-02 13:09

Re: N800 + OS2008 + MMC boot (this worked for me)
 
> 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 2008-03-02 19:57

Re: N800 + OS2008 + MMC boot (this worked for me)
 
Yea, when charging my icon goes away until I unplug. Also it doesn't display the charging action when it IS visible.

thepenguinonthetelly 2008-03-04 21:43

Re: N800 + OS2008 + MMC boot (this worked for me)
 
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 2008-03-04 22:06

Re: N800 + OS2008 + MMC boot (this worked for me)
 
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 2008-03-04 22:37

Re: N800 + OS2008 + MMC boot (this worked for me)
 
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 2008-03-04 22:45

Re: N800 + OS2008 + MMC boot (this worked for me)
 
Quote:

Originally Posted by thepenguinonthetelly (Post 150938)
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/fo...885#post148885, thread #7

bun

thepenguinonthetelly 2008-03-04 22:48

Re: N800 + OS2008 + MMC boot (this worked for me)
 
Thanks! Much appreciated. :D

zen123 2008-04-01 23:58

Re: N800 + OS2008 + MMC boot (this worked for me)
 
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 2008-04-02 00:16

Re: N800 + OS2008 + MMC boot (this worked for me)
 
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 2008-04-02 08:05

Re: N800 + OS2008 + MMC boot (this worked for me)
 
Quote:

Originally Posted by cdmackay (Post 163656)
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 2008-04-02 09:01

Re: N800 + OS2008 + MMC boot (this worked for me)
 
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 2008-04-02 09:46

Re: N800 + OS2008 + MMC boot (this worked for me)
 
that's a shame, since the Nokia is a much better device, and the support in these forums is very useful.


All times are GMT. The time now is 11:40.

vBulletin® Version 3.8.8