Please check my noob guide for booting from MMC for correctness
I wrote a complete noobie guide for booting the Nokia 770 from MMC since I never found one while doing my own research. Please check it for correctness.
----------------- REV.2: 1. Removed reboot commands for formatting in step 8 per fanoush's suggestion. 2. Revised explanation of EXT3. 3. Linked WLAN hotfix to thread on the topic. ----------------- This guide will take you step-by-step through hacking your Nokia 770 to make it better and faster. I had a hard time finding all the information I needed to hack my 770 in one place. Instructions I found were also meant more for seasoned developers and Linux-savvy people. So I decided to write my own guide, for the complete noob! The Plan: 1. Patch the operating system to fix a bug that can corrupt data and cause crashes. 2. Partition the RS-MMC into a Linux partition for the OS and a Windows compatible partition to access the card via USB. 3. Clone the operating system from the internal flash memory to the RS-MMC memory card. This will increase the space available to install program and slightly increase the speed as well. At the same time, the original operating system on the internal memory will be kept intact for backup or recovery mode if the memory card dies. fanoush says: cloning without using kernel with faster mmc wil not give massive speedups, it will take off some load from CPU due to no jffs2 compression and may make your device more responsive under load but the average read/write speed is about the same (slow mmc vs compressed jffs2). So yes it may speed it up a bit but not significantly so... 4. Install a boot screen to allow you to choose which operating system (OS) to load - the original OS backup on the internal memory, or the OS on the RS-MMC memory card. // to be added later... 5. Install hack that will increase read/write speed on the memory card which will increase the speed of your 770. Warning: 1. This guide is a work-in-progress. It has not been thoroughly checked yet. 2. Make sure the 770 is hooked up to AC power, or the battery is full. You don't want it to die in the middle of something critical. 3. This guide has only been tested with OS 3.2006.49-2 and a Kingston 2GB MMCMobile RS-MMC (the fastest you can buy). Procedure: 1. Get bug hotfix: Download the WLAN hotfix to your computer and transfer it to a RS-MMC memory card (either the original 64MB card or your new one will do). You don't want to do this on the 770 because using the WiFi may corrupt the OS or the hotfix - the very same thing you are trying to fix. If you don't have a MMC card reader for your computer, you can take a chance by using the 770. If you flash the OS, then there's only the remote chance the hotfix on the memory card is corrupted, and not the OS as well. 2. Flash your 770: Install OS2006 3.2006.49-2 by running the Nokia update wizard and following the onscreen instructions (hold down 'Home' key while powering on the device). Even if you have the newest OS, it's a good idea to reflash in case you have corrupted data. It is important not to use WiFi before the hotfix is applied! 3. Install bug hotfix: Pop in the RS-MMC with the hotfix. Install the hotfix by going to Tools->Application manager->Package->Install from file... Select the hotfix on the memory card and install. 4. Become root: Connect to the internet. Install Xterm and Becomeroot using the following two repositories: Web address: http://eko.one.pl/maemo/ Distribution: mistral Components: user Web address: http://repository.maemo.org/ Distribution: mistral Components: free non-free Then go into Xterm and type using your stylus: Quote:
Quote:
Now, we want to install the SSH protocol to communicate wirelessly with the 770 using your computer. This will allow us to issue commands using the keyboard instead of the stylus (very tedious). You have to make sure your wireless connection is reliable though. If not, you have to resort to using Xterm with a stylus, or use a Bluetooth keyboard (which will require a bluetooth hack). To install the SSH protocol, type in xterm: Quote:
To emulate XTerm on Windows after SSH is installed, you'll need to use Putty. Open the program and input your Nokia 770's IP address. You can find the IP address by going to Connection manager menu->Internet connection->IP Address. You can also find out by going into your router config. While you are there, it's not a bad idea to assign a static IP to your 770 MAC address so that the router's DHCP always assigns the same IP to the 770. 7. Partition RS-MMC: We will now partition the memory card into two partitions. One is for the Linux operating system, and the other will be for transfering files to the card via USB. Launch putty and log in as root. Now type: Quote:
Quote:
The second partition (for Linux OS) is assigned cylinders 15001 to whatever the memory card has left. So on a 2GB memory card, it's approximately 1520MB. Now will be a good time to talk about the memory allocation - how do you choose how much to use for the OS, and how much is for the USB? The answer is it depends on what you want to do. If you foresee yourself installing a lot of programs, then a larger Linux partition may make sense. If you want the convenience of transfering large size files through USB, then you may want to increase the FAT16 partition. But beware, FAT16 isn't very efficient at storing small files (around 32KB or the chunk size). To overcome this problem, you can format using FAT32 which is also compatible, but I'll leave you to tackle that problem by yourself. 8. Format partitions: The next step is to format the partitions. Type the following to format the 1st partition to FAT16: Quote:
Quote:
fanoush says: Yes it it slightly slower and yes it wears the card slightly more but still it may make sense, depends on you, if you use ext2 don't forget to boot from flash and fsck it when device crashes (fsck -fy /dev/mmcblk0p2). --Fsck is a file system checking utility. 9. Install boot menu: Mount the Linux partition: Quote:
Quote:
10. Clone OS: We are now ready to copy the OS to the memory card. First, we need to mount the partitions. Type the following: Quote:
Quote:
Quote:
Unmount the partitions and set the default OS to the one on the RS-MMC: Quote:
|
Re: Please check my guide for booting from MMC for correctness
Just few random comments
- wlan fix - maybe it is better to link the bug in bugzilla or the thread here in case my site goes down - cloning without using kernel with faster mmc wil not give massive speedups, it will take off some load from CPU due to no jffs2 compression and may make your device more responsive under load but the average read/write speed is about the same (slow mmc vs compressed jffs2). So yes it may speed it up a bit but not significantly so I wouldn't put it on first place when mentioning advantages. Having backup and more room is bigger reason. You can still have it worded like above but someone may complain (after long and frustrating cloning process) that there is no speedup. -partitioning - sfdisk has -uM argument which takes all units in megabytes, this may be more intuitive when selecting partition size - rebooting - I think it is not needed to reboot after formatting partition, you can regroup it to make only one reboot after optionally flashing kernel and installing boot menu -ext3 vs ext2 - ext3 will write only metadata twice, not data, metadata is filesystem timekeeping information (file name, attributes, location of blocks belonging to files), yes it it slightly slower and yes it wears the card slightly more but still it may make sense, depends on you, if you use ext2 don't forget to reboot to flash and fsck it when device crashes I'm not sure where you will publish this guide but it may be better to improve existing guides, the last 'rewrite targeted for newbies' is here http://maemo.org/community/wiki/howt...from_mmc_card/ |
Re: Please check my guide for booting from MMC for correctness
Thanks for the comments. I will correct them the first chance I get.
As to where to publish the guide, I was thinking of making it a sticky here since the forum is flooded with people asking the same questions. |
Re: Please check my guide for booting from MMC for correctness
Quote:
|
Re: Please check my guide for booting from MMC for correctness
Updated guide according to fanoush's comments.
I did not modify the sfdisk command to use -uM as I am unsure how to properly give each partition start and end values. |
Re: Please check my guide for booting from MMC for correctness
Could you flesh out how to reflash the device, and how to install fanoush's kernel?
|
Re: Please check my guide for booting from MMC for correctness
Hmm.. so if you don't have wi-fi at home, you either:
1) have to type all on the onscreen keyboard, which someone wrote was very long, or 2) could use a blue tooth keyboard? I was juts wondering, can you reflash without a BT keyboard or wifi? or is it pretty hard. Also, apt get needs wifi connection? so I have to modify the instructions if I don't use wifi? I am a complete linux newbie (except I know dos - so understand basic xterm commands), and I need to reflash my 770. I wonder if I can do this without having wifi at home. [Edit: I realize I need to spend more time reading all the posts about reflashing, so you don't have to explain any basic stuff I can find on my own. Very short answer is OK] |
Re: Please check my guide for booting from MMC for correctness
nosam:
Reflashing the device is relatively simple. You need to install Nokia Internet Tablet Software Update Wizard and follow the prompts. The device connects to your computer with internet via USB so no wifi required. If you don't have wifi, then you will have to manually download everything needed in the guide on your desktop computer, then transfer the files to your Nokia via the USB cable. You don't need a BT keyboard to follow the above guide. The first time I hacked my Nokia, I used my stylus. Took about 3 times longer but it still worked. |
Re: Please check my guide for booting from MMC for correctness
Quote:
|
Re: Please check my guide for booting from MMC for correctness
Quote:
|
Re: Please check my guide for booting from MMC for correctness
There is also newer version of that - kernel based on MMC taken from N800 2.6.18 kernel which also has SDHC functionality but may (or may not) also work slightly better with MMC cards. http://fanoush.wz.cz/maemo/#sdhc This is newer code with many fixes but not so well tested as the older mmcplus kernel. There are only versions with multiblock writing enabled because this is enabled by default in 2.6.18 kernel.
|
Re: Please check my guide for booting from MMC for correctness
It seemed complicated, but was simple, actually. I now boot from both the mmc and internal memory, but as mentioned there doesn't seem to be any significant speed up. Still waiting for noob instructions for enabling multiblock read/write.
:D Patti :eek: PS: I forgot to mention that if the user only uses Linux on their laptops/desktops, then we can dispense with the fat16 partition, can't we? And what're the advantages to using fsck as opposed to e2fsck, the latter of which I use on my SuSE systems... PPS: In reference to the mmc wear associated with ext2/ext3 - I think mmc is so cheap that one could "clone" their mmc card to a backup mmc card periodically (with an mmc card reader and g4l) and use ext3 to avoid frustrating (unrecognized) file corruptions. With this in mind, could you indicate the command to format ext3? PPPS: I also noticed that there doesn't seem to be a .bash-history file between boots - so I have to memorize the fsck disk check command and run it a LOT. :( I would be running fsck at least once a day... |
Re: Please check my guide for booting from MMC for correctness
Quote:
Which MMC card are you using? To format to EXT3, it's the same mke2fs command, but with -j switch (since EXT3 is just EXT2 with journalling). |
Re: Please check my guide for booting from MMC for correctness
Or mkfs.ext3 :)
|
Re: Please check my guide for booting from MMC for correctness
If the WLAN memory bug-fix was installed on flash and then copied to the mmc with everything else does it not need to be installed again onto the mmc?
thx. |
Re: Please check my guide for booting from MMC for correctness
Quote:
|
Re: Please check my guide for booting from MMC for correctness
Brian:
I have just followed your recipe and it worked out fine for me. I decided to go for an ext3 rather than an ext2 file system so I was a little worried about the following line (used 2x): insmod /mnt/initfs/lib/modules/current/ext2.ko I tried substituting ext3.ko with no luck so I went ahead and used the line as above. Everything seems to be working fine so far, but I wonder if I should have found an ext3.ko? Finally, I have a Kingston 2GB. MMC card so I would like to try Fanoush's MMCPlus + Multiblock Writes experimental kernel. I think that you have been using this kernel on the same hardware. If so, any thoughts? |
Re: Please check my guide for booting from MMC for correctness
To use ext3 you need to use these:
insmod /mnt/initfs/lib/modules/2.6.21-omap1/mbcache.ko insmod /mnt/initfs/lib/modules/2.6.21-omap1/jbd.ko insmod /mnt/initfs/lib/modules/2.6.21-omap1/ext3.ko YOU MUST ALSO change them in the boot menu. |
Re: Please check my guide for booting from MMC for correctness
Quote:
Should I start over again completely? Do I have to re-partition or re-format? |
Re: Please check my guide for booting from MMC for correctness
LOL I have no idea! I'm not that savvy about the filesystems. All I know is, the filesystems are the same except for the journal that ext3 uses, which you are not using. That's why it all works for you. There are some commands to enable the journal but I don't know them off hand.
|
Re: Please check my guide for booting from MMC for correctness
Ok, I will start over. Thanks.
|
Re: Please check my guide for booting from MMC for correctness
I followed these directions http://maemo.org/community/wiki/howt..._from_mmc_card and now I am having trouble installing or uninstalling applications. If I boot to flash it seems to work but not when I boot to mmc. I tried sudo gainroot before opening app manager but that didn't help. Here is my app manager log.
osso-application-installer 4.46, UI version 2 apt-worker: Forcing /var/lib/dpkg/lock ----- Uninstalling canola2 2.0.0~beta1-maemo.1 apt-worker: Not handling unrelated package idea. (Reading database ... dpkg: error processing canola2 (--remove): files list file for package `idea' contains empty filename Errors were encountered while processing: canola2 Processing was halted because there were too many errors. E: Sub-process /usr/bin/dpkg returned an error code (1) What did I do wrong, did I miss a step? |
Re: Please check my guide for booting from MMC for correctness
I just got a refurbished? N770 back from Nokia due to WSOD (warrantee).
I had a working MMC install from the dead machine...I popped the card into the new one...ran the steps again, but skipped the partition-format-copy steps. Worked perfectly! |
Re: Please check my guide for booting from MMC for correctness
Quote:
Maybe you should ask about your problems in the http://maemo.org/community/wiki/howt..._from_mmc_card thread or try the instructions in this thread instead. |
Re: Please check my guide for booting from MMC for correctness
I compared the two sets of instructions and the commands you enter are pretty much identical. But that's ok. I'll take my problem somewhere else.
|
Re: Please check my guide for booting from MMC for correctness
I booted to flash removed a damaged package (idea) and repeated the process. It works great now. I received some great help from the author of the instructions I mentioned in previous posts. Your instructions work great and they are virtually identical.
|
Re: Please check my guide for booting from MMC for correctness
Quote:
:D It's incredible what people is able to do for... what??? I don't know... :confused: |
| All times are GMT. The time now is 06:12. |
vBulletin® Version 3.8.8