Grub4dos Guide - Renaming grldr
If loading grldr via the Windows NT/2000/XP loader (ntldr), changing the grldr filename will result in Grub4dos failing to boot. Note from ../../../grub4dos/files/diddy_subdomain/README_GRUB4DOS.txt - "...ntldr only loads the startup code of grldr (i.e., the leading 16 sectors of grldr), not the whole grldr file". The embedding settings in the startup code consequently scans for grldr in all available drives - if the file was renamed it will no longer be found. The following test was carried out on a dual boot system containing Windows Vista on (hd0,0) and Windows XP on (hd0,1). (hd0,1) was set as the active partition and mygrldr (renamed grldr) was loaded via C:\mygrldr="Grub4Dos" entry in boot.ini. This resulted in the following output -
Try (hd0,0): NTFS5: No grldr
Try (hd0,1): NTFS5: No grldr
Try (hd0,3): invalid or null
Try (hd0,4): invalid or null
Try (fd0): invalid or null
Error: Cannot find grldr in all drives. Press Ctrl+Alt+Del to restart._
It is possible to change the embedded setting to search for a different file by using the grubinst/grubutil tool. The procedure is outlined in ../../../grub4dos/files/diddy_subdomain/README_GRUB4DOS.txt -
- Download the latest version of grubinst/grubutil (see here).
- Copy grldr to C:\ drive and rename as C:\mygrldr
- Open a command prompt and run the command grubinst -o -b=mygrldr C:\grldr.mbr - where -b=mygrldr will replace the embedded reference to grldr with mygrldr in the created file C:\grldr.mbr. Note - you can use any name for the file C:\grldr.mbr, however make sure you use the 8.3 naming convention.
- Now load C:\grldr.mbr from Windows NT/2K/XP by adding C:\grldr.mbr="Grub4Dos" to your boot.ini file.
Alternatively, grubinst/grubutil can be used to edit an existing grldr
file. This will require a compatible version of grubinst.
- Copy grldr.mbr to C:\ drive and rename this file if required (making sure that you use the 8.3 naming convention). Run the command grubinst -e -b=mygrldr C:\grldr.mbr to replace the embedded reference to grldr with mygrldr. Now add entry C:\grldr.mbr="Grub4Dos" to boot.ini
- Alternatively, copy grldr to C:\ drive and rename the file to mygrldr. Run the command grubinst -e -b=mygrldr C:\mygrldr to replace the embedded reference to grldr with mygrldr. Now add entry C:\mygrldr="Grub4Dos" in boot.ini
Unfortunately, at the time of testing, the latest version of grubinst (grubinst-1.1-bin-w32-2008-01-01) is not compatible with Grub4dos build 2009-02-05. Running command grubinst -e -b=mygrldr C:\grldr.mbr results in grubinst: Invalid input file error and grubinst -e -b=mygrldr C:\grldr results in grubinst: Version number mismatched (old=4 new=2) error.