Autoboot with 8GB and HDHacker Possibillity - page 4 - General Help and Assistance on using CHDK stable releases - CHDK Forum  

Autoboot with 8GB and HDHacker Possibillity

  • 143 Replies
  • 145020 Views
*

Offline BB

  • ***
  • 164
Re: Autoboot with 8GB and HDHacker Possibillity
« Reply #30 on: 13 / April / 2008, 12:03:22 »
Advertisements
stefkiro,

If I understand the current state of this thread, we still have an absolute limit if 4 GB with the SDHC cards...

So, for windows, the only way you can use your 8GB card with CHDK (and a "Dry OS" camera), is to format it as FAT16--which only allows you to run a maximum addressable space of 4GB...

From the Windows Command Window:

Format x: /fs:fat         (where x: =  real SDHC card location)

For all the details of FAT16 and Bootable cards, the Wiki is:

Bootable SD card - CHDK Wiki

-Bill

Re: Autoboot with 8GB and HDHacker Possibillity
« Reply #31 on: 14 / April / 2008, 16:14:44 »
stefkiro,

If I understand the current state of this thread, we still have an absolute limit if 4 GB with the SDHC cards...

So, for windows, the only way you can use your 8GB card with CHDK (and a "Dry OS" camera), is to format it as FAT16--which only allows you to run a maximum addressable space of 4GB...

From the Windows Command Window:

Format x: /fs:fat         (where x: =  real SDHC card location)

For all the details of FAT16 and Bootable cards, the Wiki is:

Bootable SD card - CHDK Wiki

-Bill

When I try it on windows vista, it complains that the volume is too big for fat16/12 and it still formats 8 gb sdhc card as 7690 mb.
Should I use  some extra parameter perhaps to ensure it only gets formatted at 4 gb instead of 8 gb with the fat filesystem?

*

Offline cg

  • *
  • 4
Re: Autoboot with 8GB and HDHacker Possibillity
« Reply #32 on: 15 / April / 2008, 13:50:40 »
I just did a quick experiment with following partition layout:

sdd1: extended (primary 1)
 -> sdd5: fat16 (logical)
sdd2: fat32 (primary 2)

Windows XP sees and mounts sdd2, the fat32 primary partition.
Now, if camera firmware really ignores the partition type of primary1, it could try to access sdd1 or sdd5 instead. This would be a good thing :)
Maybe one could also create the fat16 filesystem directly on sdd1, while retaining the extended partition type, so windows would skip it.

I do not have access to a camera for a few days, so if somebody wants to experiment with this, I would like to hear the results!

*

Offline DataGhost

  • ****
  • 314
  • EOS 40D, S5IS
    • DataGhost.com
Re: Autoboot with 8GB and HDHacker Possibillity
« Reply #33 on: 15 / April / 2008, 14:58:12 »
Judging by the code I've seen, I don't think it'll work... but I'll try :)

Edit: as I guessed... "Memory card error".
« Last Edit: 15 / April / 2008, 15:01:30 by DataGhost »


*

Offline cg

  • *
  • 4
Re: Autoboot with 8GB and HDHacker Possibillity
« Reply #34 on: 15 / April / 2008, 15:06:01 »
Here's another scenario that might work. Windows sees again only sdd2
(the experiment is done using old 64MB card, so ignore the #sectors etc)

   Device Boot    Start       End   #sectors  Id  System
/dev/sdd1            62     12399      12338   5  Extended
/dev/sdd2         12400    125363     112964   b  W95 FAT32
/dev/sdd3            62     12399      12338   6  FAT16
/dev/sdd4             0         -          0   0  Empty

note that sdd1 and sdd3 have same start and end, but different system id's
Linux can access both filesystems fine, FAT32 using sdd2 and FAT16 using sdd3.

How to recreate this on Linux:
use fdisk /dev/sdd, create empty dos partition table. (o)
Create sdd1 and sdd2 as primary partitions. (n,p,1,1,+10M  n,p,2,enter,enter)
Change sdd1 -> fat16, sdd2 -> fat32 (t,1,6  t,2,b)
Write changes to disk & exit (w)
make filesystems (mkdosfs /dev/sdd1; mkdosfs -F32 /dev/sdd2)
<Make the sdd1 bootable as instructed in chdk wiki>
use sfdisk to create sdd3 as clone of sdd1 (sfdisk -uS -N3 -f /dev/sdd) (enter <start> <#sectors> <id> of sdd1, in my case "62 12338 6")
Change partition id of sdd1 to extended (sfdisk --id /dev/sdd 1 5)

Now you should have the test card ready. I will try this as soon as I receive my camera, but if someone wants to try this now, please let me know what happens :)

*

Offline cg

  • *
  • 4
Re: Autoboot with 8GB and HDHacker Possibillity
« Reply #35 on: 15 / April / 2008, 15:08:35 »
Judging by the code I've seen, I don't think it'll work... but I'll try :)

