USB Stick Not Contiguous

3

1

I have a 4Gb FAT32 usb stick that I use to boot several iso images using grub4dos. Any iso image I add turns as contiguous however there is one iso that no matter what I do it always show up as non-contiguous. This image is the largest from the stick, having almost 300mb.

I tried moving it from hdd to stick and everytime is the same result: from hdd -- file is contiguous but from usb -- file not contiguous.

Tried WinContig to defragment the stick and it says no fragments found. Even if they are fragments, none of them are this iso image.

What can I do?

TwirlMandarin

Posted 2012-05-11T19:51:55.973

Reputation: 1 510

2Does it matter? Fragmentation affects flash memory very little, since it doesn't actually need to seek from one place to another, unlike magnetical media. – user1686 – 2012-05-11T20:00:03.180

1Yes, it matter because if a file is not contiguous then grub4dos or any other loader cannot boot from it. – TwirlMandarin – 2012-05-11T20:03:50.640

@grawity: IIRC, ISO images will not work when they are fragmented. It's been a while I read up about this, so I cannot remember the details. I use a separate USB flash drive for ISO images, which I do not do anything else with, for this reason. – paradroid – 2012-05-11T20:04:05.073

deleted my answer, did not know that grub4dos was that picky ;) – Baarn – 2012-05-11T20:21:13.833

Does it always fragment, even if you rename the old image and add a new copy behind it? – ott-- – 2012-05-11T20:58:35.837

@AlexanderCeed, grub2 can load non contiguous files just fine. – psusi – 2012-05-12T05:33:04.420

Answers

2

I don't think it is a good idea to use a defragmenter on a flash drive, as it will continuously keep on moving data and wearing the drive out while it is working.

If the images no longer work, I think the easiest solution would be to just make the ISO compilation drive again, which you could do overnight, as it takes a long time in my experience.

I use XBoot to do this.

XBoot

paradroid

Posted 2012-05-11T19:51:55.973

Reputation: 20 970

The images works fine from the hdd. grub loads it without problems. But when rying to load it from the stick it gives me the non-contiguous problem. Also reformatted the drive and copied the images to it, same problem. Could the unit size allocation be the cause? – TwirlMandarin – 2012-05-11T20:11:25.717

@AlexanderCeed: Yes, which is why you need to rebuild it again, as I said in my answer. If you use XBoot you only need to drag and drop the ISO images, press 'Create USB' and come back a few hours later. – paradroid – 2012-05-11T20:14:03.890

@AlexanderCeed: If you say the files are no longer contiguous, that is the problem. Rebuild the drive. – paradroid – 2012-05-11T20:14:51.097

It worked, thank you! For the future, whenever i will remove/add/edit stuff on the drive, i'll need to repeat the procedure (format and re-copy everything)? – TwirlMandarin – 2012-05-12T20:41:06.423

@AlexanderCeed: I think I read somewhere that you do need to, but I am not entirely sure. I do not change the ISO images on my multi-boot flash drive very often, so when I do, I do rebuild the whole drive, just to make sure that it does work when I need to use it. You can try changing images to see if it still works, and you can always rebuild it again if it fails. Cheers. – paradroid – 2012-05-12T22:09:47.013

3

I've used Contig, a command line tool to make an iso contiguous on a ufd for grub4dos to map correctly

http://technet.microsoft.com/en-gb/sysinternals/bb897428.aspx

mavhc

Posted 2012-05-11T19:51:55.973

Reputation: 156

Nice. I had the same problem as the querent, and this solved it in a few minutes and with less disk writes and a full rebuild would have entailed. Raises a UI point, in that many defrag tools won't insist on all files being contiguous (excessive) and/or allow defragging of USBs (generally more harm than good), but this shows a case where a "I really know what I'm doing" option pays off. – Jon Hanna – 2014-10-08T22:14:44.377