pbatard / rufus

The Reliable USB Formatting Utility
https://rufus.ie
GNU General Public License v3.0
29.29k stars 2.59k forks source link

Error: [0xC0030570] The file or directory is corrupted and unreadable #2482

Closed KireinaR closed 5 months ago

KireinaR commented 5 months ago

<!-- PLEASE READ THIS CAREFULLY:

  1. You MUST read and complete the steps from the checklist below, by placing an x into each [ ] (so that it shows '[x]', NOT '[ x]' or '[x ]'), BEFORE clicking on 'Submit new issue'.

  2. Failure to perform these steps, WHICH ARE ONLY THERE TO HELP YOU, will usually result in your issue being dismissed without notice.

  3. If you are reporting an issue when trying to run Rufus, or when trying to boot a media created by Rufus, you MUST provide a log, period. Please do not assume that the developer(s) will be able to "guess" the specifics of your environment, what image you used, what type of media you used it with or the many many other critical parameters that the log provides data for. To investigate an issue, a log from Rufus is ALWAYS required.

  4. If you still choose not to provide a log when reporting a problem, you agree that your issue will be closed without any further investigation.

YOU HAVE BEEN WARNED. -->

Checklist

Additionally (if applicable):

Issue description

Whenever I try to create bootable USB with persistent storage, I get this error. But it works fine if it has no persistent partition. I have tried it on 3 USBs and have had the same result. Each time this happens, I have to use diskpart tool to clean the drive, convert to MBR and format it to NTFS/exFAT to make it reusable for regular use again. image

Log

Rufus x64 v4.5.2180 (Portable)
Windows version: Windows 11 Home Single Language x64 (Build 22631.3593)
Syslinux versions: 4.07/2013-07-25, 6.04/pre1
Grub versions: 0.4.6a, 2.12
System locale ID: 0x0409 (en-US)
Will use default UI locale 0x0409
SetLGP: Successfully set NoDriveTypeAutorun policy to 0x0000009E
Localization set to 'en-US'
Found 517 officially revoked UEFI bootloaders from embedded list
Found 2351 additional revoked UEFI bootloaders from this system's SKUSiPolicy.p7b
Found USB 2.0 device 'VendorCo ProductCode USB Device' (048D:1234)
1 device found
Disk type: Removable, Disk size: 128 GB, Sector size: 512 bytes
Cylinders: 15297, Tracks per cylinder: 255, Sectors per track: 63
Partition type: MBR, NB Partitions: 1
Disk ID: 0x5407781E
Drive has a Windows 7 Master Boot Record
Partition 1:
  Type: NTFS (0x07)
  Detected File System: NTFS
  Size: 117.2 GB (125828071424 bytes)
  Start Sector: 2048, Boot: No
Scanning image...
ISO analysis:
  Image is an ISO9660 image
  Will use '/isolinux/isolinux.cfg' for Syslinux
  Detected Syslinux version: 6.04/20191223 (from '/isolinux/isolinux.bin')
Disk image analysis:
  Image has an unknown Master Boot Record
  Image is a bootable disk image
ISO label: 'pearOS Sonoma 14 2023.12.28'
  Size: 4.1 GB (Projected)
  Uses: Syslinux/Isolinux v6.04
  Uses: EFI
  Note: This ISO uses symbolic links, which may not be replicated due to file system
  limitations. Because of this, some features from this image may not work...
Using image: pearOS_Sonoma_64bit-14-pre-release.iso (4.1 GB)
Will reuse 'ldlinux.sys' and 'ldlinux.bss' from 'C:\Users\LENOVO\Desktop\\Rufus\syslinux-6.04\20191223\' for Syslinux installation
Timeout while retrieving conflicting process list

Format operation started
Requesting disk access...
Will use 'F:' as volume mountpoint
Could not open GUID volume '\\?\Volume{710f2b7b-1b06-11ef-8489-dc1ba1c63b2f}': [0x00000021] The process cannot access the file because another process has locked a portion of the file.
Opened \\.\PhysicalDrive2 for shared write access
Analyzing existing boot records...
Drive has a Windows 7 Master Boot Record
Clearing MBR/PBR/GPT structures...
Erasing 2176 sectors
Initializing disk...
Partitioning (MBR)...
● Creating Main Data Partition (offset: 1048576, size: 95.2 GB)
● Creating Linux Persistence Partition (offset: 102206780928, size: 22 GB)
Waiting for logical drive to reappear...
Using Ubuntu-like method to enable persistence
Notice: Using physical device to access partition data
Formatting (ext3)...
360448 possible inodes out of 5767169 blocks (block size = 4096)
288358 blocks (5.0%) reserved for the super user
Creating 176 inode sets: [1 marker = 2.2 set(s)]
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Failed to create ext3 'lost+found' dir: Corrupted entry
Re-mounted volume as F: after error

