Notices


Reply
Thread Tools
Posts: 3,401 | Thanked: 1,255 times | Joined on Nov 2005 @ London, UK
#1
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
2. "Becomeroot" package must be installed or device in R&D mode
  • Install the Becomeroot package by adding the following repository to application manager:
    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):
    Web Address: http://repository.maemo.org/
    Distribution: bora or gregale (N800 or 770 respectively)
    Components: free non-free
    Code:
    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
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 xterm
    Code:
    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

Edit: See post #288 which details additional parameters for the nupgrade.sh script.

Last edited by Milhouse; 2008-01-30 at 16:30.
 

The Following 35 Users Say Thank You to Milhouse For This Useful Post:
Posts: 244 | Thanked: 10 times | Joined on Jan 2007
#2
Why make it that hard.. why not just tar over and back the install?
 

The Following 2 Users Say Thank You to schmots For This Useful Post:
Posts: 3,401 | Thanked: 1,255 times | Joined on Nov 2005 @ London, UK
#3
Because some people struggle to do even that...? And because it does more than just tar the OS - it formats the filesystem, insmods the various modules, mounts the mount points and tar's rootfs. And it also upgrades to Sardine if you want it to.

Once all the pre-reqs are in place (which only need to be completed once per flash) and the script and tar have been downloaded (again once per flash), the user only needs to running the script in sequence (0-4 or 0-6) whenever they want to clone the OS. No need to remember each individual command/step or cut&paste from the wiki. Seems simpler to me...
 
Posts: 244 | Thanked: 10 times | Joined on Jan 2007
#4
The commands only need to be run once per flash too.. and I put up easier instructions than the wiki once upon a time. I like your method, it will help the mindless dual boot. I guess I just like to know whats going on under the hood as I figured anyone who would bother with a dual boot wou.d
 
fpp's Avatar
Posts: 2,853 | Thanked: 968 times | Joined on Nov 2005
#5
Well I for, one, don't -- much. I just want the added space and speed, and follow Howtos :-)
Thanks Fanoush, and thanks Mil...
 
Posts: 3,401 | Thanked: 1,255 times | Joined on Nov 2005 @ London, UK
#6
Originally Posted by schmots View Post
The commands only need to be run once per flash too..
Not if you stuff up your external memory card or otherwise corrupt the ext2 filesystem, which can happen several times between flashes Should your memory card or filesystem become corrupt (I find ext2 to be quite easy to corrupt) all that needs to be done to recreate the cloned OS is run the script with params 0 through 4 having booted from internal flash... only takes about 15 minutes and most of that time is taken by tar.

Originally Posted by schmots View Post
and I put up easier instructions than the wiki once upon a time.
Unfortunately there seem to be several wikis covering this functionality, several of which are hopelessly out of date and have been badly mangled by the conversion to Midgard on maemo.org. I probably haven't seen your updated instructions but feel free to provide a link if they're still accurate/readable.

Originally Posted by schmots View Post
I like your method, it will help the mindless dual boot.
I'd hesitate to say mindless, but it should help those who don't really care too much about how it all hangs together!

Originally Posted by schmots View Post
I guess I just like to know whats going on under the hood as I figured anyone who would bother with a dual boot wou.d
As I wrote the script I guess that lets me off the hook, I've got a rough idea what the script is doing!

The only reason I dual boot nowadays is to give Sardine a whirl every now and again - with this script I can clone and upgrade the OS to Sardine inside 30 minutes and I'm only typing 6 or 7 commands which aren't exactly difficult to remember (particularly as six of them are practically the same!)

The OS clone takes about 10-15 minutes, and the upgrade to Sardine another 15-20 minutes. Most of the time is spent waiting for files to copy or download/upgrade... run the next step... wait... run the next step... etc. until finished. Then reboot and enjoy (well as much as one can enjoy Sardine - the new finger menu is looking good though).

Hopefully these instructions will make life simpler for some people and may even allow yet more people to sample Sardine. It's an alternative to the various wiki instructions (although it skimps in some important areas such as partitioning etc.) but should be easier to follow if you don't want to have to think too much!

Last edited by Milhouse; 2007-08-08 at 19:57.
 
Posts: 122 | Thanked: 4 times | Joined on Apr 2007 @ here and there
#7
Originally Posted by fpp View Post
Well I for, one, don't -- much. I just want the added space and speed, and follow Howtos :-)
Thanks Fanoush, and thanks Mil...
I hear that... I learn as much as I can but I really dont have time anymore.


Originally Posted by schmots View Post
I like your method, it will help the mindless dual boot. I guess I just like to know whats going on under the hood as I figured anyone who would bother with a dual boot wou.d
People use their minds AND n800/770 for different things.
 
smileyninja's Avatar
Posts: 24 | Thanked: 0 times | Joined on Jul 2007 @ Lakeland, FL
#8
Is this a typo?

5. At least a 256MB partition is needed on /dev/mmcblk0p2 (partition 2, external SD/MMC card
I was under the impression that mmcblk0p(x) was the internal card (aka mmc2) and mmcblk1p(x) was the external card- mmc1. The script nupgrade.sh looks like it is working on mmcblk0 (internal card) but is calling it the external card.

The card slot on the bottom of the N800 under the stand is considered the external card and the card beside the battery on the back of the unit is the internal card--right?

Last edited by smileyninja; 2007-08-11 at 17:23.
 
Posts: 3,401 | Thanked: 1,255 times | Joined on Nov 2005 @ London, UK
#9
Yes, that is a typo - mmcblk0px is the INTERNAL card, thanks for catching that.

I've now corrected the instructions (replacing external for internal) and uploaded an updated script - the original script worked fine, but would have displayed confusing comments...
 
Posts: 4 | Thanked: 1 time | Joined on Aug 2007
#10
Noob reporting:

I've encountered problems at step 7 of this guide. Here's what I'm getting (verbatim):

sudo gainroot
/home/user # cd /home/user/bin
/home/user/bin # ./nupgrade 0
/bin/sh: ./nupgrade: not found
/home/user/bin #

Should I be typing in "./nupgrade.sh 0"?

I'm running IT2006 on n770, and I should add that I've checked in the /home/user/bin directory and both nupgrade.sh and tar are present.

Last edited by Sarty; 2007-08-23 at 17:00.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 02:51.