mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[iso] fix persistence option not being added for Ubuntu 24.04
* Ubuntu changed their GRUB config format yet again, so our search for the kernel config no longer works, and the 'persistent' option doesn't get added. * Switch to a more generic '/casper/vmlinuz' search, though it might have unintended consequences... * Also fix a possible double free in FormatExtFs().
This commit is contained in:
parent
83e0bdad7a
commit
2a6df95cad
3 changed files with 12 additions and 9 deletions
|
@ -491,7 +491,10 @@ BOOL FormatExtFs(DWORD DriveIndex, uint64_t PartitionOffset, DWORD BlockSize, LP
|
||||||
|
|
||||||
// Finally we can call close() to get the file system gets created
|
// Finally we can call close() to get the file system gets created
|
||||||
r = ext2fs_close(ext2fs);
|
r = ext2fs_close(ext2fs);
|
||||||
if (r != 0) {
|
if (r == 0) {
|
||||||
|
// Make sure ext2fs isn't freed twice
|
||||||
|
ext2fs = NULL;
|
||||||
|
} else {
|
||||||
SET_EXT2_FORMAT_ERROR(ERROR_WRITE_FAULT);
|
SET_EXT2_FORMAT_ERROR(ERROR_WRITE_FAULT);
|
||||||
uprintf("Could not create %s volume: %s", FSName, error_message(r));
|
uprintf("Could not create %s volume: %s", FSName, error_message(r));
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
@ -384,9 +384,9 @@ static void fix_config(const char* psz_fullpath, const char* psz_path, const cha
|
||||||
if ((props->is_grub_cfg) && replace_in_token_data(src, "linux",
|
if ((props->is_grub_cfg) && replace_in_token_data(src, "linux",
|
||||||
"maybe-ubiquity", "", TRUE))
|
"maybe-ubiquity", "", TRUE))
|
||||||
uprintf(" Removed 'maybe-ubiquity' kernel option");
|
uprintf(" Removed 'maybe-ubiquity' kernel option");
|
||||||
} else if (replace_in_token_data(src, "linux", "layerfs-path=minimal.standard.live.squashfs",
|
} else if (replace_in_token_data(src, "linux", "/casper/vmlinuz",
|
||||||
"persistent layerfs-path=minimal.standard.live.squashfs", TRUE) != NULL) {
|
"/casper/vmlinuz persistent", TRUE) != NULL) {
|
||||||
// Ubuntu 23.04 uses GRUB only with the above and does not use "maybe-ubiquity"
|
// Ubuntu 23.04 and 24.04 use GRUB only with the above and don't use "maybe-ubiquity"
|
||||||
uprintf(" Added 'persistent' kernel option");
|
uprintf(" Added 'persistent' kernel option");
|
||||||
modified = TRUE;
|
modified = TRUE;
|
||||||
} else if (replace_in_token_data(src, props->is_grub_cfg ? "linux" : "append",
|
} else if (replace_in_token_data(src, props->is_grub_cfg ? "linux" : "append",
|
||||||
|
|
10
src/rufus.rc
10
src/rufus.rc
|
@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||||
IDD_DIALOG DIALOGEX 12, 12, 232, 326
|
IDD_DIALOG DIALOGEX 12, 12, 232, 326
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
EXSTYLE WS_EX_ACCEPTFILES
|
EXSTYLE WS_EX_ACCEPTFILES
|
||||||
CAPTION "Rufus 4.5.2147"
|
CAPTION "Rufus 4.5.2148"
|
||||||
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
|
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
|
||||||
BEGIN
|
BEGIN
|
||||||
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
|
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
|
||||||
|
@ -397,8 +397,8 @@ END
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 4,5,2147,0
|
FILEVERSION 4,5,2148,0
|
||||||
PRODUCTVERSION 4,5,2147,0
|
PRODUCTVERSION 4,5,2148,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -416,13 +416,13 @@ BEGIN
|
||||||
VALUE "Comments", "https://rufus.ie"
|
VALUE "Comments", "https://rufus.ie"
|
||||||
VALUE "CompanyName", "Akeo Consulting"
|
VALUE "CompanyName", "Akeo Consulting"
|
||||||
VALUE "FileDescription", "Rufus"
|
VALUE "FileDescription", "Rufus"
|
||||||
VALUE "FileVersion", "4.5.2147"
|
VALUE "FileVersion", "4.5.2148"
|
||||||
VALUE "InternalName", "Rufus"
|
VALUE "InternalName", "Rufus"
|
||||||
VALUE "LegalCopyright", "<22> 2011-2024 Pete Batard (GPL v3)"
|
VALUE "LegalCopyright", "<22> 2011-2024 Pete Batard (GPL v3)"
|
||||||
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
|
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
|
||||||
VALUE "OriginalFilename", "rufus-4.5.exe"
|
VALUE "OriginalFilename", "rufus-4.5.exe"
|
||||||
VALUE "ProductName", "Rufus"
|
VALUE "ProductName", "Rufus"
|
||||||
VALUE "ProductVersion", "4.5.2147"
|
VALUE "ProductVersion", "4.5.2148"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
Loading…
Reference in a new issue