How to deal with "fragmented" files?

Discuss one of the most feature filled GameCube applications here :)
Post Reply
User avatar
alzen
Posts: 186
Joined: Wed Aug 15, 2012 5:45 am
Location: Poland / UK(W.Yorkshire)

How to deal with "fragmented" files?

Post by alzen » Sun Sep 09, 2012 7:47 am

That's the problem, I copy and .iso or .gcm to SD Card(tried 2 sd cards, Sundisk and Kingston) and when I try to boot the game it says that the game's file is fragmented - how to deal with it? Swiss tries to boot the game after that message of course but it always fails.

I thought that it may be Windows fault 'cause it seems to me like results of not safetly removed media(I safetly removed the SD card of course) - so once I waited about 10 minutes after system finished copying the files and (attention!) removed the SD Card without safetly removing it first in the system. Guess what - it worked! But only once.

So that's my problem with booting dvd images with swiss. I tried to defragment the SD card with a fragmented file and it didn't work as well.

Do you know what's the problem? Using Vista here.
Take a look at my YouTube channel - totally dedicated to retro shooters
User avatar
liquitt
Posts: 1810
Joined: Thu Apr 01, 2010 5:43 am
Location: neverland

Re: How to deal with "fragmented" files?

Post by liquitt » Sun Sep 09, 2012 9:56 am

Did you do a clean format before?
Try formatting the SD card, copying the 2,3,x ISOs over in one move and then safely remove the card and try again.
please search before you ask - a lot has been discussed already!
(or use google with "site:gc-forever.com *term*")
http://is.gd/MDmZcr

we also have a wiki filled with knowledge
http://is.gd/dX58Rm
User avatar
AC_Orange
Posts: 398
Joined: Mon Mar 29, 2010 11:36 am

Re: How to deal with "fragmented" files?

Post by AC_Orange » Sun Sep 09, 2012 2:08 pm

I think a lot of us have experienced this. I'd format the sd card and copy a few games at a time onto it just like liquitt suggested. My understanding is that the files get copied individually from the beginning of the SD to the end (assumption), so I don't see how they would get fragmented... Yet somewhere along the way they do. I could've been doing something wrong.
Also when I copy the games, I do it in an order where the ones I really like and intend to keep on the sd for a long time are copied first, the game I'm likely to play only for a little while last, so I can delete it and hopefully the new game will get copied into it's place and won't be fragmented. There's got to be some logic to this, right?

In linux you can use a program called filefrag that tells you whether a file is fragmented or not

Here's what filefrag reports:

Code: Select all

File size of Adventure Island (J).iso is 1459978240 (2851520 blocks, blocksize 512)
Adventure Island (J).iso: 1 extent found
File size of Baten Kaitos Origins (U) Disc1.iso is 1459978240 (2851520 blocks, blocksize 512)
Baten Kaitos Origins (U) Disc1.iso: 1 extent found
File size of Beyond Good & Evil (E).iso is 1459978240 (2851520 blocks, blocksize 512)
Beyond Good & Evil (E).iso: 1 extent found
File size of Billy Hatcher (E).iso is 1459978240 (2851520 blocks, blocksize 512)
Discontinuity: Block 1363968 is at 14287168 (was 8584128)
Billy Hatcher (E).iso: 2 extents found
File size of Mario Sunshine (E).iso is 1459978240 (2851520 blocks, blocksize 512)
Discontinuity: Block 989440 is at 16785408 (was 18979584)
Discontinuity: Block 1342720 is at 8320 (was 17138688)
Mario Sunshine (E).iso: 3 extents found
File size of Prince of Persia The Sands of Time (E).iso is 1459978240 (2851520 blocks, blocksize 512)
Prince of Persia The Sands of Time (E).iso: 1 extent found
File size of Resident Evil 2 (E).iso is 1459978240 (2851520 blocks, blocksize 512)
Resident Evil 2 (E).iso: 1 extent found
File size of Star Fox Assault (E).iso is 1459978240 (2851520 blocks, blocksize 512)
Discontinuity: Block 1010688 is at 29534272 (was 16785408)
Star Fox Assault (E).iso: 2 extents found
File size of Tales of Symphonia (E) Disc1.iso is 1459978240 (2851520 blocks, blocksize 512)
Tales of Symphonia (E) Disc1.iso: 1 extent found
File size of Zelda Four Swords Adventures (E).iso is 1459978240 (2851520 blocks, blocksize 512)
Discontinuity: Block 2000128 is at 17138688 (was 20979712)
Zelda Four Swords Adventures (E).iso: 2 extents found
File size of Zelda Twilight Princess (E).iso is 1459978240 (2851520 blocks, blocksize 512)
Zelda Twilight Princess (E).iso: 1 extent found
I'm going to move them to my hard drive and copy them back one by one and see what happens (This is the only thing I can suggest you to try)