Edit: as I guessed... "Memory card error".

Thanks for testing! I kind of expected this from the first case, as the FAT16 partition does not start from same sector. Maybe you could try the second experiment too? or would you think it will give the same issue?

*

Offline BB

  • ***
  • 164
Re: Autoboot with 8GB and HDHacker Possibillity
« Reply #36 on: 15 / April / 2008, 15:11:16 »
When I try it on windows vista, it complains that the volume is too big for fat16/12 and it still formats 8 gb sdhc card as 7690 mb.
Should I use  some extra parameter perhaps to ensure it only gets formatted at 4 gb instead of 8 gb with the fat filesystem?

I have not tried the Vista format command... I know that with XP formating a 4 GB card, I get a warning about a non standard FAT16 format and a Y/N to continue question--If I answer Yes, it formats as FAT16...

-Bill

*

Offline DataGhost

  • ****
  • 314
  • EOS 40D, S5IS
    • DataGhost.com
Re: Autoboot with 8GB and HDHacker Possibillity
« Reply #37 on: 15 / April / 2008, 15:25:45 »
That was a very smart idea, if I'd just known that Windows makes just the one exception for extended partitions...
Anyway, I didn't think about the way extended partitions were stored but you're right. They have starting and ending sectors just like normal partitions. About the mounting: I didn't even have to clone the partition, after creating it it can be mounted by Linux (even if it's extended) and written to. The camera will not care and it'll find FAT16, boot CHDK and continue on FAT32. It works fine :) Windows detects a 2GB FAT32 partition without any complaints.
Only thing I had to do was make sure /dev/sda1 was 'not extended' because mkdosfs will refuse to create a filesystem on that partition.

Partition layout:
   Device Boot    Start       End     Blocks  Id  System
/dev/sda1             1        78      31654   5  Extended
/dev/sda2            79      4828    1928500   b  W95 FAT32


/dev/sda1 = FAT16 + DISKBOOT.BIN + DISKBOOT
/dev/sda2 = FAT32 + data + pictures


*

Offline cg

  • *
  • 4
Re: Autoboot with 8GB and HDHacker Possibillity
« Reply #38 on: 15 / April / 2008, 15:35:03 »
It worked!!! Wow :)

About the mounting: I didn't even have to clone the partition, after creating it it can be mounted by Linux (even if it's extended) and written to.

I could also mount the extended partition as fat, but for some reason, it gave me disk full error when trying to write in it. After I made the cloned partition and mounted it, writing also worked fine. Not sure why, maybe something in my system limits the access beyond certain range, when accessing partition marked as extended.

Using dd shows something like this must be happening:
# dd if=/dev/sdd1 of=/dev/null
2+0 records in
2+0 records out
1024 bytes (1,0 kB) copied, 0,00251586 s, 407 kB/s

dd if=/dev/sdd3 of=/dev/null
12338+0 records in
12338+0 records out
6317056 bytes (6,3 MB) copied, 3,21901 s, 2,0 MB/s

Re: Autoboot with 8GB and HDHacker Possibillity
« Reply #39 on: 23 / April / 2008, 13:10:43 »
Hi guys, glad to know CHDK is ported for S5. Kudos to dataghost and the peeps who dev it.

Now Im trying to get CHDK to load from a 8Gb SDHC. How should the partition layout be? I cant seem to get it to work. (Made my SDHC a 'fixed drive' using the driver hack, and partitioning using windowsXP built in disk management tool). Any guidance would be appreciated =)

-- -----------------------------------------------------------------------------------------------------------------------------------------------
Follow up:
Ahh, finally got it to work. And it was so 'easy'. Just create two primary partitions like so:

Primary 1: 16Mb, FAT16  <- Bootable, bootdisk.bin
Primary 2: 8Gb, FAT32    <- Photos storage
« Last Edit: 23 / April / 2008, 13:29:39 by hajimemashoo »

 

Related Topics