* Full Flash Update (FFU) image support was added to dism with Windows 10 1709
and is an alternate way to save a virtual hard disk for restoration.
* While more modern than VHD/VHDX, FFU creation only works for drives with file
systems that Windows natively recognizes (FAT, NTFS) and that look like Windows
installation media, so you can forget about FFU'ing a Linux disk.
* The other *intentional* drawback that Microsoft added is that they don't want
anybody but themselves being able to create and restore FFU images, so, even
as they have nice FfuApplyImage()/FfuCaptureImage() calls in FfuProvider.dll
they have decided not to make these public.
* This means that, since we don't have time to spend on figuring and direct
hooking internal DLL calls for x86_32, x86_64, ARM and ARM64 (and worrying
that Microsoft may ever so slightly change their DLL between revs to break
our hooks), we just call on dism.exe behind the scenes to create the FFU.
* This should help with the CoreELEC usage case described in #1842
* Also add MBR handling for ESP ↔ FAT cheat mode (Alt-P)
* Also set rufus-next to 3.19
* In their great "wisdom", Microsoft made it even harder to access ESPs on Windows 11,
meaning that we have to use even more convoluted ways of providing the ISO→ESP feature.
* Closes#1855
* Due to the partition gymnastic that is required by the hack that is ISOHybrid,
some ISOHybrid images that are written in DD mode, such as Ubuntu 20.10, may
result in Windows somehow "losing" the target disk from some of its listings.
* This "removal" can be seen for instance if you have diskpart already open and
issue 'list disk' after Rufus 3.13 completed its image writing.
* In the worst case scenario, Windows may flat out refuse to access the disk at
the sector level be it in diskpart or disk manager, which forces ones to clear
the partition tables on Linux or some other OS to be able to "recover" the disk.
* This appears to be mostly due to Windows VDS cache (which Microsoft assures
should be able to do a proper job of refreshing itself on its own, in the same
stride as they also feel the need to introduce IVdsService::Refresh whose sole
purpose appears to work around a limitation that Microsoft knows exists) not
being in sync with the actual disk layout.
* So we now add calls to VDS layout refresh where needed, to work around the issue.
* Also fix an ext2fs Coverity warning.
* Factorize drive letter removal into a RemoveDriveLetters() call.
* Improve MountVolume() and RemountVolume() calls.
* Also bump Rufus version to 3.13
* Make sure that instantiated objects are released.
* Factorize the instantiating of disk interfaces.
* Allow the provision of an offset to delete a single partition.
* Add a ListVdsVolumes() call (which is pointless since Microsoft *CRIPPLED* its VDS implementation).
* SetAutoMount()/GetAutoMount() should check for INVALID_HANDLE_VALUE and not NULL.
Also we don't actually need to open MOUNTMGR_DOS_DEVICE_NAME rw to issue an IOCTL.
* ToggleEsp() failed to exit properly when an ESP offset was specified.
* Introduce PI_MAX to explicitly set the size of the partition_information table.
* write_sectors() has write retry, so there's no need to perform one on top of it.
* When we exit FormatThread(), GetLogicalName() should attempt to look for the the
main partition and be silent.
* Windows platforms prior to Windows 10 1703 cannot access any logical partition besides the
first one (we don't even get a volume for those).
* This fix enables the use of physical + offset for ext# formatting to work around this,
which is file since we don't actually need to mount the partition.
* Also fix ext2fs_open2() not handling normalized versions of Windows drive paths ("\\?\...")
* Also fix an issue where we would make the drive letter unavailable after formatting a
standalone partition to ext#.
* Also ensure that we return an error if the drive we attempt to locate a partition on
through an offset does not match the currently selected one.
* Also remove some unused calls in drive.c.
* Closes#1374
* Only UEFI boot for now (GRUB) & requires a post 2019.07.26 ISO for Ubuntu.
* This adds the relevant persistence/persistent kernel option to the conf file, sets the
expected volume label and creates a /persistence.conf file where needed.
* Also improve token parsing by ensuring a token is followed by at least one white space.
* Only enabled when Advanced format options are shown
* Also enable reading of extfs volume label
* Also improve GRUB lookup fallback
* Also fix possible truncation when sanitizing labels
* Also write a zeroed MBR when non-bootable is selected
* Add VDS formatting support (through an Alt-V cheat mode)
* Add partition index support
* Improve(?) Windows To Go support by following Microsoft recommended partition order
* Code refactoring & cleanup
* Add display of persistence controls on relevant images
* Add progress on ext3 formatting and improve error reporting
* Also improve MountVolume() and fix some Coverity warnings
* Not having FILE_SHARE_WRITE on a disk or volume handle helps
prevent spurious accesses from the OS or other apps while we
are repartitioning/refomatting.
* The root of the issue is that Windows IOCTL_DISK_CREATE_DISK does not properly
zero all of the MBR/GPT/PBR structure with PARTITION_STYLE_RAW (which is what
diskpart uses to clean a disk), and leaves plenty of partition artefacts behind.
* This means that, when an image with complex partitioning has been applied, such
as Chromium/ChromeOS, you may end up with a drive that can not be repartitioned
or reformatted in Windows (and this is completely independent of whether Rufus
was used to perform these operations - For instance you will get the same issue
if you use Win32DiskImager and diskpart + clean).
* The only option left for users then is to reset/repartition their drives in Linux
or some other OS, as Windows' VDS becomes incapacitated to handle the drive, as
the problem persists independently of reset/re-plug/Windows platform being used.
* To work around this, we ensure that we zero the MBR/GPT/PBR sectors BEFORE calling
IOCTL_DISK_CREATE_DISK.
* Also move zeroing of the drive before partition reset.
* Closes#759
* Ignore partitions we don't care about
* Fix issues with AltMountVolume()
* Try to support 4k drives when setting up MS EFI partition
* Zero the start of the MSR partition to prevent leftover detection
* Fix unwanted use of MBR hidden sectors and redundant CloseHandle()
* Fix addon of BIOS compatibility extra partition
* Print apply image progress to info box
* This allows no-sweat UEFI support of Windows installation ISOs
that contain a >4GB file for instance
* This is done through UEFI:TOGO (https://github.com/pbatard/uefi-togo)
and the efifs NTFS driver (http://efi.akeo.ie)
* Closes#414
* This will also be part of our implementation of #126
* Having AutoMount disabled when a Fixed drive is being used can
result in a failure during formatting (issue #386).
* Also set explicit FILE_ATTRIBUTE_NORMAL flag an normalize CreateFile usage
* Closes#386
* Add logic to mount/remount a DD image if it contains a partition we can handle
* Clear GPT structures before copying DD image in case it doesn't overwrites them
* Add a call to refresh the drive layout after copying a DD image
* Move the unlocking of logical drive further down. This may help with the
infamous "device in use by another process" error.
* Thanks to MS' shortsightedness, neither of IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS
or IOCTL_STORAGE_GET_DEVICE_NUMBER alone are enough to retrieve a disk number:
IOCTL_STORAGE_GET_DEVICE_NUMBER doesn't work for LVM drives and
IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS doesn't work for USB fixed drives, so we
must use both. Isn't it great?
* Closes#292
* Also fix an issue with hotplug due to WM_DEVICECHANGE being filtered out
* Also improve AnalyzeMBR() and prevent failure on WriteMBR
* Also fix a couple issues with ISO and Syslinux handling
* Also remove "smart" uncheck of disabled checkboxes - not worth it
* A new "ReactOS" is now available under "Create a bootable disk" when running in advanced mode.
* Using this option will install the ReactOS bootblocks (MBR & FAT PBR) _only_.
You can then copy freeldr.sys and freeldr.ini to make the drive bootable.
* Also move Rufus MBR installation to ms-sys, and remove mbr.bin resource.
* Also add Rufus MBR detection, remove duplicate records and display MBR type on drive detection
* Also move PBR and MBR analysis calls to drive.c and add a drive.h header
* Also make extraction of embedded loc file more robust