Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0xC0030002] The system cannot find the file specified. #1778

Open
4 tasks done
feelingnothing opened this issue Sep 17, 2021 · 7 comments
Open
4 tasks done

[0xC0030002] The system cannot find the file specified. #1778

feelingnothing opened this issue Sep 17, 2021 · 7 comments
Labels

Comments

@feelingnothing
Copy link

Checklist

  • I looked at https://github.com/pbatard/rufus/wiki/FAQ to see if my question has already been answered.
  • I performed a search in the issue tracker for similar issues using keywords relevant to my problem, such as the error message I got from the log.
  • I clicked the 'Log' button or pressed Ctrl-L in Rufus, and copy/pasted the log into the line that says <FULL LOG> below.
  • The log I am copying is the FULL log, starting with the line Rufus version: x.y.z - I have NOT removed any part of it.

Issue description

Could not format usb drive with kubuntu iso and persistent storage, checked existing issues and found one (#814) from 2016 and the "solution" link responded with 404
The issues I am encountering is etheir [0xC0030002] The system cannot find the file specified. #1360 (that one in the Log session
or #814

Log

Rufus x86 v3.15.1812 (Portable)
Windows version: Windows 10 64-bit (Build 17763.2183)
Syslinux versions: 4.07/2013-07-25, 6.04/pre1
Grub versions: 0.4.6a, 2.06
System locale ID: 0x0409 (en-US)
Will use default UI locale 0x0409
SetLGP: Successfully set NoDriveTypeAutorun policy to 0x0000009E
Localization set to 'en-US'
Notice: The ISO download feature has been deactivated because 'Check for updates' is disabled in your settings.
Found USB 2.0 device 'Generic- SM/xD-Picture USB Device' (058F:6364)
Device eliminated because it appears to contain no media
Found USB 2.0 device 'USB 2.0 USB Flash Drive USB Device' (125F:0000)
Found USB 2.0 device 'Generic- Compact Flash USB Device' (058F:6364)
Device eliminated because it appears to contain no media
Found USB 2.0 device 'Generic- SD/MMC USB Device' (058F:6364)
Device eliminated because it appears to contain no media
Found USB 2.0 device 'Generic- MS/MS-Pro USB Device' (058F:6364)
Device eliminated because it appears to contain no media
1 device found
Disk type: Removable, Disk size: 32 GB, Sector size: 512 bytes
Cylinders: 3773, Tracks per cylinder: 255, Sectors per track: 63
Partition type: MBR, NB Partitions: 1
Disk ID: 0x02F8854C
Drive has a Grub 2.0 Master Boot Record
Partition 1:
  Type: FAT32 LBA (0x0c)
  Size: 28.9 GB (31036801024 bytes)
  Start Sector: 2048, Boot: Yes
Scanning image...
ISO analysis:
  Image is an ISO9660 image
  Detected Grub version: 2.04
Disk image analysis:
  Image has an unknown Master Boot Record
  Image is a bootable disk image
ISO label: 'Kubuntu 21.04 amd64'
  Size: 2.7 GB (Projected)
  Has a >64 chars filename
  Uses: GRUB2
  Uses: EFI
  Note: This ISO uses symbolic links, which will not be replicated due to file system
  limitations. Because of this, some features from this image may not work...
Using image: kubuntu-21.04-desktop-amd64.iso (2.7 GB)
Will reuse 'core.img' from './Rufus/grub-2.04/' for Grub 2.x installation

Format operation started
Requesting disk access...
Will use 'J:' as volume mountpoint
Deleting partitions:
● Partition 2 (offset: 1048576, size: 28.9 GB)
Opened \\.\PhysicalDrive1 for shared write access
Analyzing existing boot records...
Drive has a Grub 2.0 Master Boot Record
Clearing MBR/PBR/GPT structures...
Erasing 128 sectors
Initializing disk...
Partitioning (MBR)...
● Creating Main Data Partition (offset: 1048576, size: 8.9 GB)
● Creating Linux Persistence Partition (offset: 9563017216, size: 20.0 GB)
Waiting for logical drive to reappear...
Using Ubuntu-like method to enable persistence
Notice: Using physical device to access partition data
Formatting (ext3)...
327679 possible inodes out of 5242875 blocks (block size = 4096)
262143 blocks (5.0%) reserved for the super user
Creating 160 inode sets: [1 marker = 2.0 set(s)]
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Could not zero inode set at position 4620290 (126 blocks): [0xC0030002] The system cannot find the file specified.
Re-mounted volume as J: after error

Found USB 2.0 device 'Generic- SM/xD-Picture USB Device' (058F:6364)
Device eliminated because it appears to contain no media
Found USB 2.0 device 'USB 2.0 USB Flash Drive USB Device' (125F:0000)
Device eliminated because it appears to contain no media
Found USB 2.0 device 'Generic- Compact Flash USB Device' (058F:6364)
Device eliminated because it appears to contain no media
Found USB 2.0 device 'Generic- SD/MMC USB Device' (058F:6364)
Device eliminated because it appears to contain no media
Found USB 2.0 device 'Generic- MS/MS-Pro USB Device' (058F:6364)
Device eliminated because it appears to contain no media
0 devices found
Found USB 2.0 device 'Generic- SM/xD-Picture USB Device' (058F:6364)
Device eliminated because it appears to contain no media
Found USB 2.0 device 'USB 2.0 USB Flash Drive USB Device' (125F:0000)
Device eliminated because it appears to contain no media
Found USB 2.0 device 'Generic- Compact Flash USB Device' (058F:6364)
Device eliminated because it appears to contain no media
Found USB 2.0 device 'Generic- SD/MMC USB Device' (058F:6364)
Device eliminated because it appears to contain no media
Found USB 2.0 device 'Generic- MS/MS-Pro USB Device' (058F:6364)
Device eliminated because it appears to contain no media
0 devices found
@pbatard
Copy link
Owner

pbatard commented Sep 17, 2021

Can you please run a bad blocks check (which you can do with Rufus) and post the result.

The most common suspect for that issue would be bad flash memory, so this needs to be eliminated first.

@feelingnothing
Copy link
Author

Can you please run a bad blocks check (which you can do with Rufus) and post the result.

The most common suspect for that issue would be bad flash memory, so this needs to be eliminated first.

Progress had gone to 60% and no errors what so ever, I will obviously run it to the end, but I don't think bad blocks is an issue in this case

@pbatard
Copy link
Owner

pbatard commented Sep 17, 2021

Well, the number of + signs you have in your log before the error (70 for a total of 80) for a 20 GB partition that goes on after a partition of 8.9 GB, means that if there is an issue (and assuming inodes are spread sequentially and evenly), it may only start to manifest itself past the 26 GB mark, i.e. after 90% of the bad blocks check has been completed...

@feelingnothing
Copy link
Author

Well, the number of + signs you have in your log before the error (70 for a total of 80) for a 20 GB partition that goes on after a partition of 8.9 GB, means that if there is an issue (and assuming inodes are spread sequentially and evenly), it may only start to manifest itself past the 26 GB mark, i.e. after 90% of the bad blocks check has been completed...

The log with the Non-Bootable boot option selected and still getting the error, but no bad blocks were found

Rufus x86 v3.15.1812 (Portable)
Windows version: Windows 10 64-bit (Build 17763.2183)
Syslinux versions: 4.07/2013-07-25, 6.04/pre1
Grub versions: 0.4.6a, 2.06
System locale ID: 0x0409 (en-US)
Will use default UI locale 0x0409
SetLGP: Successfully set NoDriveTypeAutorun policy to 0x0000009E
Localization set to 'en-US'
Notice: The ISO download feature has been deactivated because 'Check for updates' is disabled in your settings.
Found USB 2.0 device 'Generic- SM/xD-Picture USB Device' (058F:6364)
Device eliminated because it appears to contain no media
Found USB 2.0 device 'USB 2.0 USB Flash Drive USB Device' (125F:0000)
Found USB 2.0 device 'Generic- Compact Flash USB Device' (058F:6364)
Device eliminated because it appears to contain no media
Found USB 2.0 device 'Generic- SD/MMC USB Device' (058F:6364)
Device eliminated because it appears to contain no media
Found USB 2.0 device 'Generic- MS/MS-Pro USB Device' (058F:6364)
Device eliminated because it appears to contain no media
1 device found
Disk type: Removable, Disk size: 32 GB, Sector size: 512 bytes
Cylinders: 3773, Tracks per cylinder: 255, Sectors per track: 63
Partition type: MBR, NB Partitions: 1
Disk ID: 0x02F8854C
Drive has a Grub 2.0 Master Boot Record
Partition 1:
  Type: FAT32 LBA (0x0c)
  Size: 28.9 GB (31036801024 bytes)
  Start Sector: 2048, Boot: Yes
Scanning image...
ISO analysis:
  Image is an ISO9660 image
  Detected Grub version: 2.04
Disk image analysis:
  Image has an unknown Master Boot Record
  Image is a bootable disk image
ISO label: 'Kubuntu 21.04 amd64'
  Size: 2.7 GB (Projected)
  Has a >64 chars filename
  Uses: GRUB2
  Uses: EFI
  Note: This ISO uses symbolic links, which will not be replicated due to file system
  limitations. Because of this, some features from this image may not work...
Using image: kubuntu-21.04-desktop-amd64.iso (2.7 GB)
Will reuse 'core.img' from './Rufus/grub-2.04/' for Grub 2.x installation

Format operation started
Requesting disk access...
Will use 'J:' as volume mountpoint
Deleting partitions:
● Partition 2 (offset: 1048576, size: 28.9 GB)
Opened \\.\PhysicalDrive1 for shared write access
Analyzing existing boot records...
Drive has a Grub 2.0 Master Boot Record
Clearing MBR/PBR/GPT structures...
Erasing 128 sectors
Initializing disk...
Partitioning (MBR)...
● Creating Main Data Partition (offset: 1048576, size: 8.9 GB)
● Creating Linux Persistence Partition (offset: 9563017216, size: 20.0 GB)
Waiting for logical drive to reappear...
Using Ubuntu-like method to enable persistence
Notice: Using physical device to access partition data
Formatting (ext3)...
327679 possible inodes out of 5242875 blocks (block size = 4096)
262143 blocks (5.0%) reserved for the super user
Creating 160 inode sets: [1 marker = 2.0 set(s)]
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Could not zero inode set at position 4620290 (126 blocks): [0xC0030002] The system cannot find the file specified.
Re-mounted volume as J: after error

Found USB 2.0 device 'Generic- SM/xD-Picture USB Device' (058F:6364)
Device eliminated because it appears to contain no media
Found USB 2.0 device 'USB 2.0 USB Flash Drive USB Device' (125F:0000)
Device eliminated because it appears to contain no media
Found USB 2.0 device 'Generic- Compact Flash USB Device' (058F:6364)
Device eliminated because it appears to contain no media
Found USB 2.0 device 'Generic- SD/MMC USB Device' (058F:6364)
Device eliminated because it appears to contain no media
Found USB 2.0 device 'Generic- MS/MS-Pro USB Device' (058F:6364)
Device eliminated because it appears to contain no media
0 devices found
Found USB 2.0 device 'Generic- SM/xD-Picture USB Device' (058F:6364)
Device eliminated because it appears to contain no media
Found USB 2.0 device 'USB 2.0 USB Flash Drive USB Device' (125F:0000)
Device eliminated because it appears to contain no media
Found USB 2.0 device 'Generic- Compact Flash USB Device' (058F:6364)
Device eliminated because it appears to contain no media
Found USB 2.0 device 'Generic- SD/MMC USB Device' (058F:6364)
Device eliminated because it appears to contain no media
Found USB 2.0 device 'Generic- MS/MS-Pro USB Device' (058F:6364)
Device eliminated because it appears to contain no media
0 devices found

@pbatard
Copy link
Owner

pbatard commented Sep 17, 2021

Okay. The fact that it's always the same block that the error is being produced (4620290 * 4096 = block around the 18 GB mark in the 20 GB persistent partition) would also indicate that it's not a hardware error.

The error being returned however appears to indicate that the handle to the drive has been invalidated by the system (i.e. this is an error that you'd expect to see if the drive was somehow unplugged) and I think I have seen it once or twice in the early days of adding the persistent feature, when I was trying to work at the partition level instead of at the whole drive level, with Windows somehow declaring that a partition it cannot read should be removed from the system after some time (hence the reason why I switched to working at the whole drive level, because the drive should never get removed). But then the failure would happen at a random sector, and I have not seen it since these early days.

I'm afraid it's going to be difficult to troubleshoot the issue without being able to replicate it. I'll see what I can do to run tests that are as close as possible to the conditions you have (same image, same drive capacity), but I can't guarantee anything.

One thing I am noticing however is that you appear to be using a USB 2.0 drive (Found USB 2.0 device 'USB 2.0 USB Flash Drive USB Device' (125F:0000)) which is likely to be slow and therefore take a very long time to create a 20 GB persistent partition on. That could kind of explain Windows interfering yet again and deciding to remove access to a partition it doesn't know how to handle after a specific time (tough, again, I would expect this to happen at a slightly different position each time, and working at the whole drive level was supposed to prevent this).

Can you please run a test with a 5 GB, 10 GB and 15 GB persistent partition to see what happens?

@feelingnothing
Copy link
Author

I did tests on 5Gb, 10Gb, 18Gb persistent storage and everyone of them worked, I have to note that I didn't try to boot from them, but waited for rufus to start writing iso file.

@pbatard
Copy link
Owner

pbatard commented Sep 18, 2021

Thanks for the tests.

I have been running some tests on my own adding large persistent partitions on slow speed drives (USB 2.0), and I've been running into timeout errors, which makes me think this is the annoying "Windows may drop access to a volume or a whole disk that contains a file system that it cannot mount" issue:

Format operation started
Requesting disk access...
No drive letter was assigned...
Will use 'F:' as volume mountpoint
Deleting partitions:
● Partition 2 (offset: 0, size: 58.4 GB)
Opened \\.\PhysicalDrive8 for shared write access
Analyzing existing boot records...
Drive has a Zeroed Master Boot Record
Clearing MBR/PBR/GPT structures...
Erasing 2176 sectors
Initializing disk...
Partitioning (MBR)...
● Creating Main Data Partition (offset: 1048576, size: 28.4 GB)
● Creating Linux Persistence Partition (offset: 30534545920, size: 30.0 GB)
Waiting for logical drive to reappear...
Using Ubuntu-like method to enable persistence
Notice: Using physical device to access partition data
Formatting (ext3)...
491519 possible inodes out of 7864313 blocks (block size = 4096)
393215 blocks (5.0%) reserved for the super user
Creating 240 inode sets: [1 marker = 3.0 set(s)]
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Creating 16384 journal blocks: [1 marker = 204.8 block(s)]
++++++++++++++++++++++++++++++++++++++++++++++
Could not create ext3 journal: [0xC0030079] The semaphore timeout period has expired.
Re-mounted volume as F: after error

As a matter of fact, when I am getting the error, I am seeing the whole drive disappear from diskpart altogether (the last line should read Disk 8 Online 58 GB 0 B):

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online         5589 GB  1024 KB        *
  Disk 4    Online          476 GB  1024 KB        *
  Disk 5    Online          465 GB  1024 KB        *
  Disk 6    Online           14 TB      0 B        *
  Disk 8    No Media           0 B      0 B

Fighting against Windows removing drives for no good reason while they are still being accessed might be a major pain in the ass because, quite frankly, if the system is not even able to detect that the drive is being written to when deciding to remove it from the system, I'm not sure what else I can do to force Windows to keep it online.

But I'll see what I can do...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants