1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[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.
This commit is contained in:
Pete Batard 2024-02-09 16:59:28 +00:00
parent 0f23c47184
commit 15e3886499
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
3 changed files with 11 additions and 6 deletions

View file

@ -2383,7 +2383,7 @@ BOOL CreatePartition(HANDLE hDrive, int partition_style, int file_system, BOOL m
// Compute the offsets of the extra partitions (which we always align to a track)
last_offset = SelectedDrive.DiskSize;
if (partition_style == PARTITION_STYLE_GPT)
last_offset -= 33 * SelectedDrive.SectorSize;
last_offset -= 33ULL * SelectedDrive.SectorSize;
for (i = pi - 1; i > mi; i--) {
assert(SelectedDrive.Partition[i].Size < last_offset);
SelectedDrive.Partition[i].Offset = LO_ALIGN_X_TO_Y(last_offset - SelectedDrive.Partition[i].Size, bytes_per_track);

View file

@ -380,6 +380,11 @@ static void fix_config(const char* psz_fullpath, const char* psz_path, const cha
// Ubuntu 23.04 uses GRUB only with the above and does not use "maybe-ubiquity"
uprintf(" Added 'persistent' kernel option");
modified = TRUE;
} else if (replace_in_token_data(src, props->is_grub_cfg ? "linux" : "append",
"boot=casper", "boot=casper persistent", TRUE) != NULL) {
// Linux Mint uses boot=casper.
uprintf(" Added 'persistent' kernel option");
modified = TRUE;
} else if (replace_in_token_data(src, props->is_grub_cfg ? "linux" : "append",
"boot=live", "boot=live persistence", TRUE) != NULL) {
// Debian & derivatives are assumed to use 'boot=live' in

View file

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 232, 326
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Rufus 4.5.2110"
CAPTION "Rufus 4.5.2111"
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
@ -392,8 +392,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 4,5,2110,0
PRODUCTVERSION 4,5,2110,0
FILEVERSION 4,5,2111,0
PRODUCTVERSION 4,5,2111,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -411,13 +411,13 @@ BEGIN
VALUE "Comments", "https://rufus.ie"
VALUE "CompanyName", "Akeo Consulting"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "4.5.2110"
VALUE "FileVersion", "4.5.2111"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2024 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
VALUE "OriginalFilename", "rufus-4.5.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "4.5.2110"
VALUE "ProductVersion", "4.5.2111"
END
END
BLOCK "VarFileInfo"