Question:
Is it safe to assume that if one is copying only one game onto a freshly formatted 2+gb card there's no way that the game will be fragmented?
User avatar
alzen
Posts: 186
Joined: Wed Aug 15, 2012 5:45 am
Location: Poland / UK(W.Yorkshire)

Re: How to deal with "fragmented" files?

Post by alzen » Sun Sep 09, 2012 6:19 pm

I had problems with Windows wanted me to format SD card almost every time and than I was also trying to copy some games so guess formatting won't help much. It's a pity I don't have linux here; also I know linux copies files much better way than MS Windows does so there probably aren't such problems when using linux.

I have 2gb SD cards so I cannot copy more than 1 iso in a row. Maybe SD HC card won't suffer such difficulties but I don't have one to try it.

Is there any other file system supported by SWISS? Maybe choosing different FS will help?

Still, the problem remains, how to deal with such a thing on Windows?
Take a look at my YouTube channel - totally dedicated to retro shooters
User avatar
liquitt
Posts: 1810
Joined: Thu Apr 01, 2010 5:43 am
Location: neverland

Re: How to deal with "fragmented" files?

Post by liquitt » Sun Sep 09, 2012 8:48 pm

another thing i noticed: if you're using mac osx you might know about .Trashes and .ds_store files and else. The gamecube/swiss doesn't like them either so you might want to use something like AppleOff or blueharvest or something to keep mounted flash storages free from these annoying files :)
please search before you ask - a lot has been discussed already!
(or use google with "site:gc-forever.com *term*")
http://is.gd/MDmZcr

we also have a wiki filled with knowledge
http://is.gd/dX58Rm
User avatar
alzen
Posts: 186
Joined: Wed Aug 15, 2012 5:45 am
Location: Poland / UK(W.Yorkshire)

Re: How to deal with "fragmented" files?

Post by alzen » Mon Sep 10, 2012 12:38 am

Is it connected to fragmented files? Does removing these files help for fragmented files?

It's not about Windows, but maybe it'll be useful for MacOS X users.

Still waiting for the Windows solution.
Take a look at my YouTube channel - totally dedicated to retro shooters
User avatar
emu_kidid
Site Admin
Posts: 4927
Joined: Mon Mar 29, 2010 10:06 am
Location: Australia
Contact:

Re: How to deal with "fragmented" files?

Post by emu_kidid » Mon Sep 10, 2012 12:51 am

Wait for the swiss solution - I'll add in basic frag support shortly ;)
Image
User avatar
AC_Orange
Posts: 398
Joined: Mon Mar 29, 2010 11:36 am

Re: How to deal with "fragmented" files?

Post by AC_Orange » Mon Sep 10, 2012 1:30 am

alzen wrote:I had problems with Windows wanted me to format SD card almost every time and than I was also trying to copy some games so guess formatting won't help much. It's a pity I don't have linux here; also I know linux copies files much better way than MS Windows does so there probably aren't such problems when using linux.

I have 2gb SD cards so I cannot copy more than 1 iso in a row. Maybe SD HC card won't suffer such difficulties but I don't have one to try it.

Is there any other file system supported by SWISS? Maybe choosing different FS will help?

Still, the problem remains, how to deal with such a thing on Windows?
Windows shouldn't repeatedly ask you to format the SD card, there's might be something wrong with the card itself. Only reason I said format is because it's an easy way to delete all the files. The reason for the format is that if there are files on the sd card and they are in the middle of a 2gb partition, the gcm you are trying to copy will be fragmented.


I did some tests last night with my 16GB sd, copied 5 games onto it and none were fragmented. 6th one was fragmented. just deleted it and copied again, no problems. 7th game copied was fragmented, had to recopy twice before it was okay. Will try to copy more games onto it later today
User avatar
AC_Orange
Posts: 398
Joined: Mon Mar 29, 2010 11:36 am

Re: How to deal with "fragmented" files?

Post by AC_Orange » Mon Sep 10, 2012 2:49 am

emu_kidid wrote:Wait for the swiss solution - I'll add in basic frag support shortly ;)
look forward to this
User avatar
alzen
Posts: 186
Joined: Wed Aug 15, 2012 5:45 am
Location: Poland / UK(W.Yorkshire)

