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

Autoboot with 8GB and HDHacker Possibillity

  • 143 Replies
  • 145011 Views
*

Offline obsidian

  • *
  • 31
  • A710IS
Autoboot with 8GB and HDHacker Possibillity
« on: 02 / January / 2008, 07:40:14 »
Advertisements
I read 4GB cards can support autoload CHDK if they are formatted to FAT16 witch 64k sector size.:)
But no instructions for 8GB found.  :(
Does exist way to make 8GB card with autoloading CHDK feature?Will HDhacker help with it?
A710IS + 4GB SanDisk Ultra II

*

Offline GrAnd

  • ****
  • 916
  • [A610, S3IS]
    • CHDK
Re: Autoboot with 8GB and HDHacker Possibillity
« Reply #1 on: 14 / January / 2008, 07:31:17 »
4GB is the highest reachable size for FAT16. You can format 8GB card as FAT16 but you will got 4GB only.
There is no way to format the whole 8GB as FAT16.
CHDK Developer.

*

Offline obsidian

  • *
  • 31
  • A710IS
Re: Autoboot with 8GB and HDHacker Possibillity
« Reply #2 on: 14 / January / 2008, 14:37:29 »
OK. What will work when formatted to FAT32?(A710)
Will camera recognize 8GB ( without CHDK)?
Will autoload function work( I think I have read it works @ S5IS :-[ by Dataghost)
Will there be any limits in video?
A710IS + 4GB SanDisk Ultra II

*

Offline DataGhost

  • ****
  • 314
  • EOS 40D, S5IS
    • DataGhost.com
Re: Autoboot with 8GB and HDHacker Possibillity
« Reply #3 on: 14 / January / 2008, 15:29:03 »
Yeah, it works, but there are drawbacks. An SD card is a normal block device, with a partition table and everything. What I did was... create a small (32MB) FAT16 partition, bootable and with CHDK on it, create a second, large (~8GB) FAT32 partition for your pictures. Now I hooked the boot code so it would show the camera the FAT32 partition, so it doesn't know about the FAT16 partition after CHDK has loaded. That's all fine, it works transparently. Joy!

The thing is, this is still platform-dependant code. For *every* camera model, this code will have to be traced and modified all over again, so this currently only works on the S5 and (possibly) the A720, I haven't heard of anyone attempting to use that code on other models yet.

Now for the real drawback: Windows is about as stupid as the camera when it comes to reading the SD card's partition table. While it's OK for a camera to not care about several partitions on a memory card, a PC should be able to handle them ALL, since SD cards are really general-purpose devices. In the disk manager it'll show both(all) partitions, but it will refuse to read the FAT32 one (assuming the previously mentioned setup), as Microsoft thought.. let's use the first partition on removable media and let's thwart any attempts at using the second partition in any way whatsoever. I have carefully looked into this and there seems to be NO way of having a >4GB SDHC card boot CHDK on the camera AND be read by Windows. There might be a workaround, but it involves a client-side modification and you might have to insert the SD card twice before getting access to the FAT32 partition and you will have to run the program again to get the camera to boot CHDK again.
Everything works fine on Linux, though, it's just that Windows is pedantic about it. As long as you access your camera through USB, it should be transparent and you should have no problems.

For the record, if anyone has any ideas, here is what I've tried so far:
- Swapping partitions 1 and 2 in the partition table (code only, locations stay the same): results in Windows reading the FAT32 partition, camera reading FAT32 partition and not booting CHDK anymore until this change is reversed
- Partition type: my FAT16 partition's type is currently 0x83 (Linux). Setting it to whatever value doesn't matter, even making it 'hidden' doesn't work. Windows just reads the first partition and completely ignores the partition type (as does the camera, by the way)
- Bootable flag: ignored. FAT32 partition has bootable set, yet the FAT16 partition is read (well, this was a long shot, it's quite logical :) )
- Zerofilling the FAT16 partition, just to see if it'll fall back to the second partition: 'This drive is not formatted. Do you want to format it?'
- Assigning a drive letter to the second partition in the Disk Manager: refused
- GPT: Ignored on removable devices, if at all supported by the platform (currently 64-bits editions only)
- I have the feeling that I forgot something, but I can't remember what.

There seems to be one other option, though... some card manufacturers apparently ship special drivers which will make the card(reader) appear as a fixed device, rather than a removable one. This should fix all problems, but I've been told that it's card(reader?)-dependant and I have been unable to locate any software of this kind.
If you're lucky enough to have a Linux server and still want to use Windows, you could set up a samba share to the mountpoint of your SDHC card and let it automatically mount there.

Edit:
By the way, it might not be entirely clear to everyone... Facts:
- Camera can only boot from the *FIRST* partition (and it must be FAT12/FAT16)
- Windows only reads the *FIRST* partition.
So there is no swapping partitions around. Another idea I got yesterday but forgot to write down is writing a FAT32 plugin for Total Commander. I have seen the ext2/3/reiserfs plugin so I guess it should be possible to make such a plugin. The preferred solution is to have this in the Windows Explorer, but that might not be (easily) possible.
I'll create an ext3 partition on my SD card now, to see if Total Commander will read it. I don't know if Windows actively blocks access to partitions it apparently doesn't want anyone to know about.

Edit2: just verified that Total Commander *WILL* read the (second) ext3 partition on my SD card, though the card needs to be inserted before starting TC ('refresh' doesn't seem to work, though that could be an issue with the plugin itself). This means that it will be possible to access it that way when someone writes a FAT32 driver for that.
« Last Edit: 16 / January / 2008, 09:41:16 by DataGhost »


*

Offline lukg

  • ***
  • 162
  • Eos 450D+18-55is+55-250is & Powershot S5is - 1.01a
Re: Autoboot with 8GB and HDHacker Possibillity
« Reply #4 on: 16 / January / 2008, 09:42:27 »
Dataghost, i found this on msfn forum

Quote
Ok XP can only see one partition on a removable USB but if change the USB driver to a fixed disk driver then XP will see it as a hard drive then we can have lay down multiple partitions as we like. Now open regedit and goto HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\USBSTOR
and double click on USBSTORE and you see a subkey below it, select the first subkey below USBSTORE and right click and select Copy Key Name

Here is mine, yours maybe different.

HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\USBSTOR\Disk&Ven_Generic&Prod_USB_Flash_Disk&Rev_0.00

Now we need only need this part:

USBSTOR\Disk&Ven_Generic&Prod_USB_Flash_Disk&Rev_0.00

Copy and paste it temporarily into notepad.

You will now need this driver. http://www.xpefiles.com/viewtopic.php?t=92
Unpack it to a folder on your desktop. Inside the folder is the file cfadisk.inf. You need to open this file and scroll down to you see the line %Microdrive_devdesc% = cfadisk_install, specific data
Now you need to replace all lines %Microdrive_devdesc% = cfadisk_install, specific data with
the line you copied from your registry like so.

%Microdrive_devdesc% = cfadisk_install,USBSTOR\Disk&Ven_Generic&Prod_USB_Flash_Disk&Rev_0.00

There could be more lines so replace all and save the file.

Goto Device Manager and click on disk drives. You see your USB listed, dbl click on it and goto the driver tab and click update driver and install from a specific location and choose the driver to install and click on Have Disk and browse to the cfadisk.inf file your modified driver on your desktop and force that to replace your existing driver. It might ask you to reboot. You should now have your USB showing as Local Disk


I don't know if it works...

*

Offline DataGhost

  • ****
  • 314
  • EOS 40D, S5IS
    • DataGhost.com
Re: Autoboot with 8GB and HDHacker Possibillity
« Reply #5 on: 16 / January / 2008, 09:49:34 »
Great, that's what I was looking for. I will test it right away :)

Edit: confirmed, this works. Still it isn't optimal: I have to attach the cardreader with the card inserted for my computer to recognize the volume (else it will just not work until I go to Device manager -> Generic SD Card reader -> Properties -> Policies, and even then it will not detect the partitions until I click 'Populate' in the 'Volumes' tab of the same window). I can't just remove the card, either, it'll still think the volumes are there until I remove the *entire* cardreader with 'Safely remove hardware'.
This goes for *ANY* SD card inserted, so I'm reverting. The driver comes with a source, so it might be possible to tweak it so it'll do the job as I want, but I don't have any experience with Windows drivers.

It'll look like this:

Rather than the 4 drives I normally get (with CANON_DC as N: ).
« Last Edit: 16 / January / 2008, 10:13:21 by DataGhost »

*

Offline lukg

  • ***
  • 162
  • Eos 450D+18-55is+55-250is & Powershot S5is - 1.01a
Re: Autoboot with 8GB and HDHacker Possibillity
« Reply #6 on: 16 / January / 2008, 09:52:25 »
Hope it will work!!   :xmas

*

Offline lukg

  • ***
  • 162
  • Eos 450D+18-55is+55-250is & Powershot S5is - 1.01a
Re: Autoboot with 8GB and HDHacker Possibillity
« Reply #7 on: 16 / January / 2008, 10:38:53 »
Quote
confirmed, this works. Still it isn't optimal: I have to attach the cardreader with the card inserted for my computer to recognize the volume (else it will just not work until I go to Device manager -> Generic SD Card reader -> Properties -> Policies, and even then it will not detect the partitions until I click 'Populate' in the 'Volumes' tab of the same window). I can't just remove the card, either, it'll still think the volumes are there until I remove the *entire* cardreader with 'Safely remove hardware'.

mmm it's quite understandable, since fixed volumes usually come attached to the usb device. Are you using a multiple card reader? Do you think that with just a USB SD Adapter this solution is quite perfect???(you have not the problem to remove/insert  the card, since it's always inside the usb adapter)...anyway i know that card reader will be more comfortable (i bought it for that  :blink:


*

Offline DataGhost

  • ****
  • 314
  • EOS 40D, S5IS
    • DataGhost.com
Re: Autoboot with 8GB and HDHacker Possibillity
« Reply #8 on: 16 / January / 2008, 10:43:50 »
Yeah an USB SD-only reader would be a partial solution to the problem, but I don't have a lot of spare USB ports (none at the moment) so I'd like to keep using this one. I'm leaning towards one of my other ideas before attempting anything with total commander.. that is writing a program that will swap the partition entries in the SD card's partition table, possibly with Autorun. The idea is to just place the program on the card, let it autorun (or invoke it in some easy way, if possible) so it will swap the partitions, remove and re-insert the SD card and you can access the FAT32 partition. The same program can also be placed on the FAT32 partition, as the process has to be repeated so the camera can read the card again. This seems friendlier than unplugging the cardreader, inserting the SD card, plugging the card reader in again (by the way, it will take quite a while to detect the partitions) and when you're done, ejecting the entire card reader. It'll also eject other volumes, like my CF card.... and I don't want that :)

*

Offline lukg

  • ***
  • 162
  • Eos 450D+18-55is+55-250is & Powershot S5is - 1.01a
Re: Autoboot with 8GB and HDHacker Possibillity
« Reply #9 on: 16 / January / 2008, 11:01:32 »
mmm nice idea!! but i think the total commander plugin is better  :D
(I can imagine all the heedless people running out from home, putting the sd inside the camera, and realizing that they forgot to swap the partition  :haha )

 

Related Topics