Hi, First of all, one of the annoying thing about normal mode is that we have two sets of command, one for rescue mode, one for normal mode. Take a closer look at them, they're very similar, expect for the argument options. If we move the option analyzer from normal.mod to kernel, then we can have one unified set of commands.
About the duplicated commands, we can create a module minicmd to include the most basic command, and allow for overwrite. So, there is a minimal ls command in minicmd which would be embedded in the kernel, but if we need the extra feature, we can load the external ls module. After resolving the problem of two command sets, I start to wonder if normal mode is necessary at all. In fact, its function can be separated into the following parts: Interface: We can support multiple interface. The kernel's interface is a console mode tty interface. Normal mode is the menu interface. But this is not the only option. For example, we can have a simple chooser. The different boot option is output line by line, and we can enter the number to choose them. This interface is very useful in terminal that doesn't support absulote cursor or graphic character. We can also have graphic interface, where the layout is completely decided by the module, not limited by interface of text mode. Script engine: We can also support multiple script engines. In kernel, there is just the basic line scanner. The current normal mode engine is bash-like parser. We can add other engines in the future, csh-like or so. Each engine would have a separate configuration file. The default is a line by line command list used by the kernel scanner. This look some like preset menu of grub legacy. From this file, we load modules that would bring us to normal environment. For example, it may look something like this: set rdir=/boot/grub search -s ${rdir}/grub.cfg insmod bash insmod text-menu This file would be embedded in the kernel, as root is yet to be defined. From this file, we set the root environment and load extra module. This would eliminate the need for static grub_prefix. -- Bean _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel