Mageia Bugzilla – Attachment 10100 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 to have mkrescue write to grub2 dir
grub2-2.02-unity-mkrescue-use-grub2-dir.patch (text/plain), 6.59 KB, created by
Jeremiah Summers
on 2018-04-19 08:26:46 CEST
(
hide
)
Description:
Patch to have mkrescue write to grub2 dir
Filename:
MIME Type:
Creator:
Jeremiah Summers
Created:
2018-04-19 08:26:46 CEST
Size:
6.59 KB
patch
obsolete
>diff -Naur grub/util/grub-install.c grub_new/util/grub-install.c >--- grub/util/grub-install.c 2018-04-18 16:54:49.311544732 -0700 >+++ grub_new/util/grub-install.c 2018-04-18 16:51:27.856350416 -0700 >@@ -1611,7 +1611,7 @@ > case GRUB_INSTALL_PLATFORM_I386_IEEE1275: > case GRUB_INSTALL_PLATFORM_POWERPC_IEEE1275: > { >- char *dst = grub_util_path_concat (2, grubdir, "grub"); >+ char *dst = grub_util_path_concat (2, grubdir, "grub2"); > grub_install_copy_file (imgfile, dst, 1); > free (dst); > } >@@ -1806,7 +1806,7 @@ > } > break; > case GRUB_INSTALL_PLATFORM_MIPS_ARC: >- grub_install_sgi_setup (install_device, imgfile, "grub"); >+ grub_install_sgi_setup (install_device, imgfile, "grub2"); > break; > > case GRUB_INSTALL_PLATFORM_I386_EFI: >diff -Naur grub/util/grub-mkrescue.c grub_new/util/grub-mkrescue.c >--- grub/util/grub-mkrescue.c 2018-04-18 16:54:49.312544708 -0700 >+++ grub_new/util/grub-mkrescue.c 2018-04-18 16:43:33.981654629 -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"); >diff -Naur grub/util/grub-mkstandalone.c grub_new/util/grub-mkstandalone.c >--- grub/util/grub-mkstandalone.c 2018-04-18 16:54:49.312544708 -0700 >+++ grub_new/util/grub-mkstandalone.c 2018-04-18 16:52:19.223125069 -0700 >@@ -112,7 +112,7 @@ > > struct argp argp = { > options, argp_parser, N_("[OPTION] SOURCE..."), >- N_("Generate a standalone image (containing all modules) in the selected format")"\v"N_("Graft point syntax (E.g. /boot/grub/grub.cfg=./grub.cfg) is accepted"), >+ N_("Generate a standalone image (containing all modules) in the selected format")"\v"N_("Graft point syntax (E.g. /boot/grub2/grub.cfg=./grub.cfg) is accepted"), > NULL, help_filter, NULL > }; > >@@ -314,7 +314,7 @@ > enum grub_install_plat plat = grub_install_get_target (grub_install_source_directory); > > char *memdisk_dir = grub_util_make_temporary_dir (); >- char *boot_grub = grub_util_path_concat (3, memdisk_dir, "boot", "grub"); >+ char *boot_grub = grub_util_path_concat (3, memdisk_dir, "boot", "grub2"); > grub_install_copy_files (grub_install_source_directory, > boot_grub, plat); > >@@ -352,7 +352,7 @@ > grub_install_push_module ("tar"); > > grub_install_make_image_wrap (grub_install_source_directory, >- "(memdisk)/boot/grub", output_image, >+ "(memdisk)/boot/grub2", output_image, > memdisk_img, NULL, > grub_util_get_target_name (format), 0); >
diff -Naur grub/util/grub-install.c grub_new/util/grub-install.c --- grub/util/grub-install.c 2018-04-18 16:54:49.311544732 -0700 +++ grub_new/util/grub-install.c 2018-04-18 16:51:27.856350416 -0700 @@ -1611,7 +1611,7 @@ case GRUB_INSTALL_PLATFORM_I386_IEEE1275: case GRUB_INSTALL_PLATFORM_POWERPC_IEEE1275: { - char *dst = grub_util_path_concat (2, grubdir, "grub"); + char *dst = grub_util_path_concat (2, grubdir, "grub2"); grub_install_copy_file (imgfile, dst, 1); free (dst); } @@ -1806,7 +1806,7 @@ } break; case GRUB_INSTALL_PLATFORM_MIPS_ARC: - grub_install_sgi_setup (install_device, imgfile, "grub"); + grub_install_sgi_setup (install_device, imgfile, "grub2"); break; case GRUB_INSTALL_PLATFORM_I386_EFI: diff -Naur grub/util/grub-mkrescue.c grub_new/util/grub-mkrescue.c --- grub/util/grub-mkrescue.c 2018-04-18 16:54:49.312544708 -0700 +++ grub_new/util/grub-mkrescue.c 2018-04-18 16:43:33.981654629 -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"); diff -Naur grub/util/grub-mkstandalone.c grub_new/util/grub-mkstandalone.c --- grub/util/grub-mkstandalone.c 2018-04-18 16:54:49.312544708 -0700 +++ grub_new/util/grub-mkstandalone.c 2018-04-18 16:52:19.223125069 -0700 @@ -112,7 +112,7 @@ struct argp argp = { options, argp_parser, N_("[OPTION] SOURCE..."), - N_("Generate a standalone image (containing all modules) in the selected format")"\v"N_("Graft point syntax (E.g. /boot/grub/grub.cfg=./grub.cfg) is accepted"), + N_("Generate a standalone image (containing all modules) in the selected format")"\v"N_("Graft point syntax (E.g. /boot/grub2/grub.cfg=./grub.cfg) is accepted"), NULL, help_filter, NULL }; @@ -314,7 +314,7 @@ enum grub_install_plat plat = grub_install_get_target (grub_install_source_directory); char *memdisk_dir = grub_util_make_temporary_dir (); - char *boot_grub = grub_util_path_concat (3, memdisk_dir, "boot", "grub"); + char *boot_grub = grub_util_path_concat (3, memdisk_dir, "boot", "grub2"); grub_install_copy_files (grub_install_source_directory, boot_grub, plat); @@ -352,7 +352,7 @@ grub_install_push_module ("tar"); grub_install_make_image_wrap (grub_install_source_directory, - "(memdisk)/boot/grub", output_image, + "(memdisk)/boot/grub2", output_image, memdisk_img, NULL, grub_util_get_target_name (format), 0);
View Attachment As Raw
Actions:
View
Attachments on
bug 22918
:
10087
|
10093
|
10094
|
10095
|
10096
|
10097
| 10100 |
10112