Welcome, Guest. Please login or register.

Author Topic: FileSystem corruption with CF card  (Read 2485 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline darkageTopic starter

  • Hero Member
  • *****
  • Join Date: Aug 2007
  • Posts: 583
    • Show only replies by darkage
FileSystem corruption with CF card
« on: March 30, 2012, 07:05:01 AM »
It seems like if I create a partition greater than 2gb on my CF card, I eventually get file system corruption.   ie..    1 massive 7.5gb partition works ok using FFS, but when I copy heaps of whdload data it gets some sort of checksum error.

I've tried updating scsi.device and replacing the FFS library with the ClassicWB 8gb and 128gb support...   Seems to always bomb.

I do correctly set MaxTransfers 0x1fe00, buffers = 100, etc.. Tried setting up SFS but couldn't get it to format correctly, it comes up with a checksum error or something when it accesses the partition to format.. I've correctly flagged the partition as  a SFS/00 one. and installed support for it..

I keep on going around in circles, doing diskpart (clean all) operation everytime I test a new method..  It seems very moody... Using a Sandisk Ultra 30MB/s card..

Anyone have any wise more fail safe approach..  I've used both HDToolbox and HDinsttool making sure each time I try I only soley use one of those utils since I've heard they dont like to interact with each others work done.
« Last Edit: March 30, 2012, 07:05:55 AM by darkage »
 

Offline fishy_fiz

  • Hero Member
  • *****
  • Join Date: Jan 2005
  • Posts: 1813
    • Show only replies by fishy_fiz
Re: FileSystem corruption with CF card
« Reply #1 on: March 30, 2012, 07:16:25 AM »
I cant really offer any suggestions, but what youre reporting is consistant with what will happen when using an unpatched scsi.device and/or file system not being able to read beyond 8 gig. I very strongly recommend using either pfs3 or sfs rather than ffs. If Im not mistaken ffs cant read beyond 4 gig, but more importantly is very prone to invalidating a disk if its in use when the system is rebooted. Not to mention its also quite slow.
Near as I can tell this is where I write something under the guise of being innocuous, but really its a pot shot at another persons/peoples choice of Amiga based systems. Unfortunately only I cant see how transparent and petty it makes me look.
 

Offline Thomas

Re: FileSystem corruption with CF card
« Reply #2 on: March 30, 2012, 08:33:47 AM »
If both SFS and FFS give you checksum errors, then probably the card is bad. Try another one.

Offline Dr.Bongo

  • Sr. Member
  • ****
  • Join Date: Jun 2003
  • Posts: 342
    • Show only replies by Dr.Bongo
    • http://www.c64radio.com
Re: FileSystem corruption with CF card
« Reply #3 on: March 30, 2012, 09:08:20 AM »
I've had similar problems and changing the maxtransfer value to 0x1f000 did the trick. Think  some CF cards are really picky about it.
38911 BASIC BYTES FREE, less when I`ve had a drink!

 *** http://c64radio.com *** Commodore 64 Radio 24/7 for free!
 

Offline Thomas

Re: FileSystem corruption with CF card
« Reply #4 on: March 30, 2012, 11:11:40 AM »
This has nothing to do with pickyness but with evolution of the ATA protocol. If the builtin scsi.device driver needs to split large transfer amounts into smaller chunks, it relies on some return values which were defined in ATA-1 specs but are no longer present in ATA-2 specs. Therefore devices which follow ATA-2 specs don't work correctly with scsi.device if too large transfer blocks are requested. Setting MaxTransfer to a small value cures this because then already the file system splits large blocks into multiple commands and scsi.device does not need to.

Offline darkageTopic starter

  • Hero Member
  • *****
  • Join Date: Aug 2007
  • Posts: 583
    • Show only replies by darkage
Re: FileSystem corruption with CF card
« Reply #5 on: March 31, 2012, 05:10:16 AM »
So far so good, a list of things I have done to be able to manage formatting in SFS successfully -

- Updated Scsi.device with absolute latest update
- Updated both FS with newer versions FFS & SFS
- Used maxtransfer value of 0x1f000

I just selected the default partitioning from HDToolbox which setup 2x 3.8Gb-ish Partitions, I couldn't setup one large one seems like the parameters get screwed up..  After that I am able to format in SFS without error..

After reading the benefits of PFS over SFS, I'll try and see if I can get PFS going..

Many thanks!
 

Offline darkageTopic starter

  • Hero Member
  • *****
  • Join Date: Aug 2007
  • Posts: 583
    • Show only replies by darkage
Re: FileSystem corruption with CF card
« Reply #6 on: April 02, 2012, 06:45:55 AM »
Well I decided to stick with SFS for starters after reading PFS isn't supported by default with ClassicWB hard drive image so you have to be careful what tools you need to use..

I've managed to copy 4 Gigs of data without it crashing etc...  but for some reason my Boot Partition 800mb SFS one won't boot on my real amiga..  Boots okay by itself on Winuae..

Before when formatting in FFS before 2GB it booted fine on my Real Amiga..   Anything special I need to do concerning a SFS boot partition ?
 

Offline darkageTopic starter

  • Hero Member
  • *****
  • Join Date: Aug 2007
  • Posts: 583
    • Show only replies by darkage
Re: FileSystem corruption with CF card
« Reply #7 on: April 14, 2012, 07:57:41 PM »
I've cleaned my CF card and started again.. No problems in creating 2x SFS partitions..  ie 900MB system and 6.4GB something non-bootable data partition..

Weird thing is my CF card only boots if I disable the 2nd partition from the kickstart mouse click boot menu...  Both patitions are SFS/00 and Im using KS 3.0 roms..  

Hmm Im missing something here.
« Last Edit: April 14, 2012, 08:13:02 PM by darkage »
 

Offline paul1981

Re: FileSystem corruption with CF card
« Reply #8 on: April 15, 2012, 01:42:29 PM »
Quote from: darkage;688453
I've cleaned my CF card and started again.. No problems in creating 2x SFS partitions..  ie 900MB system and 6.4GB something non-bootable data partition..

Weird thing is my CF card only boots if I disable the 2nd partition from the kickstart mouse click boot menu...  Both patitions are SFS/00 and Im using KS 3.0 roms..  

Hmm Im missing something here.


You've possibly set your 6.4GB partition as bootable with a priority above that of your 1st partition.  Only the 1st partition should be marked as bootable (your 900MB one) with its boot priority set below that of the floppy drive DF0:
 

Offline darkageTopic starter

  • Hero Member
  • *****
  • Join Date: Aug 2007
  • Posts: 583
    • Show only replies by darkage
Re: FileSystem corruption with CF card
« Reply #9 on: April 16, 2012, 01:40:16 AM »
Quote from: paul1981;688602
You've possibly set your 6.4GB partition as bootable with a priority above that of your 1st partition.  Only the 1st partition should be marked as bootable (your 900MB one) with its boot priority set below that of the floppy drive DF0:


Definitely made sure 2nd partition was not flagged as bootable..  Not sure where to set the boot priority.. from memory when you partition theres a SCSI ID and within the actual a1200 boot menu theres boot priority..

Using my CF Card in IDE mode btw.  

I guess more trial and error :)
 

Offline paul1981

Re: FileSystem corruption with CF card
« Reply #10 on: April 16, 2012, 09:58:26 PM »
Quote from: darkage;688704
Definitely made sure 2nd partition was not flagged as bootable..  Not sure where to set the boot priority.. from memory when you partition theres a SCSI ID and within the actual a1200 boot menu theres boot priority..

Using my CF Card in IDE mode btw.  

I guess more trial and error :)


If we're talking about internal IDE then there's no SCSI ID, just priorities which you can set in hdtoolbox. But anyway, if it's just your first partition marked as bootable and it's set to a value below DF0: then it shouldn't matter.

So, have you used this tool http://aminet.net/package/disk/misc/fixhddsize to detect and set the correct hard drive parameters (C,H,S) ?

Here's what you should do:

1.Load the latest scsi.device 43.20 or above with the loadmodule command and reboot.

2.Then use the above program fixhddsize to detect the correct size of your drive. Once it detects correct size (7.5 GB is it?) make sure to save the changes (backup any important date as your partitions will be lost).

3.Load HDToolBox or http://aminet.net/package/disk/misc/hdinst or use HDInstTools and sort out your partitions, might as well set partition 1 to 1024MB. And, install SFS on the RDB. Make sure all your partitions are using SFS. Don't forget to set a sensible MaxTransfer value as well.

4.Install your OS onto your 1st partition (1GB)

5.You can either keep using the new scsi.device (slows down the IDE on my A1200) with the loadmodule command, or, get rid of that in the startup-sequence and use FRAP instead (speeds up the IDE on my 1200) http://aminet.net/package/disk/misc/frap_v1.0. (frap requires ROM in RAM 1st, so you'll need QuickROM http://aminet.net/package/util/sys/QuickROM or equivalent if not using RemAPollo or Blizkick. Your 2nd partition should then be safe to use.

That's it. OS in my case would be 3.1  - I can't advise you on anything else as I don't use anything else, but if I'm right, ClassicWB doesn't have large hard drive support enabled by default, although the latest scsi.device is in a largehdd support folder which you just copy to DEVS: and then reboot. Your large 2nd partition should then be okay (using SFS). There's a video on YouTube regarding this.

NSD isn't required because SFS will use directscsi as long as you are using the latest scsi.device or FRAP.
« Last Edit: April 16, 2012, 10:47:14 PM by paul1981 »