Found USB 2.0 device 'VendorCo ProductCode USB Device' (048D:1234)
1 device found
No volume information for drive 0x82
Disk type: Removable, Disk size: 128 GB, Sector size: 512 bytes
Cylinders: 15297, Tracks per cylinder: 255, Sectors per track: 63
Partition type: MBR, NB Partitions: 2
Disk ID: 0x029CC003
Drive has a Zeroed Master Boot Record
Partition 1:
  Type: FAT32 LBA (0x0c)
  Detected File System: (Unrecognized)
  Size: 95.2 GB (102205685760 bytes)
  Start Sector: 2048, Boot: Yes
Partition 2:
  Type: GNU/Linux (0x83)
  Detected File System: (Unrecognized)
  Size: 22 GB (23622326784 bytes)
  Start Sector: 199622619, Boot: No
Found USB 2.0 device 'VendorCo ProductCode USB Device' (048D:1234)
1 device found
No volume information for drive 0x82
Disk type: Removable, Disk size: 128 GB, Sector size: 512 bytes
Cylinders: 15297, Tracks per cylinder: 255, Sectors per track: 63
Partition type: MBR, NB Partitions: 2
Disk ID: 0x029CC003
Drive has a Zeroed Master Boot Record
Partition 1:
  Type: FAT32 LBA (0x0c)
  Detected File System: (Unrecognized)
  Size: 95.2 GB (102205685760 bytes)
  Start Sector: 2048, Boot: Yes
Partition 2:
  Type: GNU/Linux (0x83)
  Detected File System: (Unrecognized)
  Size: 22 GB (23622326784 bytes)
  Start Sector: 199622619, Boot: No
Found USB 2.0 device 'VendorCo ProductCode USB Device' (048D:1234)
1 device found
No volume information for drive 0x82
Disk type: Removable, Disk size: 128 GB, Sector size: 512 bytes
Cylinders: 15297, Tracks per cylinder: 255, Sectors per track: 63
Partition type: MBR, NB Partitions: 2
Disk ID: 0x029CC003
Drive has a Zeroed Master Boot Record
Partition 1:
  Type: FAT32 LBA (0x0c)
  Detected File System: (Unrecognized)
  Size: 95.2 GB (102205685760 bytes)
  Start Sector: 2048, Boot: Yes
Partition 2:
  Type: GNU/Linux (0x83)
  Detected File System: (Unrecognized)
  Size: 22 GB (23622326784 bytes)
  Start Sector: 199622619, Boot: No
Found USB 2.0 device 'VendorCo ProductCode USB Device' (048D:1234)
1 device found
No volume information for drive 0x82
Disk type: Removable, Disk size: 128 GB, Sector size: 512 bytes
Cylinders: 15297, Tracks per cylinder: 255, Sectors per track: 63
Partition type: MBR, NB Partitions: 2
Disk ID: 0x029CC003
Drive has a Zeroed Master Boot Record
Partition 1:
  Type: FAT32 LBA (0x0c)
  Detected File System: (Unrecognized)
  Size: 95.2 GB (102205685760 bytes)
  Start Sector: 2048, Boot: Yes
Partition 2:
  Type: GNU/Linux (0x83)
  Detected File System: (Unrecognized)
  Size: 22 GB (23622326784 bytes)
  Start Sector: 199622619, Boot: No
Found USB 2.0 device 'VendorCo ProductCode USB Device' (048D:1234)
1 device found
No volume information for drive 0x82
Disk type: Removable, Disk size: 128 GB, Sector size: 512 bytes
Cylinders: 15297, Tracks per cylinder: 255, Sectors per track: 63
Partition type: MBR, NB Partitions: 2
Disk ID: 0x029CC003
Drive has a Zeroed Master Boot Record
Partition 1:
  Type: FAT32 LBA (0x0c)
  Detected File System: (Unrecognized)
  Size: 95.2 GB (102205685760 bytes)
  Start Sector: 2048, Boot: Yes
Partition 2:
  Type: GNU/Linux (0x83)
  Detected File System: (Unrecognized)
  Size: 22 GB (23622326784 bytes)
  Start Sector: 199622619, Boot: No
randompersononinternet69 commented 5 months ago

Damaged USB drive likely.

KireinaR commented 5 months ago

Damaged USB drive likely.

All 3 of them? Likely not.

pbatard commented 5 months ago

https://github.com/pbatard/rufus/issues?q=Failed+to+create+ext3+%27lost%2Bfound%27+dir%3A+Corrupted+entry

This seems to be a sporadic issue reported by some people and which appears to have to do with Windows not liking "foreign" file systems being created.

Unfortunately, this is not something I can replicate, which makes it exceedingly difficult to try to investigate.

I would appreciate if you could post a log with the results of a bad blocks check, as some people got this issue on defective drives (and you may have connector issues rather than bad drives, which would explain repeated failures with multiple devices).

