The Following User Says Thank You to fanoush For This Useful Post: | ||
|
2008-02-09
, 00:59
|
Posts: 4,030 |
Thanked: 1,633 times |
Joined on Jul 2007
@ nd usa
|
#292
|
Now seems a good time to document some new options I've added to the nupgrade.sh script.
The full usage is:
where:Code:nupgrade.sh 0-6|wipe|clone [internal | external] [ext2 | ext3] [sardine | herring] [yes]
- 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:
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 yes
Target SelectionCode:./nupgrade.sh wipe external ext3 yes
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.
|
2008-02-10
, 09:49
|
Posts: 19 |
Thanked: 2 times |
Joined on Jan 2008
|
#293
|
2GB Card (~1.8GB real size - partition 1: 1.3GB, partition 2: ~0.5GB): Code: #sfdisk /dev/mmcblk0 -uM /dev/mmcblk0p1: 0,1300,06 /dev/mmcblk0p2: ,,, /dev/mmcblk0p3: /dev/mmcblk0p4:
# sfdisk /dev/mmcblk0 /dev/mmcblk0p1:1,15000,6 (this is a ~480 MB FAT32 partition) /dev/mmcblk0p2:15001,, (this is a ~1.5MB Linux_83 partition) /dev/mmcblk0p3: <return> /dev/mmcblk0p4: <return>
|
2008-02-10
, 20:34
|
Posts: 4,030 |
Thanked: 1,633 times |
Joined on Jul 2007
@ nd usa
|
#294
|
|
2008-02-12
, 16:22
|
Posts: 18 |
Thanked: 2 times |
Joined on Jan 2008
|
#295
|
The Following User Says Thank You to sahinem For This Useful Post: | ||
|
2008-02-15
, 04:16
|
Posts: 19 |
Thanked: 2 times |
Joined on Jan 2008
|
#296
|
|
2008-02-19
, 03:24
|
|
Posts: 267 |
Thanked: 50 times |
Joined on Feb 2008
@ Montreal, Canada
|
#297
|
The Following User Says Thank You to iliaden For This Useful Post: | ||
|
2008-02-19
, 22:11
|
|
Posts: 159 |
Thanked: 21 times |
Joined on Jan 2008
@ Houston, texas
|
#298
|
|
2008-02-19
, 22:15
|
Posts: 678 |
Thanked: 197 times |
Joined on Jul 2007
@ San Jose CA
|
#299
|
|
2008-02-19
, 22:24
|
|
Posts: 159 |
Thanked: 21 times |
Joined on Jan 2008
@ Houston, texas
|
#300
|
tar comes with may versions. sorry about that! make sure you have the one supporting long file names.
Also maybe your downloaded file was not completed/corrupted. Try to download it again.
Point is that it looks like both partition table and FAT layout is tuned to be aligned with physical flash blocks. By creating random partition table, speed (and maybe even reliability and durability) may go down.
See this article for details
http://www.hjreggel.net/cardspeed/cs_calign.html
So maybe, if nupgrade.sh does the partition layout, it would be nice if it left at least the beginning of first FAT partition alone.
It is hard to know how important it is, maybe not much. YMMV
When I got my 8GB SDHC card I found that first 4MB of the card is 'wasted' and partition begins on block 8192. This is confirmed in the document mentioned above. There is perhaps some reason for this. I think this may be related to erase blocks and grouping of blocks for internal wear level logic. Maybe they try to prevent wearing off the beginning of the card (as it may contain some critical low level data).
Thisis a bit of black magic. If you are interested, start reading from page 66 of http://www.sdcard.org/about/memory_c...Layer_Spec.pdf
Looks like the size of Allocation Unit (AU) is 4MB for big cards. so it may make sense to aling beginning of partition at 4MB and data blocks after FAT table at 8MB.
Newbies click here before posting. Thanks.
If you really need to PM me with troubleshooting question please consider posting it to the forum instead. It is OK to PM me a link to such post then. Thank you.