Commit Graph

1659 Commits

Author SHA1 Message Date
Pete Batard fce645543f
[dev] add exception for Realtek card readers
* Also update copyright year to 2021
* Also update version for rufus-next
* Also set Win32 "A" APIs to UTF-8 and enable long paths in manifest
2021-01-06 19:27:31 +00:00
Pete Batard 8bb31f6ae2
[loc] fix Russian translation for KB/MB/GB...
* Closes #1660
* Also update GPT partition types and set UTF-8 codepage in .rc
2020-12-11 17:10:48 +00:00
Pete Batard 5876495938
v3.13 (build 1730) 2020-11-20 13:25:51 +00:00
Pete Batard 58edfc9d54
update UEFI:NTFS file system drivers to version 1.7 2020-11-19 20:12:04 +00:00
Pete Batard 630c508525
[ui] fix ability to toggle progress report during WIM image extraction
* Also add log progress report for compressed images
2020-11-14 19:38:56 +00:00
Pete Batard 29205b3a0e
[core] lock the logical drive when DeletePartition() fails
* Yeah, that's another SUPER EMPIRICAL behaviour you have to figure out
  the hard way when you try to use VDS. Thanks for nothing, Microsoft!
2020-11-13 18:06:50 +00:00
Pete Batard 460ab5dd73
[core] add log progress report when writing an image/zeroing a drive
* Also simplify a nonsensical condition in format_ext
2020-11-13 17:58:56 +00:00
Pete Batard 0e43c5f2ea
[vds] improve VDS error reporting 2020-11-13 17:51:48 +00:00
Pete Batard 35b0ab2470
[ui] add cheat mode (Alt-M) to ignore Boot Marker 2020-11-12 17:38:20 +00:00
Pete Batard 77b0d1d366
[ui] display marquee operations on taskbar 2020-11-10 19:46:53 +00:00
Pete Batard a9681c0c2a
[core] fix a possible crash in DeletePartition() with a blank disk
* For blank disks, GetVdsDiskInterface() may return success with a NULL pAdvancedDisk.
* Also silence the annoying "Failed to read label" error on ERROR_UNRECOGNIZED_VOLUME.
2020-11-10 17:30:49 +00:00
Pete Batard 9c71ac25d5
[badblocks] use 0x55 and 0xAA for less than 2 passes checks
* Should be more effective at detecting errors than 0x00 and 0xFF.
2020-11-10 17:24:52 +00:00
Pete Batard f8c951f3d7
[ext2fs] don't override FormatStatus on user cancel 2020-11-09 23:44:23 +00:00
Pete Batard 2538974318
[core] improve VDS calls
* Factorize error setting.
* Use break so as to not leak resources on error.
* Ensure that the error codes are set properly.
2020-11-09 16:48:53 +00:00
Pete Batard e8c717c394
[ui] always use fake units for proposed labels
* Also improve log messages
2020-11-03 12:49:08 +00:00
Pete Batard 65a0c2c42d
[core] reinstate locking of the logical drive when writing images
* When writing images such as tails, that contain a large ESP, Windows forcibly
  removes the media while we are writing it, unless we lock the logical drive.
* Also fix a Bled Coverity warning.
2020-10-28 21:41:43 +00:00
Pete Batard 69bf32dd33
[misc] fix some static analysis warnings
* Also improve fast-zeroing code and upgrade Bled to latest
2020-10-27 10:12:24 +00:00
Pete Batard f027e562b3
[core] work around Windows handling of ESP for removable drives
* Remove early locking of logical volume (no longer necessary due to previous commits).
* Relax exclusive locking of physical drive when an ESP is created.
* This should help with #1637 and #1640
* Also add an extra check for sector size in WriteDrive()
2020-10-26 13:50:19 +00:00
Pete Batard b2b621cec7
[core] improve mounting/unmounting of volumes
* Factorize drive letter removal into a RemoveDriveLetters() call.
* Improve MountVolume() and RemountVolume() calls.
* Also bump Rufus version to 3.13
2020-10-26 11:48:33 +00:00
Pete Batard 3758f84b17
[vds] improve VDS calls
* 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).
2020-10-25 13:09:32 +00:00
Pete Batard 8085a2846d
[misc] fix small issues
* 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.
2020-10-25 12:31:30 +00:00
Pete Batard a17ca005ce
[misc] add download counter to README 2020-10-14 17:11:09 +01:00
Pete Batard c842ef9023
v3.12 (build 1710) 2020-10-14 12:50:12 +01:00
Pete Batard 318d5ed16d
[iso] fix "ISO has not been properly scanned" error for some ISOs
* Make sure that if we skip a deep directory during scan, we count at
  least one block of data.
* Also produce a note about deep directory long scan times and improve
  the formatting of some messages.
2020-10-12 19:33:54 +01:00
Pete Batard 2d272b7991
[iso] fix md5sum.txt update for Ubuntu 20.10
* Ubuntu switched to using GRUB for BIOS, so our update_md5sum() code was not being called.
* Move update_md5sum() to being called unconditionally to fix this.
* Closes #1616 (again...)
2020-10-05 12:39:52 +01:00
Pete Batard f4c7f2963c
[misc] fix non-English messages appearing in the log 2020-10-02 17:24:17 +01:00
Pete Batard e6ac3782fe
[ext2fs] set a minimum ext partition size of 256 MB
* Not gonna bother with computing the effective minimum size so 256 MB will have to do.
* Closes #1576
2020-10-02 13:58:15 +01:00
Pete Batard e987272287
[grub] update GRUB 2.04 core.img for Ubuntu 20.10 support
* GRUB have cherry-picked patches from the "BootHole" vulnerability fix at
  https://lists.gnu.org/archive/html/grub-devel/2020-07/msg00034.html and
  have applied them to their 2.04 GRUB loader.
* This results in breakage with "error: symbol 'grub_calloc' not found" when
  using the release GRUB 2.04 version of core.img.
* Therefore, we too cherry-picked some patches to apply on top of GRUB 2.04
  release to make our core.img compatible with Ubuntu 20.10.
* Closes #1616
* Also increase the maximum write stride for ms-sys to 64 KB (required to
  write the GRUB 2.05 bootloader which is larger than 32 KB) and update hash DB.
2020-09-16 13:59:06 +01:00
Pete Batard 1bb2b3b126
[syslinux] disable MBR install for images using SysLinux 4.x with a >4 GB file
* The presence of a > 4 GB file forces the use of NTFS which is incompatible with
  SysLinux 4.x or earlier. As such, if an image uses SysLinux only, there's no
  point in enabling MBR as SysLinux won't boot.
* Required for ISOs such as securityonion-2.0.1-rc1.iso.
2020-09-15 21:02:08 +01:00
Pete Batard a8f3c6c572
[iso] fix detection of GRUB version
* Commit 77d319267f broke lookup of ISO filenames since iso9660_open()
  enabled the Rock Ridge extensions by default, despite using ISO_EXTENSION_NONE
  for the internal call, and we addressed a FIXME related to this.
* This resulted in Rufus not being able to lookup 'boot/grub/i386-pc/normal.mod' to parse GRUB's
  version, since without Rock Ridge, 'i386-pc/' is unable to match the ISO-9660 'I386_PC/' dir.
* Closes #1573 and addresses part of #1616.
* Also fix a MinGW compilation warning.
2020-09-11 22:45:47 +01:00
Tiago Filipe Silva 2d63a10920
[misc] lossless optimization of icons
* Closes #1608
2020-09-10 17:57:01 +01:00
Pete Batard ca70b4c213
[iso] fix 'internal error' notice due to bootriscv###.efi support
* These bootloaders will require LFN support. Since we don't expect that
  many people to create bootable media for RISC-V derived from bootloaders
  contained in a 'efi.img`, we simply ignore these for now.
2020-09-10 17:55:07 +01:00
Pete Batard f04ed61805
[ext2fs] use physical + offset always for extfs partition creation 2020-09-10 17:50:06 +01:00
Pete Batard 1e56c8812e
[togo] move ESP to the beginning of the drive on systems that allow it 2020-09-10 17:48:09 +01:00
Pete Batard b3caf638b6
[misc] miscellaneous code cleanup and fixes
* Don't use hDrive handle for longer than necessary
* Move all the popcount() function calls into missing.h
* Ensure that the thread_affinity[] array is properly sized
* Improve timeouts for conflicting process search
2020-09-09 17:00:39 +01:00
Fardin 7df88aa931
[misc] update README.md
* Closes #1603
2020-08-20 12:11:58 +01:00
Pete Batard 3f0d574657
[misc] improve ToggleEsp() call to take an offset
* Also fix a MinGW warning
2020-08-15 14:58:55 +01:00
Pete Batard ba406843f4
[core] work around a Windows bug where GetVolumePathNamesForVolumeName() can return the wrong drive letter
* A user is reporting that, on one of their platforms, Rufus is writing to the wrong target during the file-copy
  phase and using their existing Y: local drive instead of the drive associated to the USB, despite the fact
  that Rufus is passing the right volume name to GetVolumePathNamesForVolumeName().

