installImages

昼間の続き。とりあえず RSS 倒しながらパケジ導入を。

$ sudo apt-get install \
parted dosfstools uboot-mkimage python-argparse python-dbus python-debian \
python-parted qemu-arm-static qemu-kvm btrfs-tools command-not-found 

で、コマンドを再度実行。

$ ./linaro-image-tools-0.4.5/linaro-android-media-create --mmc /dev/sdb --dev panda --system system.tar.bz2 --userdata userdata.tar.bz2 --boot boot.tar.bz2 
====================================================================
            linaro-android-media-create is EXPERIMENTAL             
                                                                    
 The command line parameters as well as the distribution format will
 be changed and we will not keep backward compatibility for the     
 current version here.                                              
====================================================================

I see...
Device           Mount point      Size
/dev/sda6        none             4096MB
/dev/sda         none             305245MB
/dev/sdb         none             973MB
/dev/loop0       none             1900MB
/dev/sda1        none             1200MB
/dev/sdb1        /media/boot      70MB
/dev/sda2        none             294042MB
/dev/sda3        none             10000MB
/dev/sda5        /                143050MB
/dev/sdb2        /media/rootfs    902MB
Are you 100% sure, on selecting [/dev/sdb] (y/n)? 

む、sdb で良いよな。y して sudo のパスワード入力したら何かお仕事を一生懸命なさっているご様子でいらっしゃいます。

Checking that no-one is using this disk right now ...
OK
Warning: given size (1048576) exceeds max allowable size (674816)
Warning: bad partition start (earliest 1318913)
Warning: empty partition
Warning: partition [6] has size 0 but is not marked Empty
Warning: partition 5 is not contained in partition 4
lseek: Invalid argument

sfdisk: seek error on /dev/sdb - cannot seek to 2367488
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
Traceback (most recent call last):
  File "./linaro-image-tools-0.4.5/linaro-android-media-create", line 142, in <module>
    args.should_align_boot_part)
  File "/home/rms/Documents/panda/linaro/linaro-image-tools-0.4.5/linaro_image_tools/media_create/partitions.py", line 51, in setup_android_partitions
    should_align_boot_part=should_align_boot_part)
  File "/home/rms/Documents/panda/linaro/linaro-image-tools-0.4.5/linaro_image_tools/media_create/partitions.py", line 399, in create_partitions
    run_sfdisk_commands(sfdisk_cmd, heads, sectors, cylinders, media.path)
  File "/home/rms/Documents/panda/linaro/linaro-image-tools-0.4.5/linaro_image_tools/media_create/partitions.py", line 373, in run_sfdisk_commands
    return proc.communicate("%s\n" % commands)
  File "/usr/lib/python2.6/subprocess.py", line 691, in communicate
    return self._communicate(input)
  File "/usr/lib/python2.6/subprocess.py", line 1258, in _communicate
    self.wait()
  File "/home/rms/Documents/panda/linaro/linaro-image-tools-0.4.5/linaro_image_tools/cmd_runner.py", line 87, in wait
    raise SubcommandNonZeroReturnValue(self._my_args, returncode)
linaro_image_tools.cmd_runner.SubcommandNonZeroReturnValue: Sub process "['sudo', '-E', 'sfdisk', '--force', '-D', '-uS', '-H', '128', '-S', '32', '/dev/sdb']" returned a non-zero value: 1
$

む。どうなったのかな。

$ sudo fdisk /dev/sdb -l

Disk /dev/sdb: 1020 MB, 1020788736 bytes
32 heads, 61 sectors/track, 1021 cylinders
Units = cylinders of 1952 * 512 = 999424 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a221d

   Device Boot      Start         End      Blocks   Id  System
$

むむ、綺麗になっているな。この状態でリトライしてみましたが現象変わらず。先頭 512 な区画切って dd で /dev/zero 流しこんでみるかな。
先頭 512 な区画は作成不可能でしたので 1KB な区画を作成してアレしてみましたが駄目。コマンド実行後は区画が綺麗になっておる模様。今後は全部の領域で一つの区画を作って先頭 512 に /dev/zero 入れてリトライしてみるか。

駄目

なんとなく SDCard の不具合な気がしてます。自宅には他にも SDCard あるはずなんだけど探すの面倒だなぁ。
あ、今日使った microSD 持って帰れば良かったのか。

もう少し

単発パーティションにして dd で /dev/zero を全部入れてみるとか。

$ sudo dd if=/dev/zero of=/dev/sdb1 bs=512 count=1993728

で、リトライ。も同じエラーが出るな。

Checking that no-one is using this disk right now ...
OK
Warning: given size (1048576) exceeds max allowable size (674816)
Warning: bad partition start (earliest 1318913)
Warning: empty partition
Warning: partition [6] has size 0 but is not marked Empty
Warning: partition 5 is not contained in partition 4
lseek: Invalid argument

うーん、、、仕方が無いので明日 4GB な microSD でリトライしてみます。