Commit Graph

2118 Commits

Author SHA1 Message Date
Pete Batard a59389e1e1
[misc] move hash definitions to rufus.h
* Also always add an extra NUL to read_file(), some additional macros in missing.h
  and fix some warnings in process.c.
2024-03-27 19:02:24 +00:00
Pete Batard d3f78c4e01
[efi] update UEFI:NTFS to latest
* Also fix missing original translator for Korean and remove an unwanted warning message.
2024-03-25 18:56:23 +00:00
Pete Batard 5eae8a6441
[cmp] Enable extraction of zip archives outside of ISO copy mode
* This enables the use of Ctrl-SELECT to also extract files from a .zip
  when using non-bootable, DOS, UEFI-NTFS, etc.
* Also clean up some uprintf line terminations and some additional code.
* Also fix some Coverity and MinGW warnings.
2024-03-12 17:41:27 +00:00
Pete Batard abc33122a0
[iso] increase write buffer size to work around a bug in the AMI UEFI NTFS driver
* The AMI UEFI NTFS driver (version 0x10000), which is used in many modern systems from
  ASUS, Gigabyte, intel and so on, has a major bug whereas depending on the size of the
  buffers that are used to write the data onto the NTFS volume from Windows, as well as
  read the data from the NTFS volume from UEFI, the data being read may be incorrect
  (for details on this, see https://github.com/pbatard/AmiNtfsBug).
* Especially, it appears that if the size of the buffer used to write data on Windows is
  smaller than the NTFS cluster size, the bug may be triggered.
* Because of this, we increase the size of ISO write buffer to 64 KB since, per
  https://support.microsoft.com/en-gb/topic/default-cluster-size-for-ntfs-fat-and-exfat-9772e6f1-e31a-00d7-e18f-73169155af95
  this is the maximum cluster size that can be used for NTFS volumes.
* This increase in size should also help with performance somewhat.
* Also add support for C11's _Static_assert() which may come handy.
2024-03-12 12:53:30 +00:00
Pete Batard 8738e7a7de
[vhd] fix truncated write operation when using a VHDX image as source
* The legacy code we used for writing disk images used the size of the source image as
  the maximum number of bytes we should copy, which is fine for uncompressed DD or VHD
  images, but not so much for compressed VHDX ones. So we now make sure to use the
  actual size of the virtual disk, which we obtain when mounting the VHD/VHDX.
* Also fix log progress update as well as a MinGW warning.
2024-03-04 00:49:57 +00:00
Bella Zhang 026afa7e3d
[iso] add Circle Linux to the list of Red-Hat derivatives
* Closes #2414.
2024-02-09 17:04:40 +00:00
Pete Batard 172888ac32
[dos] fix a CodeQL warning and harmonize code 2024-02-09 17:00:42 +00:00
Pete Batard 15e3886499
[iso] enable persistence support for Linux Mint
* Mint users sure are lucky that one of them *lied their way through* pretending that
  persistence actually used to work with previous version of Mint, when it never did,
  because they got us going through a whole refactor of the partition creation process
  just so we could make Mint persistence work.
* Closes #2428.
* Also fix a Coverity warning.
2024-02-09 16:59:28 +00:00
Pete Batard 0f23c47184
[misc] refactor partition creation 2024-02-08 14:17:03 +00:00
Pete Batard 164d4b0ab0
[misc] update workflows to use upload-artifact@v4
* See actions/upload-artifact#483, actions/upload-artifact#472#issuecomment-1861571655
  and ultimately https://github.com/actions/upload-artifact/blob/main/merge/README.md.
2024-02-07 20:11:09 +00:00
Pete Batard 1be7eaf306
[net] fix Fido script not being able to be launched again on user cancel
* Also update workflows to latest setup-msbuild
* Closes #2419
2024-02-07 19:24:17 +00:00
Pete Batard ac9a3f42d8
[misc] fix revoked bootloaders message does not display when using MBR
* Also update version to rufus-next
2024-02-06 20:02:36 +00:00
Pete Batard c2b2624b62
[vhd] improve handing of user selected filename on save to VHD/FFU
* Use of '*.*' as pattern in file save dialog could lead to assert and crash, so
  we now try to derive the type of image to be saved from the file extension. We
  also did not properly handle user cancellation in the file save dialog.
* Also update iso9660/iso9660_fs.c to latest proposal of El Torito image handling.
* Also add a couple asserts in the hash table functions so that, if these ever get
  triggered we will pick them from Windows Store reports, and clean up code.
2024-02-03 18:39:44 +00:00
Pete Batard 018ed3414b
[iso] improve El Torito image handling
* Update to latest libcdio proposal and fix incorrect image size.
* Also remove unnecessary calls in packme.cmd.
2024-01-24 17:51:40 +00:00
Pete Batard f6fd520d2a
[appstore] prevent packaging of ALPHA or BETA versions
* Also add package version override
2024-01-18 14:24:53 +00:00
Pete Batard b63f9ae93c
Rufus 4.4 (Build 2103) 2024-01-17 14:11:50 +00:00
Pete Batard fff39c56e8
[misc] fix UEFI:NTFS partition not being added when needed in MBR mode
* Also add support for SD card readers identifying themselves as SDXC.
2024-01-17 14:10:46 +00:00
Pete Batard 710bfe7f4d
[iso] work around ISOs that use broken symbolic links for UEFI bootloaders
* Per linuxmint/linuxmint#622 some ISOs may have a /EFI/boot/bootx64.efi that
  is a symbolic to a nonexisting file.
* This is originally due to a Debian bug that was fixed in:
  5bff71fea2
* Work around this by trying to extract a working bootx64.efi from the El-Torito image.
* Also improve DumpFatDir() to not replace already existing files.
2024-01-16 17:27:37 +00:00
Pete Batard ae6732c07b
[iso] add basic El-Torito image parsing to libcdio
* Based on El-Torito specs found at https://pdos.csail.mit.edu/6.828/2014/readings/boot-cdrom.pdf.
* Follows 7-zip's virtual '[BOOT]/#...' naming conventions (though we don't check for the full name).
* Limited to 8 NoEmul images.
2024-01-16 17:21:32 +00:00
Fred 2cebf914fd
[fat] align start of data region to MB
* Closes #2387
2024-01-10 13:36:50 +00:00
Pete Batard 70e87482c1
[misc] add some more Windows edition names
* Closes #2380
* Also fix a typo in the Norwegian translation, with thanks to @Legendarion
* Closes #2397
2024-01-10 12:53:07 +00:00
Pete Batard ebe01cc7b6
[dev] filter out Microsoft Dev Drives
* Microsoft Dev Drives are VHDs consisting of a small MSR followed by a large (50 GB or more)
  ReFS partition. See https://learn.microsoft.com/en-us/windows/dev-drive/.
* Closes #2395.
2024-01-08 16:43:52 +00:00
Pete Batard 51569d9e13
[misc] silence Coverity warnings
* Also update copyright year and improve uprintf error handling
* Also bump GitHub Actions dependencies. Note that we do NOT want to update to
  upload-artifact v4 because it BREAKS the creation of artifacts from matrix.
  See: https://github.com/actions/upload-artifact#v4---whats-new
* Closes #2382
* Closes #2383
2024-01-08 14:34:57 +00:00
dependabot[bot] 965d82c425
bump dessant/lock-threads from 4 to 5 (#2359)
Bumps [dessant/lock-threads](https://github.com/dessant/lock-threads) from 4 to 5.
- [Release notes](https://github.com/dessant/lock-threads/releases)
- [Changelog](https://github.com/dessant/lock-threads/blob/main/CHANGELOG.md)
- [Commits](https://github.com/dessant/lock-threads/compare/v4...v5)

---
updated-dependencies:
- dependency-name: dessant/lock-threads
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-25 18:24:40 +00:00
johnloopi b6d14d46df
[loc] Fixed typo in Norwegian translation
* Closes #2351
2023-11-14 12:13:49 +00:00
Pete Batard 89c1f8a72c
[iso] add BIOS support for Artix Linux
* Unfortunately, the Artix maintainers decided *NOT* to include the fat
  GRUB module for UEFI, so this will only work for BIOS boot...
2023-11-09 18:06:06 +00:00
Pete Batard e0b5c6d96f
[misc] improve the code related to the commandline hogger deletion
* Also small additional code improvements
2023-11-09 17:39:38 +00:00
Pete Batard 58c56eb398
[vhd] fix a crash when saving .ffu images with release version
* Also update Rufus next to 4.4
2023-10-27 22:45:24 +02:00
Pete Batard 020e0b7c3a
Rufus 4.3 (Build 2090)
* Also fix a CodeQL warning in process.c
2023-10-19 10:31:19 +01:00
Pete Batard 8edb487ac9
[misc] update ChangeLog for 4.3 BETA
* Also minor code cleanups and improvements.
2023-10-12 19:46:10 +01:00
Pete Batard 1630e912d4
[iso] add exception for Mint's LMDE
* Mint have decided to make their installation rely on a working /live/ ➔ /casper/ symlink for LMDE
  thereby breaking the promise of File System Transposition that all Debian derivatives should have.
* Because of this, trying to use FAT32 with LMDE will fail, as reported in linuxmint/live-installer#152.
* Therefore, now that we can replicate symlinks on NTFS, we add an exception to always enforce the use
  of NTFS for LMDE.
2023-10-12 18:28:56 +01:00
Pete Batard e9d588a6e0
[iso] add symlink support for target file systems that support it
* For now that means only NTFS. And we only do that for ISO-9660/Rock Ridge images.
2023-10-12 17:32:20 +01:00
Pete Batard 0bd38abd4e
[syslinux] improve support for Syslinux based Slax ISOs
* For some weird reason appending the base directory to the root syslinux.cfg
  we create does not appear to work with Slax. So we now always patch ldlinux.sys
  to include the base directory.
* Also add an exception to move the /slax/boot/EFI directory to /EFI.
* It should be noted that, as of slax-64bit-slackware-15.0.3.iso, the Slax UEFI
  Syslinux bootloaders appear to be broken (since creating a media without using
  Rufus at all per the Slax documentation does *not* produce a USB drive that was
  bootable in UEFI mode on 2 of the machines I tried).
* Also clean up some iso.c code and fix some unreachable code in ntfssect.c.
* Closes #2336.
* Closes #2338.
2023-10-11 20:46:46 +01:00
Pete Batard 45a5f22d43
[process] move the search for conflicting process to a background thread
* Removes the annoyance of having to wait for the process search to complete before media creation can start.
* Also update the "Process Hacker" references to its new "System Informer" name.
2023-10-10 22:22:45 +01:00
Pete Batard 8859c59548
[iso] count Rock Ridge duplicated files into the total size to process
* Duplicated symlinked Rock Ridge files were not counted into the total size needed
  to process the image and as a result, progress could go over 100% when extracting
  data (e.g. debian-live-12.1.0-amd64-lxqt.iso).
* Fix this by adding the duplicated files twice in the total block size.
2023-09-23 17:07:55 +01:00
Pete Batard 1fc790295c
[efi] update UEFI:NTFS to latest
* Add Windows bootmgr detection to report a more explicit error on security issues.
2023-09-08 17:33:25 +01:00
Pete Batard 99bffe8364
[misc] add '.wic' to the list of default image extensions
* '.wic' are DD images used by the Yocto project.
* Why Yocto chose to use their own extension instead of using the de-facto '.img' is beyond me but hey...
* Also update GitHub Actions dependencies to latest.
* Closes #2319.
2023-09-08 17:14:09 +01:00
Pete Batard 98725a0d5f
[misc] fix improper processing of net related errors
* With thanks to @Wack0
* Also silence a Coverity warning
2023-09-08 16:58:41 +01:00
Pete Batard 94ecf74c5f
[misc] use FORMAT_MESSAGE_FROM_HMODULE where possible and drop our custom message tables 2023-09-04 11:41:35 +01:00
Pete Batard d5bf53054b
[misc] improve retrieval of core directories
* This *might* help with the issue reported in #2296.
2023-08-28 11:08:03 +01:00
Pete Batard 866aa22a8b
[iso] fix Debian 12 Live not using persistence in BIOS mode
* The Isolinux/Syslinux append line has been moved to /isolinux/live.cfg
  so make sure we patch that file when persistence is enabled.
2023-08-27 23:03:43 +01:00
Pete Batard 9c6b1ad977
[vhd] fix Rufus being unable to open .vhd images
* Due to a typo in vhd.c where the second safe_stricmp() should be against ".vhd" and not ".vhdx" again.
* Also enable the ignore boot marker bypass for VHD/VHDX/FFU and don't misreport those images as
  "compressed disk images".
* Closes #2309.
2023-08-20 13:12:38 +01:00
Pete Batard 5b6574d6f6
[misc] add S Mode detection to Windows version reporting
* With thanks to @Wack0
2023-08-18 17:38:12 +01:00
Pete Batard c5ad16fdeb
[wue] add an expert feature to restrict a Windows installation to S Mode
* This is placed behind an expert wall (Ctrl-Alt-E) on account that:
  - If you happen to boot a Windows To Go drive in S Mode on a computer, it may set any
    existing Windows installation there to S Mode as well, *even if their disk is offline!*
  - It can be *exceedingly* tricky to get out of S Mode, as the SkuPolicyRequired registry
    trick alone may not be enough (i.e. You can have very much a Windows install in S Mode
    *without* SkuPolicyRequired being set anywhere).
* Also set version to rufus-next and fix a ChangeLog typo.
2023-08-15 11:15:16 +01:00
Pete Batard 5084317dd7
Rufus 4.2 (Build 2074)
* Also update UEFI:NTFS's NTFS driver to v1.7
2023-07-26 12:54:49 +01:00
AJIOB b81b440a20
[uefi] fix search for bootloaders in FAT images that have an 'EFI' volume label
* Per https://en.wikipedia.org/wiki/Design_of_the_FAT_file_system#Directory_entry it
  is possible to have a FAT directory entry with a 'EFI' volume label alongside with
  a 'EFI' subdirectory.
* If that happens, then the current Syslinux libfat_searchdir() code may treat the
  'EFI' volume label as an empty subdirectory and say that there are no bootloaders,
  even if the 'EFI\Boot\Boot###.efi' binaries really do exist.
* Fix this by filtering out entries with the 'volume label' attribute (0x08).
* For good measure, also filter out entries with the 'device' attribute (0x40), as
  it is technically possible to create a 'EFI' device leading to the same issue.
* Closes #2288.
* Closes #2289.
2023-07-24 23:55:47 +01:00
Pete Batard 64e85ed09a
[uefi] don't revoke Windows 11 or post Windows 10 20H1 boot media yet
* As opposed to what we originally asserted, Microsoft did enact a blanket revocation
  in SkuSiPolicy.p7b for all post 1703 up to 2305 Windows UEFI bootloaders.
* As a result, unconditionally copying SkuSiPolicy.p7b will result in media as recent
  as Windows 11 22H2 (v1) being flagged as revoked, which we don't want to enforce as
  long as Microsoft themselves haven't entered the enforcing phase of their Black
  Lotus mitigation (currently planned for early 2024).
* Because of this, while we add some revocation detection for post 1703 bootloaders,
  we set it to only go as far as 20H1 for now, which means that all post 20H1 Windows
  10 media and all Windows 11 media will not yet be flagged by Rufus as revoked and
  will still boot in a Secure Boot environment due to lack of an SkuSiPolicy.p7b.
* Ultimately, per #2244 we may look for a BOOTMGRSECURITYVERSIONNUMBER resource to
  blanket revoke all post 1703 - pre 2305 Windows UEFI bootloaders.
* Also remove the now unused comdlg32 library from the linker.
2023-07-15 23:20:59 +02:00
Pete Batard 3329304e67
[grub] update DB for GRUB 2.12~rc1
* Also fix some Coverity warnings in stdlg.c.
2023-07-13 10:11:52 +02:00
Pete Batard 65b84ea99d
[loc] update French translation 2023-07-10 12:40:55 +02:00
Pete Batard 5191c68337
[ui] keep user preferred image type when saving drive to VHD
* Also fix a Coverity warning and use a better description for SELECT image types.
2023-07-10 11:34:50 +02:00