* Here's the PowerShell wmic output, confirming that the volume GUID obtained by Rufus is the right one:

  DriveLetter : Y:
  DeviceId    : \\?\Volume{000349b1-17d0-69f6-c13f-f31162930600}\
  Capacity    : 118540464128
  FileSystem  : NTFS
  Label       : Y-DISK

  DriveLetter : H:
  DeviceId    : \\?\Volume{b150ff4a-d62b-11ea-86e3-f49634660e54}\
  Capacity    : 15791824896
  FileSystem  : FAT32
  Label       : ADATA16GB

* And here's the Rufus log demonstrating that GetVolumePathNamesForVolumeName() is returning the *WRONG* letter:

  Found volume \\?\Volume{b150ff4a-d62b-11ea-86e3-f49634660e54}\
  \\?\Volume{b150ff4a-d62b-11ea-86e3-f49634660e54}\ is already mounted as Y: instead of H: - Will now use this target instead...

* The last line shows, without the shadow of a doubt, that we did feed "\\?\Volume{b150ff4a-d62b-11ea-86e3-f49634660e54}\" to
  GetVolumePathNamesForVolumeName() and that this API call was successful (returned a non zero size) but ultimately returned
  the wrong letter (Y: instead of H:)...

* Therefore, Windows is BUGGY and the use of GetVolumePathNamesForVolumeName() must be avoided.
2020-08-13 14:49:34 +01:00
Pete Batard c2017ad659
[dev] add exception for SSDs sitting behind a VIA-Labs adapter
* Also adjust the sizes under and above which we consider a drive is UFD/HDD
2020-08-01 15:36:59 +01:00
Pete Batard 6f5ea5f88f
[efi] add RISC-V support
* Also fix Coverity warnings
2020-07-29 19:32:32 +01:00
Pete Batard 34b1d8a3ca
[core] enable the direct provision of install.wim/install.esd for Windows To Go
* Also remove the use of 'unattend.xml' to disable the recovery environment (use bcdedit instead)
* Also some code cleanup and refactoring
2020-07-19 22:35:30 +01:00
Pete Batard 4617f91e3b
[misc] introduce hImageOption and ComboBox_GetCurItemData() to simplify code
* Also add retry to ms-sys' write_sectors()
2020-07-17 21:51:15 +01:00
Pete Batard 09d2f2f0ab
[ui] add cheat mode (Alt +/-) to increase/decrease thread priority
* This *may* help improve write speeds if your system is starved for I/O
* Related to #968
2020-07-10 12:00:10 +01:00
Pete Batard c35a92cd0c
[iso] speed up scanning of ISOs with lots of deep directory entries
* ISOs with tons of Rock Ridge deep directory entries (such as OPNsense)
  can be very slow to scan due to the nature of deep directory parsing,
  which requires processing the whole ISO9660 fs, for each deep directory
  file, in order to find the relevant LSN entry.
* Since we don't expect much of the content we care about to reside in a
  deep directory entry, we amend the code to cut short the scan of any
  directory that contains such elements.
* Note that this only applies for ISO scan and it does nothing to speed
  up the ISO extraction process.
* Related to issue #1575
2020-07-06 17:30:20 +01:00
Pete Batard 500172a7a3
[core] fix format error when trying to use old BIOS fixes with VHDs
* And other improvements
* Closes #1409
2020-07-03 15:24:37 +01:00
Pete Batard 0dc13e5283
[ui] fix missing labels for accessibility
* Closes #1467
* Also ensure that previous element is set when repositioning a
  control to preserve tabbing order
* Also fix x64 version being able to download x86 BETA
2020-07-02 22:55:01 +01:00
Pete Batard 2d6a73e4f4
[checksum] enable toggling of SHA512 (Alt-H)
* Also fix overflow digest test into message length
* Also switch log font to Consolas
* Also update version to rufus-next
2020-06-25 11:58:56 +01:00
Pete Batard e011cc8201
[checksum] add SHA512 digest algorithm
* "Is it possible to learn this power?"
2020-06-24 14:08:24 +01:00
Pete Batard 11fb6ec013
[checksum] clean up hash computation
* Also fix a typo in missing.h
2020-06-22 18:37:10 +01:00
Pete Batard c4ee840fb6
[misc] fix Coverity upload - Take 3
* It was a missing @ sign for --form file=
2020-06-19 13:10:41 +01:00