Hello. I wrote a patch to add sendkey functionality to grub2. After loading sendkey module some new environments variables appear with which one may control the sequence of keys that would be sent to OS or next bootloader. This functionality is useful in different cases. One example is entering "safe mode" in some OS when without this feature you desperately try many times to press "magic key" in exactly good moment. Another usage example is chainloading another bootloader. Then you can send someting like "down down enter" to it and avoid another delay. The implementation as environment variables has its downside as I don't know where to put help about it. Perhaps possibility of adding help notice to environment variables would be a good idea. Then we could do like >help root root is a variable containing root device. For implementing this functionality I needed my function to be executed right before booting. To do it I added a simple interface for adding "preboot" functions: struct grub_preboot_t *grub_loader_add_preboot (grub_err_t (*preboot_func) (int)); As parameter this function recieves a callback (integer parameter to callback is noreturn variable). This function returns a handle with which the preboot function may be removed using void grub_loader_remove_preboot (struct grub_preboot_t *p); Implementation uses linked lists and tries to implement it in as few commands as possible since this code is a part of core image. This interface can later be reused for adding different hooks to bios ("map", "memdisk",...). Now the questions are: Whether such interface is OK for grub2? Whether we need also interface for adding "postboot" commands? (in case boot_function returns) Variables made available after loading sendkey module: sendkey - a space-separated list of keys to be sent kb_num, kb_caps, kb_scroll, kb_insert, kb_wait - [keep|on|off] - set numlock, capslock, scrollock, insert or wait state kb_noled - [0|1] When set to 1 the LED state is not changed to match num-/caps-/scrolllock state "kb_lshift", "kb_rshift", "kb_sysreq", "kb_numkey", "kb_capskey", "kb_scrollkey", "kb_insertkey", "kb_lalt", "kb_ralt", "kb_lctrl", "kb_rctrl" - [keep|on|off] When set to on emulate pressing and holding of corresponding key. To undo just press the corresponding key on your keyboard Regards Vladimir Serbinenko