On Tue, May 20, 2008 at 06:22:25PM +0800, Bean wrote: > Hi, > > For normal boot, the root device is passed to core.img in preloader. > However, if we load grub2 using linux header, there is no way to know > the root device. This patch add a new module findroot that can be used > to scan the root directory at startup. > > One important usage is to create a grub2 boot file for vista boot loader: > > mkimage -o g2ntfs.img pc ntfs biosdisk findroot > cat lnxboot.img g2ntfs.img > g2ntfs.mbr > > The result g2ntfs.mbr is within 32K, which can be loaded by vista in > one pass, no need to use the g2ldr.mbr anymore. The findroot modules > ensure that prefix is set properly before switching to normal mode. > > If findroot is not used to create core.img, the original booting method > remains.
The module is called findroot, but it initialises $prefix rather than $root. Shouldn't it be findprefix or so? Also, what this module is doing looks very similar to "search --set". Did you check if search command can be used for what you want? (or otherwise adapted) -- Robert Millan <GPLv2> I know my rights; I want my phone call! <DRM> What good is a phone call… if you are unable to speak? (as seen on /.) _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel