document updated 12 years ago, on Mar 29, 2012
Linux allows boot parameters to be passed to the kernel + initrd. MS-DOS doesn't have this, so trying to move DOS-based boot menus into the GRUB menu seem to be hard to do. But there are some hackish ways.
Various ways to do this:
- Before booting DOS, map drives in various ways. For instance, if Z: exists after booting up, it means to do one thing. If Y: exists, then another.
- Before booting DOS, load a custom floppy image. For instance, if A:\ghost.txt exists after booting up, then load Ghost. If A:\partmgc.txt exists after booting up, then load Partition Magic.
- GRUB4DOS can mount multiple virtual floppies (MEMDISK can only load one). You can mount your main boot floppy to booting, but mount a second floppy that has the parameters you want.
- GRUB4DOS can write things directly to RAM. (see "cmdcons" example in the official documentation) TODO: how can I read this directly from DOS? debug?
- The Linux boot parameters are passed in a standard way (the real-mode kernel header). Somehow make a DOS program that accesses them.