Re: How to deal with "fragmented" files?

Post by alzen » Tue Sep 11, 2012 7:20 pm

My problems with Vista trying to format SD card all over again are over, there were some problems with system files. Still, fragmentation problem remains with this 2gb SD cards.

Yesterday I bought 8gb Sandisk Micro SDHC with SD adapter (Class 4), tried 3 games and no fragmentation happened. Will let you know if I get any fragmentation problems here.

Still, it's great that SWISS will deal with fragmented files.

---------

EDIT:

btw. guess at least one person should direct me here:
http://www.gc-forever.com/wiki/index.ph ... ricksSwiss

It tells a lot! Like, that I should try to defragment my HDD(didn't try it) and do not try to deframent my SD card(did try it).
Take a look at my YouTube channel - totally dedicated to retro shooters
User avatar
AC_Orange
Posts: 398
Joined: Mon Mar 29, 2010 11:36 am

Re: How to deal with "fragmented" files?

Post by AC_Orange » Wed Sep 12, 2012 6:47 am

Thanks, in the end I managed to get 9 games on my 16gb sd without any fragmentation.
Had space for 2 more but after 5-6 attempts of copying, the game always ends up fragmented.
User avatar
alzen
Posts: 186
Joined: Wed Aug 15, 2012 5:45 am
Location: Poland / UK(W.Yorkshire)

Re: How to deal with "fragmented" files?

Post by alzen » Thu Sep 13, 2012 6:25 pm

Got fragmented file on this 8gb SDHC as well.
Take a look at my YouTube channel - totally dedicated to retro shooters
mark_k
Posts: 8
Joined: Sun Sep 02, 2012 9:56 am

Re: How to deal with "fragmented" files?

Post by mark_k » Tue Oct 02, 2012 7:37 pm

A couple of tips...

If you need to format an SD/SDHC card, use the SD Formatter program. That creates a partition with the correct alignment.

If you've copied GC images to your card and some files are fragmented, you could try running a disk defragmenter. But that's not good because it causes wear-and-tear on the SD card and will probably take a very long time if large amounts of data need to be moved. So try this alternative approach:
  • Only use full-size unstripped ~1.4GB image files.
  • Install a program like Auslogics Disk Defrag.
  • Delete all files from your SD card (or reformat it using SD Formatter).
  • You want to make sure no other program writes to the card while you're copying files to it. You could try copying files from a command prompt instead of Windows Explorer.
  • Copy one game image to the card.
  • Run Disk Defrag to check whether the image file is fragmented. Hopefully it won't be, but if it is optimize it.
  • Copy another image to the card.
  • Run Disk Defrag again to check whether the 2nd image file is fragmented.
Repeat that process of copying an image then checking for fragmentation until you've filled your card up. Now all files should be unfragmented.

Later when you want to put different games on the card, don't delete any existing files! Instead rename an existing file to the name of the new file, then copy the new file to the card. It should overwrite the just-renamed old file. Since space was already allocated for the old file, hopefully the newly-copied one won't be fragmented either. If you use Linux you can use dd to overwrite an old file like this:

Code: Select all

mv /media/card/game_I_no_longer_want.gcm /media/card/newgamename.gcm
dd if=newgamename.gcm of=/media/card/newgamename.gcm conv=notrunc bs=32768
Doing that should guarantee that the new game file is unfragmented. There's a Windows version of dd which I haven't tried. It might or might not support not truncating the output file.
User avatar
alzen
Posts: 186
Joined: Wed Aug 15, 2012 5:45 am
Location: Poland / UK(W.Yorkshire)

Re: How to deal with "fragmented" files?

Post by alzen » Fri Dec 07, 2012 4:09 am

Hmm, as far as I know you shouldn't defrag the SD Card. I wonder if you can find at least 5 pages on the web where the author suggests to defrag the SD card.

Another thing, about using the command line to copy files, pointless - do you know the tool called Robocopy? It's an official MS tool - take a look. Tried this one, no difference. There's no difference if you use the command line or the windows explorer.

Also, like a week or two ago I discovered that my SD card reader in laptop i either broken or poor quality(DELL laptop); because copying the files to SD card on the another computer(ASUS laptop) using SD Card reader works ok - no more fragmented files. Now I'm using cheap chinesse SD->USB pendrive on my laptop to transfer files via the USB port not to use SD Card reader.
Take a look at my YouTube channel - totally dedicated to retro shooters
Post Reply