Reply
Thread Tools
Posts: 992 | Thanked: 995 times | Joined on Dec 2009 @ California
#1
EDIT: PR1.3 upgrade - see http://talk.maemo.org/showpost.php?p...&postcount=106


I present to your attention the set of scripts which allows you run a full Maemo 5 PR1.2 with root file system on N900 32GB eMMC (big internal flash). Well, actually - 2GB "/home" partition (/dev/mmcblk0p2) - and if you re-size it to bigger portion of 32GB flash then you will have it all for root file system. I use it for kernel development in N900 - it requires more than 1GB of flash.

Original system is leaved untouched as well as user files and MyDocs. Any N900 functions work, including phone, SMS, 3G etc. I am running it reliably around 1 week. Some sluggishness does exist during boot but in regular usage it is even faster in menus, I estimate it as roughly equal. Battery actually gives around 20-30% more standby time because there is no hard compression CPU work on UBIFS disk blocks.

This set of scripts can be useful for two groups of people -

- system developers: it allows you to test and debug your solution without worries about catastrophic failure with root file system loss. You are free to change any system script. In case of failure - just reboot to original system, re-run M32GBinit.sh script and have a fresh root file system copy on eMMC without re-flashing. That means - in a bus trip, on a beach etc. Average time for reinitialization of eMMC root file system - 4min. But kernel can't be tested in this way.

- power users, who needs a big root file system for multiple packages or just to work with big non-optified packages. Compilation also works, I compiled Linux kernel on N900 itself instead of scratchbox environment.

It is not recommended for regular user because some potential troubles between two systems (original vanilla Maemo5 on UBIFS and a copy on 32GB eMMC). This troubles may happen during removal of shared software packages located in /opt (see below).

So, instruction guide first and cautions second.

I. Usage.

Script set includes 3 scripts (all should be run as root user):

M32GBinit.sh prepares Maemo 5 on eMMC /home partition from your root FS on UBIFS. It copies all files, fixes some issues to work with telephony and fixes some system boot scripts. It can be run at any time on an original vanilla Maemo 5 in UBIFS. If previous eMMC root file system on /home exists it destroys it first.

M32GBboot.sh prepares an original root FS on UBIFS for dual boot - boot with open keyboard and N900 runs root from eMMC. Closed keyboard still boots an original from UBIFS. It changes /bootmenu.sh and /sbin/preinit on UBIFS root.

You run M32GBinit.sh to prepare eMMC root file system once. Then you can run M32GBboot.sh to activate a dual boot. If you have installed bootmenu or multiboot or similar package which allows change root then M32GNboot.sh is not needed, but you should know how to configure your dual boot package properly.

After that the boot with open keyboard tosses you to eMMC root. You can forget about UBIFS root until next major Nokia upgrade and use eMMC root file system in day-to-day operations. You can do another reboot any time.

If you want temporary return back to original vanilla UBIFS root file system you just boot with closed keyboard.

If you want a complete removal of Maemo 5 on eMMC - boot an original vanilla UBIFS and run M32GBrm.sh script - it completely removes eMMC root files and reverts back a dual boot too.

EDIT: you can backup your contacts/applications/configs/etc in Maemo 5 on eMMC and restore it later in a regular vanilla UBIFS Maemo 5. Just be sure that full list of applications doesn't overflow your 256MB UBIFS - Yes, it may be difficult after 1 week

NOTE: for good performance of eMMC root I recommend to format Class 6 uSD card with Linux swap partition and switch to it via shell commands like:

swapon /dev/mmcblk1p2 # I use partition 2 on uSD
swapoff /dev/mmcblk0p3

Actually, I recommend do it even before using of M32GBinit.sh - it dramatically accelerate file copying from UBIFS to eMMC.


2. Precautions.


A. Both roots share three objects - kernel, /opt and user files (+MyDocs). So - don't try this for kernel debugging, it doesn't help. And if you DELETE some optifyed package from one system it is not automatically deleted in second root file system. So, the shared package (package which does exist in UBIFS root before running M32GBinit.sh) should be not deleted. There is no automatic monitoring of that, of course.

User files are not a problem.


B. For optimal performance, eMMC is mounted with 'writeback' option. It means - try to minimize a hardware switch-off via long press of power button, it may corrupt your files. Usually it is not a big deal - unfinished file is not written - but sometime it may be a problem.