KireinaR commented 5 months ago

https://github.com/pbatard/rufus/issues?q=Failed+to+create+ext3+%27lost%2Bfound%27+dir%3A+Corrupted+entry

This seems to be a sporadic issue reported by some people and which appears to have to do with Windows not liking "foreign" file systems being created.

Unfortunately, this is not something I can replicate, which makes it exceedingly difficult to try to investigate.

I would appreciate if you could post a log with the results of a bad blocks check, as some people got this issue on defective drives (and you may have connector issues rather than bad drives, which would explain repeated failures with multiple devices).

Sure I will run a bad block check. Update: I tried it on a different computer and got the same result.

KireinaR commented 5 months ago

image I guess there are bad blocks. Any ways to fix ?

pbatard commented 5 months ago

I guess there are bad blocks. Any ways to fix ?

No. Change your drive(s). And be mindful that some unscrupulous vendors out there will sell fake drives (i.e. drives that have been tampered to show a larger capacity than they actually have, and that will fail when you try to access blocks beyond the capacity), so please be also mindful of cheap drives.

As your issue was external to Rufus, I will now close it and advise anybody encountering these kind of errors not to pay "lip service" to the check list, that explicitly asks you to run a bad blocks check, but to actually do it.

thecatontheceiling commented 5 months ago

your usb drives are probably fake, bad blocks check results are suspicious

KireinaR commented 5 months ago

Thanks so much guys. Appreciate the help, I will buy some new drives then.

N5SLI commented 5 months ago

I am having the exact same issue. I have tried several flash drives that I know are good. I have tested flash drives after using diskpart. The drives work fine but when using rufus I get to about 40% through the format process before the error pops up. "Error: [0x00305570] The file or directory is corrupted and unreadable."

pbatard commented 5 months ago

I have tried several flash drives that I know are good

But did you run an actual bad blocks check from Rufus?

It's not enough to "know" that your drives are good. You need hard concrete evidence that they are, which can only be accomplished through a bad blocks check that also tests for fake drive, like the bad blocks check of Rufus.

N5SLI commented 5 months ago

I have tried several flash drives that I know are good

But did you run an actual bad blocks check from Rufus?

It's not enough to "know" that your drives are good. You need hard concrete evidence that they are, which can only be accomplished through a bad blocks check that also tests for fake drive, like the bad blocks check of Rufus.

Why would rufus work fine with the flash drive when I do not have any persistence?

pbatard commented 5 months ago

Why would rufus work fine with the flash drive when I do not have any persistence?

Because persistence accesses pretty much all of the range of the drive in terms of sectors (due to the ext formatting of the ext partitions, with inodes being created all over the place).

When not using persistence, only the beginning of the drive is accessed. So, if you happen to have a fake drive with an actual capacity that is larger than the size of your ISO (as opposed to the fake reported capacity, which will be much larger than actual), then everything may look good because you're not trying to access sectors past actual capacity. But persistence will try to use all of the drive, so that's precisely when failures are expected to occur, as you will be writing sectors past actual capacity.

At any rate, just test the bloody drive for bad blocks. It's not that difficult and it's the ONLY way to be sure that your drive is good. Anything else is just speculation.

N5SLI commented 5 months ago

At any rate, just test the bloody drive for bad blocks. It's not that difficult and it's the ONLY way to be sure that your drive is good. Anything else is just speculation.

I am using a 2 tb flash drive so this may take some time.

pbatard commented 5 months ago

If your 2 TB flash drive's price was too good to be true, then it's probably fake... These go for at least $100 (as they should), and you can be darn sure that all those cheap 2 TB flash drives you can see for sale on aliexpress, that are priced around $10 or less, are 100% fake.

N5SLI commented 5 months ago

Actually purchased on eBay. but the second drive I have is a 64gb sandisk I purchased at Walmart and it has the same issue.

pbatard commented 5 months ago

Actually purchased on eBay.

Not much of a warranty that it'll be better than aliexpress. Same unscrupulous sellers operate in both spaces, and since you did not talk about how much you paid, I'm going to assume that it was way less than $100.

a 64gb sandisk I purchased at Walmart

Not much of a guarantee either. People have gotten fake drives from Walmart. I know. Because some of them complained that Rufus didn't work properly, and when they did run a bad blocks check, they found that the drive was fake.

Now, again, until you do report with the results of your bad blocks check for both drives, this is just pure speculation on my side, since I still don't have any hard evidence to go by...

N5SLI commented 4 months ago

Sorry for taking so long to get back to you. I am a 2-way radio technician and have been really busy lately. You were correct, there were many bad blocks found. Thank you for explaining things too me. I appreciate you taking the time to explain how persistence works. Have a great day.

Mrsaucejunior commented 4 months ago

There is no bad blocks for mine but it is still showing same error Or is there any other way for checking bad blocks?

github-actions[bot] commented 1 month ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.