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

Error 0xC0030057 (parameter is not correct) when creating persistent drive on Windows 7 #1374

Closed
4 of 10 tasks
sonoro1234 opened this issue Sep 9, 2019 · 10 comments
Closed
4 of 10 tasks
Assignees
Projects
Milestone

Comments

@sonoro1234
Copy link

sonoro1234 commented Sep 9, 2019

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.

Additionally (if applicable):

  • I ran a bad blocks check, by clicking Show advanced format options then Check device for bad blocks, and confirmed that my USB is not defective.
  • I also tried one or more of the following:
    • Using a different USB drive.
    • Plugging the USB into a different port.
    • Running Rufus on a different computer.
  • If using an image, I clicked on the (✓) button to compute the MD5, SHA1 and SHA256 checksums, which are therefore present in the log I copied. I confirmed, by performing an internet search, that these values match the ones from the official image.

Issue description

Trying to create a bootable usb with persistence (12 gb) with ubuntu-18.04.3-desktop-amd64.iso returns with error 0xC0030057 (parameter is not correct)
This only happens if persistence is requested.

Log

Rufus x86 v3.7.1576 (Portable)
Windows version: Windows 7 SP1 64-bit
Syslinux versions: 4.07/2013-07-25, 6.03/2014-10-06
Grub versions: 0.4.6a, 2.04
System locale ID: 0x0C0A (es-ES)
NOTE: No Windows Language Pack is installed for English (English) on this system.
This means that some controls may still be displayed using the system locale.
Localization set to 'en-US'
Found USB 2.0 device 'SMI USB DISK USB Device' (090C:1000)
1 device found
No volume information for drive 0x81
Disk type: Removable, Disk size: 16 GB, Sector size: 512 bytes
Cylinders: 1937, Tracks per cylinder: 255, Sectors per track: 63
Partition type: MBR, NB Partitions: 2
Disk ID: 0x000BA949
Drive has a Zeroed Master Boot Record
Partition 1:
  Type: FAT32 LBA (0x0c)
  Size: 2.8 GB (3052417536 bytes)
  Start Sector: 2048, Boot: Yes
Partition 2:
  Type: GNU/Linux (0x83)
  Size: 12.0 GB (12884884992 bytes)
  Start Sector: 5963801, Boot: No
Will reuse 'ldlinux.sys' and 'ldlinux.bss' from './rufus_files/rufus_files/syslinux-6.03/20171017/' for Syslinux installation

Format operation started
Requesting disk access...
Will use 'F:' as volume mountpoint
Deleting partitions...
Deleting ALL partition(s) from disk '\\?\PhysicalDrive1':
● Partition 1 (offset: 1048576, size: 2.8 GB)
● Partition 0 (offset: 3053466112, size: 12.0 GB)
Opened \\.\PhysicalDrive1 for exclusive write access
Analyzing existing boot records...
Drive has a Zeroed Master Boot Record
Clearing MBR/PBR/GPT structures...
Erasing 128 sectors
Deleting partitions...
Partitioning (MBR)...
● Creating Main Data Partition (offset: 1048576, size: 2.8 GB)
● Creating Linux Persistence Partition (offset: 3053466112, size: 12.0 GB)
Closing existing volume...
Waiting for logical drive to reappear...
Using Ubuntu-like method to enable persistence
Unexpected volume name: '(null)'
Re-mounted volume as F: after error

Found USB 2.0 device 'SMI USB DISK USB Device' (090C:1000)
1 device found
No volume information for drive 0x81
Disk type: Removable, Disk size: 16 GB, Sector size: 512 bytes
Cylinders: 1937, Tracks per cylinder: 255, Sectors per track: 63
Partition type: MBR, NB Partitions: 2
Disk ID: 0x00113A13
Drive has a Zeroed Master Boot Record
Partition 1:
  Type: FAT32 LBA (0x0c)
  Size: 2.8 GB (3052417536 bytes)
  Start Sector: 2048, Boot: Yes
Partition 2:
  Type: GNU/Linux (0x83)
  Size: 12.0 GB (12884884992 bytes)
  Start Sector: 5963801, Boot: No
Found USB 2.0 device 'SMI USB DISK USB Device' (090C:1000)
1 device found
No volume information for drive 0x81
Disk type: Removable, Disk size: 16 GB, Sector size: 512 bytes
Cylinders: 1937, Tracks per cylinder: 255, Sectors per track: 63
Partition type: MBR, NB Partitions: 2
Disk ID: 0x00113A13
Drive has a Zeroed Master Boot Record
Partition 1:
  Type: FAT32 LBA (0x0c)
  Size: 2.8 GB (3052417536 bytes)
  Start Sector: 2048, Boot: Yes
Partition 2:
  Type: GNU/Linux (0x83)
  Size: 12.0 GB (12884884992 bytes)
  Start Sector: 5963801, Boot: No
@pbatard
Copy link
Owner

pbatard commented Sep 9, 2019

