View Single Post
Posts: 3,401 | Thanked: 1,255 times | Joined on Nov 2005 @ London, UK
#288
Originally Posted by ghoonk View Post
sudo gainroot
umount /media/mmc2
mke2fs /dev/mmcblk0p2
reboot

sudo gainroot
umount /media/mmc2
cd bin
./nupgrade.sh 0
yes
./nupgrade.sh 1
yes
./nupgrade.sh 2
yes
./nupgrade.sh 3
yes
./nupgrade.sh 4
yes
reboot
Now seems a good time to document some new options I've added to the nupgrade.sh script.

The full usage is:

Code:
nupgrade.sh 0-6|wipe|clone [internal | external] [ext2 | ext3] [sardine | herring] [yes]
where:
  • 0-6: Individual steps as described at the beginning of this thread
  • wipe: shorthand for all steps 0-4 - use only if you know you have a properly setup device. Will format the target partiion (see below)
  • clone: shorthand for all steps 1-4 - use only if you know you have a properly setup device. Will NOT format the target partiion (see below)

  • internal: Manually select the internal memory card as the target (default is to select automatically - see below)
  • external: Manually select the external memory card as the target (default is to select automatically - see below)

  • ext2: Will format the target partition using ext2 filesystem (this is the default)
  • ext3: Will format the target partition using ext3 filesystem

  • sardine: Only relevant for steps 5 and 6. Sardine is the default. Upgrade your OS to the bleeding edge development version. Rarely works.
  • herring: Only relevant for steps 5 and 6. Upgrade your OS to the most stable development version available. Rarely works.

  • yes: Surpress target partition confirmation prompt - use with caution. Default is to prompt the user

eg. to reformat and clone the OS to the automatically determined target memory card without prompting use the following command:

Code:
./nupgrade.sh wipe yes
Or to force the reformat and clone the OS to the external card using the ext3 filesystem, without prompting, use the following command:

Code:
./nupgrade.sh wipe external ext3 yes
Target Selection
The target device and partition will be automatically detected by the script based on the available memory cards and partitions present on those cards.

You will be prompted to accept the automatically determined device/partition before the script proceeds to write or modify the target in any way, unless you pass the parameter "yes" in which case there will be no prompting (so use with caution!) The default response to the prompt is "yes", and you can just press return to continue, or enter "no" or ctrl-c to abort.

The script will first check the "internal" memory card (if present) for a second partition with a filesystem type of 83 (ie. Linux). If such a partition is available it will be considered the target for the cloning process. If there is no valid partition available on the internal memory card, the external memory card will be checked for a second partition of type 83 and it will become the target if such a partition is present. If neither memory card has a valid partition, the script will abort.

The automatic internal/external device detection can be overridden by specifying the "internal" or "external" parameter - if "internal" is passed as a parameter, the script will verify the internal card is suitable before proceeding, otherwise it will abort. Likewise for "external", only the external card will be considered as the target and the internal card will be ignored.

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

The Following 3 Users Say Thank You to Milhouse For This Useful Post: