pbatard / rufus

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

Rufus directly moves to status 'Ready' when used from a WinPE USB stick #1284

Closed sunayansaikia closed 5 years ago

sunayansaikia commented 5 years ago



Checklist

Additionally (if applicable):

Issue description

I'm running Rufus from a Win10 PE live USB stick (source usb drive - 1st one). I can access the target USB drive (2nd one) fine and so does Rufus. But when I try to create a bootable, Rufus directly moves to status 'Ready' (All options already tried). Neither it generates a 'Log' button (for me to debug) nor writes any files to the USB stick. What I saw in the UI is that it tries to delete and create partitions and then something happens, and it directly moves to 'Ready' state.

Log

*** NO logs generated

<FULL LOG>
pbatard commented 5 years ago
  1. If you see the Rufus UI then there IS a log generated (and there IS a log button — it is ALWAYS available), especially as you mention that you saw it delete and create partitions, that you can access by clicking the log button (last small button left of START) and I ABSOLUTELY NEED TO SEE IT! Next time, please try to read the checklist, as it tells you exactly how to access the log.

  2. You may want to try with the 3.5 BETA which you can download here

sunayansaikia commented 5 years ago

I ABSOLUTELY NEED TO SEE IT!

I did go through the checklist. Please check the screenshot attached. @pbatard I think there is a bug in the code and it's not checking the prerequisites before launching the GUI. And, moreover, there is some kind of faulty exception handling that's letting it declare the whole process successful (with status = 'Ready') even though the process didn't finish successfully.

image

pbatard commented 5 years ago

That's exceedingly weird. It means all the Ui controls display except the ones with the log button. That's unheard off (at least, in millions and millions of downloads you are the very first person to report these controls not showing). Can you show me a screenshot of what you get when you click "Show advanced drive properties"?

Also, even if the log button doesn't show, Rufus sends its log output to the debug facilities, so can you please install and run DebugView from here and do what you were trying to do, then provide the log from DebugView? That log should contain the same data as what you would have seen in Rufus from the log button.

I really can't help you without the log, and there are more than one way to get to it, even though your missing of the log button is exceedingly puzzling.

Also, I will need to know exactly how you created your Win10 PE live USB stick and from what image (with a link to that image).

pbatard commented 5 years ago

Oh, by the way, I just remembered that I also added a Ctrl-L shortcut in Rufus to access the log, so you should be able to get to that data even without installing DebugView.

sunayansaikia commented 5 years ago

@pbatard Thanks. I'm able to extract the log. It says unable to locate FormatEx() in Fmifs.dll: [0x0000007F] The specified procedure could not be found. I'm using Hiren Win10 PE. I have read your article it says -> where you mentioned it's not a public API to format a drive, and instead you had to hijack an undocumented one called FormatEx? So, how do I fix this issue? Get Fmifs.dll? Any other dependencies I need to get this working?

LOG:

Rufus x86 v3.4.1430
Windows version: Windows 10 64-bit (Build 14393)
Syslinux versions: 4.07/2013-07-25, 6.03/2014-10-06
Grub versions: 0.4.6a, 2.02
System locale ID: 0x0409
Will use default UI locale 0x0409
SetLGP: CoCreateInstance failed; hr = 8007007e
Localization set to 'en-US'
Found USB 2.0 device 'MXT-USB Storage Device USB Device' (AAAA:8816)
Found USB 2.0 device 'JetFlash Transcend 4GB USB Device' (058F:6387)
Using autorun.inf label for drive H: 'HBCD_PE_x64'
Removing H: from the list: This is the disk from which Rufus is running!
1 device found
Disk type: Removable, Disk size: 16 GB, Sector size: 512 bytes
Cylinders: 1883, Tracks per cylinder: 255, Sectors per track: 63
Partition type: GPT, NB Partitions: 1
Disk GUID: {AC095035-A1F6-44A6-9138-9B703CB59FF3}
Max parts: 128, Start Offset: 17408, Usable = 15489530368 bytes
Partition 1:
  Type: {EBD0A0A2-B9E5-4433-87C0-68B6B72699C7}
  Name: 'Microsoft Basic Data'
  ID: {81ED3A19-ED85-446B-B33E-CD859FDAD7EE}
  Size: 14.4 GB (15488499200 bytes)
  Start Sector: 2048, Attributes: 0x0000000000000000
Scanning image...
ISO analysis:
  Image is an UDF image
Disk image analysis:
  Image does not have an x86 Master Boot Record
ISO label: 'CCCOMA_X64FRE_EN-US_DV9'
  Size: 4.4 GB (Projected)
  Uses: EFI
  Uses: Bootmgr (BIOS and UEFI)
  Uses: Install.wim (version 0.13.1)
