Split 3: boot script support
PATCH 1/1 Split 3: boot script support
Hi,
This patch allows grub-mkimage to embed a boot script in core.img, which would be executed by the rescue parser before switching to normal mode.
Signature · 1 line
Bean
include/grub/kernel.h +1 -0
@@ -31,6 +31,7 @@ struct grub_module_header {OBJ_TYPE_ELF ,OBJ_TYPE_MEMDISK , + OBJ_TYPE_CONFIG } grub_module_header_types;/* The size of object (including this header). */
kern/main.c +19 -0
@@ -74,6 +74,24 @@ grub_load_modules (void)grub_module_iterate (hook); } +static void +grub_load_config (void ) +{ + autoint hook (struct grub_module_header *); +int hook (struct grub_module_header *header) + { +/* Not an ELF module, skip. */ +if (header->type !=OBJ_TYPE_CONFIG ) +return 0 ; + +grub_parser_execute ((char *) header + +sizeof (struct grub_module_header )); +return 1 ; + } + +grub_module_iterate (hook); +} +/* Write hook for the environment variables of root. Remove surrounding parentheses, if any. */ static char *
@@ -153,6 +171,7 @@ grub_main (void)grub_register_rescue_parser ();grub_register_rescue_reader (); +grub_load_config ();grub_load_normal_mode ();grub_reader_loop (0 ); }
util/i386/pc/grub-mkimage.c +38 -4
99 lines not on this page · raw message
Hello, I find this useful. It permits e.g. to have root by uuid.
Quoted 1 line
/* Not an ELF module, skip. */
This comment is out of sync
Quoted 14 lines · Bean
Hi,
This patch allows grub-mkimage to embed a boot script in core.img, which would be executed by the rescue parser before switching to normal mode.
------------------------------------------------------------------------
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 2 lines
Regards Vladimir 'phcoder' Serbinenko
Hi,
Since the script split patch has been committed, this one should be quite trivial. I'd commit it in a few days if there is no objection.
Quoted 34 lines · phcoder
Hello, I find this useful. It permits e.g. to have root by uuid.
Quoted 1 line
/* Not an ELF module, skip. */
This comment is out of sync
Quoted 9 lines · Bean
Hi,
This patch allows grub-mkimage to embed a boot script in core.img, which would be executed by the rescue parser before switching to normal mode.
Quoted 6 lines
------------------------------------------------------------------------
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel--
Regards
Vladimir 'phcoder' Serbinenko_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 1 line
Bean
Hi,
Committed.
Quoted 46 lines · Bean
Hi,
Since the script split patch has been committed, this one should be quite trivial. I'd commit it in a few days if there is no objection.
Quoted 25 lines · phcoder
Hello, I find this useful. It permits e.g. to have root by uuid.
Quoted 1 line
/* Not an ELF module, skip. */
This comment is out of sync
Quoted 9 lines · Bean
Hi,
This patch allows grub-mkimage to embed a boot script in core.img, which would be executed by the rescue parser before switching to normal mode.
Quoted 6 lines
------------------------------------------------------------------------
_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel--
Quoted 9 lines
Regards
Vladimir 'phcoder' Serbinenko_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel--
Bean
Signature · 1 line
Bean