Mageia Bugzilla – Attachment 10097 Details for
Bug 22918
grub2-mkrescue still searches /boot/grub for config
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
Patch to have mkrescue write to grub2
grub2-2.02-unity-mkrescue-use-grub2-dir.patch (text/plain), 4.42 KB, created by
Jeremiah Summers
on 2018-04-18 17:27:19 CEST
(
hide
)
Description:
Patch to have mkrescue write to grub2
Filename:
MIME Type:
Creator:
Jeremiah Summers
Created:
2018-04-18 17:27:19 CEST
Size:
4.42 KB
patch
obsolete
>--- a/util/grub-mkrescue.c 2018-04-17 23:49:24.443474449 -0700 >+++ a/util/grub-mkrescue.c_new 2018-04-18 08:06:42.376780974 -0700 >@@ -261,14 +261,14 @@ > > load_cfg_f = grub_util_fopen (load_cfg, "wb"); > fprintf (load_cfg_f, "search --fs-uuid --set=root %s\n", iso_uuid); >- fprintf (load_cfg_f, "set prefix=(${root})/boot/grub\n"); >+ fprintf (load_cfg_f, "set prefix=(${root})/boot/grub2\n"); > > write_part (load_cfg_f, source_dirs[plat]); > fclose (load_cfg_f); > > grub_install_push_module ("search"); > grub_install_push_module ("iso9660"); >- grub_install_make_image_wrap (source_dirs[plat], "/boot/grub", output, >+ grub_install_make_image_wrap (source_dirs[plat], "/boot/grub2", output, > 0, load_cfg, > mkimage_target, 0); > grub_install_pop_module (); >@@ -307,7 +307,7 @@ > fclose (load_cfg_f); > > grub_install_push_module ("iso9660"); >- grub_install_make_image_wrap (source_dirs[plat], "()/boot/grub", output, >+ grub_install_make_image_wrap (source_dirs[plat], "()/boot/grub2", output, > 0, load_cfg, mkimage_target, 0); > grub_install_pop_module (); > grub_util_unlink (load_cfg); >@@ -497,7 +497,7 @@ > > iso9660_dir = grub_util_make_temporary_dir (); > grub_util_info ("temporary iso9660 dir is `%s'", iso9660_dir); >- boot_grub = grub_util_path_concat (3, iso9660_dir, "boot", "grub"); >+ boot_grub = grub_util_path_concat (3, iso9660_dir, "boot", "grub2"); > grub_install_mkdir_p (boot_grub); > romdir = grub_util_path_concat (2, boot_grub, "roms"); > grub_util_mkdir (romdir); >@@ -591,12 +591,12 @@ > grub_install_push_module ("biosdisk"); > grub_install_push_module ("iso9660"); > grub_install_make_image_wrap (source_dirs[GRUB_INSTALL_PLATFORM_I386_PC], >- "/boot/grub", output, >+ "/boot/grub2", output, > 0, load_cfg, > "i386-pc-eltorito", 0); > > xorriso_push ("-b"); >- xorriso_push ("boot/grub/i386-pc/eltorito.img"); >+ xorriso_push ("boot/grub2/i386-pc/eltorito.img"); > xorriso_push ("-no-emul-boot"); > xorriso_push ("-boot-load-size"); > xorriso_push ("4"); >@@ -635,7 +635,7 @@ > fwrite (buf, 1, 512, sa); > > grub_install_make_image_wrap_file (source_dirs[GRUB_INSTALL_PLATFORM_I386_PC], >- "/boot/grub", sa, sysarea_img, >+ "/boot/grub2", sa, sysarea_img, > 0, load_cfg, > "i386-pc", 0); > sz = ftello (sa); >@@ -831,8 +831,8 @@ > grub_install_copy_file (grub_chrp, bootx, 1); > grub_install_mkdir_p (ppc_chrp); > grub_install_copy_file (bisrc, bitgt, 1); >- xorriso_link ("/System/Library/CoreServices/grub.elf", "/boot/grub/powerpc-ieee1275/core.elf"); >- xorriso_link ("/boot/grub/powerpc.elf", "/boot/grub/powerpc-ieee1275/core.elf"); >+ xorriso_link ("/System/Library/CoreServices/grub.elf", "/boot/grub2/powerpc-ieee1275/core.elf"); >+ xorriso_link ("/boot/grub2/powerpc.elf", "/boot/grub2/powerpc-ieee1275/core.elf"); > /* FIXME: add PreP */ > if (system_area == SYS_AREA_COMMON) > { >@@ -881,25 +881,25 @@ > xorriso_push ("-B"); > xorriso_push (","); > xorriso_push ("--grub2-sparc-core"); >- xorriso_push ("/boot/grub/sparc64-ieee1275/core.img"); >+ xorriso_push ("/boot/grub2/sparc64-ieee1275/core.img"); > } > > make_image_fwdisk (GRUB_INSTALL_PLATFORM_MIPS_ARC, "mips-arc", "mips-arc/core.img"); > > if (source_dirs[GRUB_INSTALL_PLATFORM_MIPS_ARC]) > { >- xorriso_link ("/boot/grub/mips-arc/grub", "/boot/grub/mips-arc/core.img"); >- xorriso_link ("/boot/grub/mips-arc/sashARCS", "/boot/grub/mips-arc/core.img"); >- xorriso_link ("/boot/grub/mips-arc/sash", "/boot/grub/mips-arc/core.img"); >+ xorriso_link ("/boot/grub2/mips-arc/grub", "/boot/grub2/mips-arc/core.img"); >+ xorriso_link ("/boot/grub2/mips-arc/sashARCS", "/boot/grub2/mips-arc/core.img"); >+ xorriso_link ("/boot/grub2/mips-arc/sash", "/boot/grub2/mips-arc/core.img"); > } > if (source_dirs[GRUB_INSTALL_PLATFORM_MIPS_ARC] && system_area == SYS_AREA_ARCS) > { > xorriso_push ("-mips-boot"); >- xorriso_push ("/boot/grub/mips-arc/sashARCS"); >+ xorriso_push ("/boot/grub2/mips-arc/sashARCS"); > xorriso_push ("-mips-boot"); >- xorriso_push ("/boot/grub/mips-arc/sash"); >+ xorriso_push ("/boot/grub2/mips-arc/sash"); > xorriso_push ("-mips-boot"); >- xorriso_push ("/boot/grub/mips-arc/grub"); >+ xorriso_push ("/boot/grub2/mips-arc/grub"); > } > > make_image_fwdisk (GRUB_INSTALL_PLATFORM_MIPSEL_ARC, "mipsel-arc", "arc.exe");
--- a/util/grub-mkrescue.c 2018-04-17 23:49:24.443474449 -0700 +++ a/util/grub-mkrescue.c_new 2018-04-18 08:06:42.376780974 -0700 @@ -261,14 +261,14 @@ load_cfg_f = grub_util_fopen (load_cfg, "wb"); fprintf (load_cfg_f, "search --fs-uuid --set=root %s\n", iso_uuid); - fprintf (load_cfg_f, "set prefix=(${root})/boot/grub\n"); + fprintf (load_cfg_f, "set prefix=(${root})/boot/grub2\n"); write_part (load_cfg_f, source_dirs[plat]); fclose (load_cfg_f); grub_install_push_module ("search"); grub_install_push_module ("iso9660"); - grub_install_make_image_wrap (source_dirs[plat], "/boot/grub", output, + grub_install_make_image_wrap (source_dirs[plat], "/boot/grub2", output, 0, load_cfg, mkimage_target, 0); grub_install_pop_module (); @@ -307,7 +307,7 @@ fclose (load_cfg_f); grub_install_push_module ("iso9660"); - grub_install_make_image_wrap (source_dirs[plat], "()/boot/grub", output, + grub_install_make_image_wrap (source_dirs[plat], "()/boot/grub2", output, 0, load_cfg, mkimage_target, 0); grub_install_pop_module (); grub_util_unlink (load_cfg); @@ -497,7 +497,7 @@ iso9660_dir = grub_util_make_temporary_dir (); grub_util_info ("temporary iso9660 dir is `%s'", iso9660_dir); - boot_grub = grub_util_path_concat (3, iso9660_dir, "boot", "grub"); + boot_grub = grub_util_path_concat (3, iso9660_dir, "boot", "grub2"); grub_install_mkdir_p (boot_grub); romdir = grub_util_path_concat (2, boot_grub, "roms"); grub_util_mkdir (romdir); @@ -591,12 +591,12 @@ grub_install_push_module ("biosdisk"); grub_install_push_module ("iso9660"); grub_install_make_image_wrap (source_dirs[GRUB_INSTALL_PLATFORM_I386_PC], - "/boot/grub", output, + "/boot/grub2", output, 0, load_cfg, "i386-pc-eltorito", 0); xorriso_push ("-b"); - xorriso_push ("boot/grub/i386-pc/eltorito.img"); + xorriso_push ("boot/grub2/i386-pc/eltorito.img"); xorriso_push ("-no-emul-boot"); xorriso_push ("-boot-load-size"); xorriso_push ("4"); @@ -635,7 +635,7 @@ fwrite (buf, 1, 512, sa); grub_install_make_image_wrap_file (source_dirs[GRUB_INSTALL_PLATFORM_I386_PC], - "/boot/grub", sa, sysarea_img, + "/boot/grub2", sa, sysarea_img, 0, load_cfg, "i386-pc", 0); sz = ftello (sa); @@ -831,8 +831,8 @@ grub_install_copy_file (grub_chrp, bootx, 1); grub_install_mkdir_p (ppc_chrp); grub_install_copy_file (bisrc, bitgt, 1); - xorriso_link ("/System/Library/CoreServices/grub.elf", "/boot/grub/powerpc-ieee1275/core.elf"); - xorriso_link ("/boot/grub/powerpc.elf", "/boot/grub/powerpc-ieee1275/core.elf"); + xorriso_link ("/System/Library/CoreServices/grub.elf", "/boot/grub2/powerpc-ieee1275/core.elf"); + xorriso_link ("/boot/grub2/powerpc.elf", "/boot/grub2/powerpc-ieee1275/core.elf"); /* FIXME: add PreP */ if (system_area == SYS_AREA_COMMON) { @@ -881,25 +881,25 @@ xorriso_push ("-B"); xorriso_push (","); xorriso_push ("--grub2-sparc-core"); - xorriso_push ("/boot/grub/sparc64-ieee1275/core.img"); + xorriso_push ("/boot/grub2/sparc64-ieee1275/core.img"); } make_image_fwdisk (GRUB_INSTALL_PLATFORM_MIPS_ARC, "mips-arc", "mips-arc/core.img"); if (source_dirs[GRUB_INSTALL_PLATFORM_MIPS_ARC]) { - xorriso_link ("/boot/grub/mips-arc/grub", "/boot/grub/mips-arc/core.img"); - xorriso_link ("/boot/grub/mips-arc/sashARCS", "/boot/grub/mips-arc/core.img"); - xorriso_link ("/boot/grub/mips-arc/sash", "/boot/grub/mips-arc/core.img"); + xorriso_link ("/boot/grub2/mips-arc/grub", "/boot/grub2/mips-arc/core.img"); + xorriso_link ("/boot/grub2/mips-arc/sashARCS", "/boot/grub2/mips-arc/core.img"); + xorriso_link ("/boot/grub2/mips-arc/sash", "/boot/grub2/mips-arc/core.img"); } if (source_dirs[GRUB_INSTALL_PLATFORM_MIPS_ARC] && system_area == SYS_AREA_ARCS) { xorriso_push ("-mips-boot"); - xorriso_push ("/boot/grub/mips-arc/sashARCS"); + xorriso_push ("/boot/grub2/mips-arc/sashARCS"); xorriso_push ("-mips-boot"); - xorriso_push ("/boot/grub/mips-arc/sash"); + xorriso_push ("/boot/grub2/mips-arc/sash"); xorriso_push ("-mips-boot"); - xorriso_push ("/boot/grub/mips-arc/grub"); + xorriso_push ("/boot/grub2/mips-arc/grub"); } make_image_fwdisk (GRUB_INSTALL_PLATFORM_MIPSEL_ARC, "mipsel-arc", "arc.exe");
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 22918
:
10087
|
10093
|
10094
|
10095
|
10096
|
10097
|
10100
|
10112