Well, first of all, persistence will NOT work with Ubuntu 18.04 (yes, even 18.04.03 that was released after August 1st). This is because, for now, the fix for bug 1489855 has only been included in the 19.10 daily ISOs.

[EDIT: The following is inaccurate, though it might help if you are experiencing something that looks similar on Windows 10. See my next post for the most likely explanation for the issue, which has to do with a regression introduced with commit 94e2015 that appears to have broken Windows 7 ext3 formatting.]

As to the 0xC0030057 (and other) codes, yeah, this is a result of Windows being an ass when it comes to creating partitions it doesn't know how to handle, such as ext3 ones. The trick is to insist or unplug/replug the drive or zero the drive (Alt-Z) for a while or try to first create a FreeDOS drive, and then create a drive with persistence.

At this stage I am not sure I'll ever had a good solution to avoid these error codes, but I can tell you that, if you insist, you should manage to get a persistent drive (at least, in all my testing, I have never found a drive where I couldn't add persistence with a little bit of cajoling, however I have not tested Windows 7 that much since it's about to reach end of life, so it's possible that Windows 7 is even worse than Windows 10 here...).

@pbatard pbatard self-assigned this Sep 9, 2019
@sonoro1234
Copy link
Author

sonoro1234 commented Sep 9, 2019

Now with eoan-desktop-amd64.iso after first creating a FreeDOS drive.
Says: the device is in use by another process. And an explorer dialog opens saying disk is unformated Do you want to format?
After this error if I retry I get the initial error 0xC0030057

@pbatard
Copy link
Owner

pbatard commented Sep 9, 2019

You're going to have to figure out what other process is using the drive.

But I'm also re-testing on Windows 7, and I'm getting the feeling that the change I applied in 94e2015 where I switched to using AltMountVolume() instead of GetPartitionName() to get the drive to format doesn't sit too well with Windows 7...

The thing is, I did that because I found it made Windows 10 more stable with the creation of ext3 partitions...
That would certainly explain the Unexpected volume name: '(null)' message (and of course, if we don't get a volume name, we can't format much of anything).

If other people confirm they have the same issue, I guess I'm going to have to declare that persistence creation is not compatible with Windows 7 for the time being, and try to revert that change in Rufus 3.8...

I can only wish people had reported that issue during the 2 weeks BETA we had for Rufus 3.7, as it would have given me an opportunity to fix this before release.

@pbatard pbatard added this to the 3.8 milestone Sep 9, 2019
@pbatard pbatard changed the title parameter is not correct with 3.7 and persistence Error 0xC0030057 (parameter is not correct) when creating persistent drive on Windows 7 Sep 9, 2019
@sonoro1234
Copy link
Author

sonoro1234 commented Sep 9, 2019

You're going to have to figure out what other process is using the drive.

It is explorer saying that usb is not formated and offering: Do you want to format?
(happens after clearing MBR ...)

@pbatard
Copy link
Owner

pbatard commented Sep 9, 2019

Makes sense, though there is code in Rufus that is designed to prevent these prompts from appearing (and last time I checked, these did work on Windows 7 for me).

@pbatard pbatard added this to To do in Rufus Next Sep 12, 2019
@pbatard pbatard moved this from To do to In progress in Rufus Next Sep 12, 2019
@pbatard
Copy link
Owner

pbatard commented Sep 15, 2019

I believe I have a fix for the above. It will be part of the upcoming Rufus 3.8 BUGFIX release, which I'm planning to publish in the coming week, since I consider that both this issue and #1375 are rather important matters that require an out-of-band release.

If you want to test, you can download an early preview of this BUGFIX release HERE.

Note that, as I push the commit with the fix, this issue will be automatically closed. But that won't prevent anyone from commenting further if you wish (for instance to report whether 3.8 works or if you still see an issue).

@pbatard pbatard moved this from In progress to Done in Rufus Next Sep 15, 2019
@sonoro1234
Copy link
Author

I have tested succesfully the BUGFIX release!!!
Thanks!!

@sonoro1234
Copy link
Author

As I could not install Jack in ubuntu 19.04 I tried with ubuntu studio 19.04 from https://ubuntustudio.org/download/

I could made the usb but after booting it only shows inittransfm console
Should work with ubuntu studio?

@pbatard
Copy link
Owner

pbatard commented Sep 16, 2019

As per what I said above:

Well, first of all, persistence will NOT work with Ubuntu 18.04 (yes, even 18.04.03 that was released after August 1st). This is because, for now, the fix for bug 1489855 has only been included in the 19.10 daily ISOs.

Same applies to 19.04. In other words, NO, persistence will not work with any Ubuntu other than 19.10 at the moment.

pbatard added a commit that referenced this issue Sep 16, 2019
* This is a bugfix release to address #1374 and #1375
@lock
Copy link

lock bot commented Dec 15, 2019

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.

@lock lock bot locked and limited conversation to collaborators Dec 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Rufus Next
  
Done
Development

No branches or pull requests

2 participants