I got it to work on an 8 GB card. This is very useful, since my wife's nephew is performing in a concert tomorrow and I'd like to be able to video it in HD. Here's exactly what I had to do:
1) Create two partitions on the card. I created a 2 MB partition and a balance of the card partition.
In Linux, the commands were as follows. Note that "-" is something you do, "#" is the superuser prompt (don't type it), ">" is the prompt from a command, and ">>" is the prompt from a sub-command.
- Insert the card into the computer. Make sure it's unlocked. If there is an existing filesystem or filesystems on the card, unmount them!
# fdisk /dev/mmcblk0 [i](note that this will vary depending upon your hardware)[/i]
> [i]delete all existing partitions[/i]
> p [i](create a partition)[/i]
>> 1 [i](partition 1)[/i]
>> 1 [i](start on cylinder 1)[/i]
>> +2M [i](2 MB)[/i]
> p [i](create a partition)[/i]
>> 2 [i](partition 2)[/i]
>> (enter) [i](start on the first available cylinder)[/i]
>> (enter) [i](default -- the rest of the card)[/i]
> w [i]write the partition table out[/i]
> q
# mkdosfs -F 16 -n CHDK /dev/mmcblk0p1 [i](create a FAT16 filesystem with volume name CHDK -- that's optional -- on the first partition)[/i]
# mkdosfs -F 32 -N CANON_SX1 /dev/mmcblk0p2 [i](create a FAT32 filesystem on the second partition -- again, the name is optional, but my import script uses it)[/i]
[i]Make sure the filesystems aren't mounted at this point![/i]
# dd if=/dev/mmcblk0p1 of=bootsect.bin bs=512 count=1
- Hex/binary edit bootsect.bin; starting at byte 0x40, change the next 8 bytes to "BOOTDISK"
# dd if=bootsect.bin of=/dev/mmcblk0p1
- Mount the card -- depending upon your system setup, it might be to remove the card from the reader and reinsert it
- Find where the two filesystems are mounted -- it might be something like /media/CHDK and /media/CANON_SX1. We'll assume that the first, small partition is at /media/CHDK and the big one is at /media/CANON_SX1.
# cp VERS.REQ DISKBOOT.BIN /media/CHDK
# cp -r CHDK /media/CANON_SX1
- Umount and remove the card.
- Lock the card.
- Insert the card in the camera and turn the camera on.
At this point, CHDK booted -- but the card showed up with only about 1 MB free, so obviously it wasn't seeing the second partition. So in CHDK, I did the following:
- Press the alt button
- Menu
- Debug
- Create card with two partitions
Of course, once I turned the camera off, CHDK was no longer available. No problem. Reinsert the card into the computer (make sure the partitions aren't mounted), and repeat all the steps starting from the first mkdosfs command. Now it all works.
I'm not positive why my initial attempt didn't work. I suspect that the problem is that I wasn't setting the two partitions to the correct system ID. It's possible -- indeed, likely -- that if I did the following fdisk command everything would have worked correctly from the get-go:
# fdisk /dev/mmcblk0 [i](note that this will vary depending upon your hardware)[/i]
> [i]delete all existing partitions[/i]
> p [i](create a partition)[/i]
>> 1 [i](partition 1)[/i]
>> 1 [i](start on cylinder 1)[/i]
>> +2M [i](2 MB)[/i]
> p [i](create a partition)[/i]
>> 2 [i](partition 2)[/i]
>> (enter) [i](start on the first available cylinder)[/i]
>> (enter) [i](default -- the rest of the card)[/i]
> t [i](change a partition's system ID)[/i]
>> 1 [i](partition 1)[/i]
>> 1 [i](ID 1 -- FAT12)[/i]
> t [i](change a partition's system ID)[/i]
>> 1 [i](partition 2)[/i]
>> b [i](ID 0xb -- W95 FAT32)[/i]
> w [i]write the partition table out[/i]
> q