C. If you plan using titan's power kernel or bigger /home - please switch to Titan's power kernel or increase a size of /home partition on original vanilla UBIFS root file system before you run M32GBinit.sh. You can't do it after boot into eMMC root file system. More precisely, you can do it but you will have a trouble during boot of an original vanilla UBIFS root.


D. (EDIT) Please don't use this scripts with moveroot.sh - it uses the same file structure in /home without backup and running M32GBinit.sh could erase some locale language files. (EDIT2) So, please check before applying M32GBinit.sh first time what your /home is "virgin" and you do not have directories:

/home/bin
/home/boot
/home/cdrom
/home/dev
/home/etc
/home/floppy
/home/initrd
/home/lib
/home/proc
/home/root
/home/sbin
/home/srv
/home/sys
/home/syspart
/home/usr (usr - not user! /home/user is OK)
/home/var
/home/mnt
/home/tmp
/home/media
/home/home

Scripts M32GBinit.sh and M32GBrm.sh remove this directories. Take care that you haven't something valuable in it.

And remember that M32GBinit.sh creates that directories, so check can be done only before first time.
Attached Files
File Type: tar M32GBPR12.tar (10.0 KB, 778 views)

Last edited by egoshin; 2010-10-27 at 07:20. Reason: Changed /home/src to /home/srv
 

The Following 58 Users Say Thank You to egoshin For This Useful Post:
Posts: 156 | Thanked: 90 times | Joined on Jan 2010
#2
20% more standby time? Bigger root size? Roughly same speeds? Less CPU intensive? Seriously? Nokia's rootfs decision @ N900 = FAIL

I think that 256MB OneNAND chip should've been used for swap and 32GB eMMC for system + home + files. Oh, we can still do (fix) that

And of course ext3 should've been everywhere, but let's not get into that...
 

The Following 2 Users Say Thank You to rooted For This Useful Post:
Bundyo's Avatar
Posts: 4,708 | Thanked: 4,649 times | Joined on Oct 2007 @ Bulgaria
#3
Or you can use a faster microsd card and increase performance even more.
__________________
Technically, there are three determinate states the cat could be in: Alive, Dead, and Bloody Furious.
 
Posts: 992 | Thanked: 995 times | Joined on Dec 2009 @ California
#4
Originally Posted by Bundyo View Post
Or you can use a faster microsd card and increase performance even more.
I didn't test it yet.

You can see my performance measurements here - http://talk.maemo.org/showpost.php?p...0&postcount=91
 
Posts: 992 | Thanked: 995 times | Joined on Dec 2009 @ California
#5
Originally Posted by rooted View Post
And of course ext3 should've been everywhere, but let's not get into that...
Interesting idea. Yes, it is possible to use JFFS2 in /home but I didn't test it - somebody said that BTRFS is much better and it seems true. But BTRFS is available in 2.6.31 only and that should be ported yet. The same is for NILFS (2.6.30)
 
Posts: 28 | Thanked: 3 times | Joined on Jun 2010
#6
i tested the script and i works nice, now i have 1.1gb free on /

am not sure if i did all steps in the correct way cause i got a problem with the descriptions. also i used moveroot.sh script bevore trying this mod:
screenshot attached for showing my problem:

does anyone know how to fix this problem?

regards
 
Posts: 263 | Thanked: 108 times | Joined on May 2008
#7
can you elaborate this for "normal users"?
 
Posts: 42 | Thanked: 9 times | Joined on Feb 2010
#8
Wahoo! I love it when a plan comes together...
 

The Following User Says Thank You to CPRman For This Useful Post:
Posts: 992 | Thanked: 995 times | Joined on Dec 2009 @ California
#9
Originally Posted by zement View Post
i tested the script and i works nice, now i have 1.1gb free on /

am not sure if i did all steps in the correct way cause i got a problem with the descriptions. also i used moveroot.sh script bevore trying this mod:
screenshot attached for showing my problem:

does anyone know how to fix this problem?

regards
What is moveroot.sh script?
 
Posts: 1,067 | Thanked: 313 times | Joined on Sep 2009 @ USA
#10
this is great.
 
Reply


 
Forum Jump


All times are GMT. The time now is 14:10.