trouble with should-be-bootable SD cards and kernel versions
Bee Hock Goh
beehock at gmail.com
Fri Aug 12 08:47:00 UTC 2011
I am trying to script out creating of android partitions on different
size of sdcard. While going through android-media-create scripts, I
found the following:
return '%s,%s,%s,*\n%s,%s,L\n%s,%s,L\n%s,-,E\n%s,%s,L\n%s,,,-' % (
boot_start, boot_len, partition_type, system_start, _system_len,
cache_start, _cache_len, userdata_start, userdata_start,
The scripts itself has calculate the alignment through the start/len
of the different partition. However, the first logical partition
created under the extended partition has the same starting sector. If
I do a test using sfdisk, I get an bad parition start for the logical
Anyone has any advice on this?
with best regards,
On Fri, Jul 8, 2011 at 10:27 PM, Jaswinder Singh
<jaswinder.singh at linaro.org> wrote:
> On 30 June 2011 04:10, AJ ONeal <coolaj86 at gmail.com> wrote:
>> The cards are from the same manufacturer, and exactly the same size.
>> I've tried dd and not only does it take closer to 2.5 hours instead of 10
>> minutes, it yields the same results.
>> dd if=/dev/sde of=/dev/sdf bs=8M
> <Though I don't think it will solve the problem if Tom's suggestion
> didn't already help.
> But still a few points to note>
> This bs=8M doesn't seem the best/useful option.
> Also we need to remember 'dd' runs beneath the file-system layer
> and will copy bytes from image to the disk.
> Most of which(as per 2.5hours/10min) seems non-relevant data in this case.
> Assuming you create only primary partitions and you have the working
> 'master-copy' in /dev/sde, maybe you could try
> $ dd if=/dev/sde of=master_mbr.img bs=512 count=1
> Then 'burn' only the good master mbr on all cards.
> $ dd if=master_mbr.img of=/dev/sdf //and other cards
> Once you unplug->plug the cards, it should be possible to have a script
> that formats the newly detected partitions(albeit malformed[*]) and do rysnc
> to copy the load.
> Btw, there just might be a way to emulate 'soft' unplug->plug of storage
> over USB using sysfs or somthing, that I am not aware of, which could
> make the whole process scripted.
>> The duplication process is a usb hub with many card readers attached and a script that > creates a fake raid 1 (/dev/md0 sans raid info) out of the cards and copies the used
> If I had money to burn I would bet this scripted raid + usb hub thing
> has unveiled some
> bug that fails the almighty dd method.
> [*] It might be prudent to also script the capture first sector of
> each partition of the
> 'master' card. And burn them respectively after the unplug-plug of 'copy' cards.
> Linaro.org │ Open source software for ARM SoCs | Follow Linaro
> http://facebook.com/pages/Linaro/155974581091106 -
> http://twitter.com/#!/linaroorg - http://linaro.org/linaro-blog
> linaro-dev mailing list
> linaro-dev at lists.linaro.org
More information about the linaro-dev