-
2008-02-29
Clone OS2008 - [Maemo]
参见http://www.internettablettalk.com/forums/showthread.php?t=8631&highlight=simplified+clone
These instructions apply to OS 2006 (770), OS 2007HE (770) and OS 2007/OS 2008 (N8x0).
If you're all set with root access, xterm, wget, boot menu and e2fsprogs installed *and* a 256MB+ second partition on Internal memory card, jump straight to step 7... otherwise continue with the pre-reqs.
Pre-requisites to be satisfied before cloning OS
1. xterm must be installed- Install xterm via the one-click install file on this page: http://maemo.org/downloads/product/osso-xterm-advanced
2. "Becomeroot" package must be installed or device in R&D mode- Install the Becomeroot package by adding the following repository to application manager:Quote:
Web Address: http://eko.one.pl/maemo
Distribution: bora or mistral (N800 or 770 respectively)
Components: user - Alternatively see the maemo.org wiki for details on how to enable R&D mode.
3. wget installed for downloading web-based files from the command line- N800 users: Open xterm and execute the following commands in xterm (you must have satisfied pre-requisite #2 before continuing):Code:
sudo gainroot apt-get install wget exit
- 770 users: Download and install wget from http://maemo.org/downloads/product/wget using the one-click install option
4. e2fsprogs package installed- Open xterm and execute the following commands in xterm (you must have satisfied pre-requisite #2 before continuing, and have the following repository installed in the Application Manager):Quote:
Web Address: http://repository.maemo.org/
Distribution: bora or gregale (N800 or 770 respectively)
Components: free non-freeCode:sudo gainroot apt-get update apt-get install e2fsprogs exit
5. At least a 256MB partition is needed on /dev/mmcblk0p2 (partition 2, Internal SD/MMC card)- See various Wiki entries for details. Alternatively see post #49 in this thread which details the partitioning of various sized memory cards, ultimately creatiing a 0.5GB second partition in each case - formatting of the second partition will take place later on during the cloning process. Use the built-in Internet Tablet File Manager, a Windows PC or mkdosfs on the tablet/Linux PC to format the FAT partition).
6. Fanoush's modified initfs and boot menu should be installed- See http://fanoush.wz.cz/maemo/#initfs for details explaining how to install the modified initfs and boot menu.
Once all of the above pre-requisites are satisfied continue at step 7.
Cloning the Operating System to Internal SD/MMC Card
7. Download and execute the following script and binary- The following commands will download the cloning script and the GNU tar binary to assist with the cloning process
7.1 As user "user"
- Execute the following in xtermCode:
mkdir ~/bin cd ~/bin wget http://www.nmacleod.com/nokia/bin/nupgrade.sh wget http://www.nmacleod.com/nokia/bin/tar chmod +x nupgrade.sh tar
7.2 As user "root" (without Sardine upgrade)- Switch to the root superuser and begin the process of cloning the filesystem to partition two on the Internal memory card. This is achieved in stages to allow you to control progress and check for errors. Pass parameters to the nupgrade.sh script to control progress, as follows
- 0 - Create ext2 filesystem on partition 2 of the Internal memory card
- 1 - Mount partition 2 as /opt
- 2 - Mount rootfs as /floppy
- 3 - Perform cloning process
- 4 - Commit filesystem updates and unmount /floppy and /opt
Code:sudo gainroot cd /home/user/bin ./nupgrade.sh 0 ./nupgrade.sh 1 ./nupgrade.sh 2 ./nupgrade.sh 3 ./nupgrade.sh 4 reboot
7.3 As user "user" (with Sardine upgrade)- Additional phases 5 and 6 below are optional and may be performed in order to upgrade a cloned OS 2008 (not OS 2006-7 or OS 2007HE) to the Sardine bleeding edge test distribution
- 5 - Enter chroot gaol prior to upgrading cloned OS on memory card
- 6 - Initiate Sardine operating system upgrade of cloned OS on memory card
If performing a Sardine upgrade, use the following procedure:Code:sudo gainroot cd /home/user/bin ./nupgrade.sh 0 ./nupgrade.sh 1 ./nupgrade.sh 2 ./nupgrade.sh 3 ./nupgrade.sh 4 ./nupgrade.sh 5 cd /home/user/bin ./nupgrade.sh 6 exit reboot
- When the device reboots, choose option #3 "MMC card, partition 2, ext2" to boot from the freshly cloned OS
troubleshooting http://www.internettablettalk.com/forums/showthread.php?t=17311
Help! Cloned OS (2GB internal) only boots with external miniSD out
hey all. i just went through all of the steps to clone the N810 OS into the internal mmc (2GB). i was going crazy for hours trying to get it to work, re-doing all the steps, etc., but then finally, i just took out the miniSD i had in the device, and then poof, it works! (selecting MMC card, partition 2, ext2). while i'm excited that it's finally working, i would ideally like to eventually use the miniSD without having to take it out whenever i boot. am i missing something? how do i boot correctly without having to take out the card?
i have no linux experience, so this is all confusing to me. any enlightenment/solution would be greatly appreciated!
i used this thread to clone: http://www.internettablettalk.com/fo...mplified+clone
and got the idea to take out the miniSD from: http://www.internettablettalk.com/fo...t=n810+cloningRe: Help! Cloned OS (2GB internal) only boots with external miniSD out
You need to make a bootmenu.conf file and add it to your initfs_flasher directory and then rerun the flasher.
Here's what my bootmenu.conf looks like:to make this file you need to use a simple text editor and don't allow it to attach anything file extensions to the end of the file name. In other words, make sure the file name is just bootmenu.conf.Code:# bootmenu customisation file # # included from bootmenu.sh after default menu is defined # you can change some items or redefine menu completely # timeout for automatic selection when no key is pressed # set to -1 for no timeout (not recommended, can drain battery when device reboots unatteded) MENU_TIMEOUT=3 # IP address for USB networking USB_IP=192.168.1.2 # dim screen when in menu #/usr/sbin/dsmetest -l 1 # menu items MENU_MIN=1 # first item index #no need to redefine #MENU_1_NAME="Internal flash" #MENU_1_ID="flash" MENU_2_NAME="Internal MMC, partition 2, ext2" MENU_2_ID="mmc2" MENU_2_DEVICE="mmcblk1p2" MENU_2_MODULES="mbcache ext2" MENU_2_FSTYPE="ext2" MENU_2_FSOPTIONS="noatime" MENU_3_NAME="External MMC card, partition 2, ext3" MENU_3_ID="mmc12" MENU_3_DEVICE="mmcblk0p2" MENU_3_MODULES="mbcache jbd ext3" MENU_3_FSTYPE="ext3" MENU_3_FSOPTIONS="noatime" #",data=writeback" MENU_4_NAME="Power off (when not on charger)" MENU_4_ID="off" #last item index, change if you add/remove items MENU_MAX=4
Fanoush included some other examples of bootmenu.conf files in the zip that you used for the initfs_flasher if you want to see other options and possiblities.This is bug/feature of kernel
http://bugs.maemo.org/show_bug.cgi?id=2747
Try solution here
http://www.internettablettalk.com/fo...657#post124657
or combine it with this
http://www.internettablettalk.com/fo...155#post145155
or simply make two identical items as you currently have, one with mmcblk0 and one with mmcblk1 and boot the second one with card inserted.
Hopefully I will update the flasher this weekend with final fix. The version posted by me works for OS2008 based N810 and N800 but it fails for N800 with OS2007. Unfortunately the file /sys/block/mmcblkX/device/../slot_name does not exist so it is harder to figure out which slot belongs to which mmcbklX device.