Using image: Win10_1709_English_x64.iso (4.4 GB)

Format operation started
Requesting disk access...
Will use 'G:' as volume mountpoint
Deleting partitions...
Deleting ALL partitions from disk '\\?\PhysicalDrive1':
● Partition 1 (offset: 1048576, size: 14.4 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 (GPT)...
Adding extra partition
Reserved 33 tracks (1 MB) for extra partition
Writing UEFI:NTFS partition...
Closing existing volume...
Waiting for logical drive to reappear...
Formatting (NTFS)...
Unable to locate FormatEx() in Fmifs.dll: [0x0000007F] The specified procedure could not be found.
Format error: Success.

Found USB 2.0 device 'MXT-USB Storage Device USB Device' (AAAA:8816)
Found USB 2.0 device 'JetFlash Transcend 4GB USB Device' (058F:6387)
Using autorun.inf label for drive H: 'HBCD_PE_x64'
Removing H: from the list: This is the disk from which Rufus is running!
1 device found
Disk type: Removable, Disk size: 16 GB, Sector size: 512 bytes
Cylinders: 1883, Tracks per cylinder: 255, Sectors per track: 63
Partition type: GPT, NB Partitions: 2
Disk GUID: {11D60D55-DE1A-408C-AA03-CC1CBC7DB5B0}
Max parts: 128, Start Offset: 17408, Usable = 15489530368 bytes
Partition 1:
  Type: {EBD0A0A2-B9E5-4433-87C0-68B6B72699C7}
  Name: 'Microsoft Basic Data'
  ID: {4A9FD826-A884-4C51-80B7-4DC25A23EDA8}
  Size: 14.4 GB (15487428096 bytes)
  Start Sector: 2048, Attributes: 0x0000000000000000
Partition 2 (UEFI:NTFS):
  Type: {EBD0A0A2-B9E5-4433-87C0-68B6B72699C7}
  Name: 'UEFI:NTFS'
  ID: {F3713B4B-8E2C-44A0-A209-E3BB71DB48C9}
  Size: 512 KB (524288 bytes)
  Start Sector: 30250931, Attributes: 0x0000000000000000
pbatard commented 5 years ago

Thanks. I'm going to assume that you are using HBCD_PE_x64.iso from here with SHA-1 6CBC2FFFB4D0563852A43F7E16A67581BD6BD809.

By the looks of it, it appears that the people behind Hiren have forcibly removed Windows DLLs, such as the one that provides the standard UI toolbar elements for the log and other buttons (it seems that the hash button which is a regular toolbar also doesn't appear in your version) as well as the one that provides formatting (it's not because it isn't a public API that it should be removed).

As I hope you can appreciate, I can provide no guarantee whatsoever that Rufus can run properly on versions of Windows where critical DLLs have been hacked away, and I would strongly encourage you to report that issue to the makers of Hiren, so that they stop being that cavalier about ditching DLLs that they think are not needed...

The only thing I may try to do is report a formal error if the DLL is missing, as it doesn't seem Rufus is doing that at the moment, and I'll also see if I can figure out if I can detect when toolbar controls don't appear (which may be a lot more tricky to do).

Apart from that, I'm afraid that you are on your own. I simply can't support custom unofficial versions of Windows where DLLs appear to have been removed at random, or versions of Windows where very limited functionality is to be expected because they target a specific task (Windows installation and nothing else), and you should ask the people behind those versions for support.

PS: If you want a bootable Windows environment, on a USB Flash Drive, where you can run Windows without having to install it, I would also encourage you to look into using a Windows To Go drive (which Rufus can create for you), as this would provide you with a version of Windows that does have all the required DLLs to run standard Windows UI applications.

sunayansaikia commented 5 years ago

Many thanks! Yes, if it's the PE's problem, let it be. It's interesting that Hiren's CD bundles 'Rufus'. It may be that, it's never tested.

Will check 'Windows to go' like you mentioned.

Anyway, please continue improving Rufus. This tool has helped me many times and thanks for coming up with such an open-source project like this.

pbatard commented 5 years ago

Thanks for understanding. I have just added a fix to Rufus to make sure it doesn't fail silently on that [0x0000007F] error, but obviously there's not much I can do to work around the missing DLLs.

In the long term, I may try to use VDS for formatting instead of fmifs.dll which might work with PE environments. It will be a while before I look into that though...

sunayansaikia commented 5 years ago

Thanks again. I appreciate your efforts. Keep on developing and rocking. 👍

lock[bot] commented 5 years 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.