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


All times are GMT. The time now is 12:50.

vBulletin® Version 3.8.8