Think of NeoGrub as EasyBCD’s “magic bootloader” – it’s an implementation of a bootloader within a bootloader that makes it possible to script and automate certain system startup task that would never have been possible with just the BCD alone. NeoGrub was added in EasyBCD 1.51 as experimental-only code meant to explore the possibilities and provide temporary workaround for some commonly-encountered problems.
With EasyBCD 1.7, NeoGrub was completely overhauled, with full-quality standards-compliant code and behavior, with support for more platforms and filesystems – and is several times more powerful than the original. To date, NeoGrub has played a major role in getting non-compliant, buggy, and out-dated operating systems to boot with Windows Vista – along with a number of other nifty tricks that couldn’t be done otherwise. It even lets you load Windows in ways that the BCD bootloader makes quite impossible!
What NeoGrub Can be Used For
NeoGrub has infinite number of possible usages – the sky truly is the limit thanks to the scriptable boot process and chainloading support. However, here are a couple of really cool things NeoGrub is often used for:
- Installing, configuring, and maintaining the GRUB bootloader from within Windows – no Live CDs, Super Grub Disks, or Linux installations required.
- Hiding partitions from one-another at boot time
- Faking primary/active partitions.
- Chainloading other Linux bootloaders such as GRUB2, LILO, and more.
Limitations of NeoGrub
As of EasyBCD 1.7, most of NeoGrub’s limitations have been lifted and it can now be used in the same exact way as a standard GRUB bootloader except that it has added support for some Windows-specific features and can read/load from an NTFS-based partition.
Installing & Configuring NeoGrub
Installing NeoGrub is easy, EasyBCD takes care of all of it for you. The hard part is scripting NeoGrub to do what you need it to…
- Launch EasyBCD
- Go to the Add Entries” Screen
- Navigate to the “NeoGrub” tab in the “Add an Entry” section.
- Select “Install NeoGrub”
- Wait for the “Installation Complete” notification.
You should now have an entry “NeoGrub” in the Vista bootloader – but the catch is, it’s useless. At the moment, NeoGrub doesn’t do anything, you have to configure it to do what you need.
Once you’ve added NeoGrub to the BCD bootloader, when you go back to the “Add Entry” screen, the option to install NeoGrub should no longer be there. Instead, you’ll have two shiny, new buttons to use: “Remove NeoGrub” and “Configure.”
Removing NeoGrub isn’t what we want right now (scroll down if that’s what you’re looking for), so click the “Configure” button to open the NeoGrub menu file in notepad.
NeoGrub uses a file called “menu.lst” kept (usually) in C:\NST\, and is used to tell NeoGrub what to do. This is where we do all our hacking to make operating systems work, drives disappear, and the magic happen.
menu.lst is basically a script in the GRUB language. It consists of lines read & processed in the order they appear.
Basic NeoGrub file:
# NeoSmart NeoGrub Bootloader Configuration File # # This NeoGrub menu.lst file should be located at \NST\menu.lst of the boot drive. # Please see the EasyBCD Documentation for information on how to create/modify entries find --set-root /NTLDR makeactive chainloader /NTLDR boot
With the sample menu.lst contents above, when you pick NeoGrub from the bcd/bootmgr bootloader, it would load up menu.lst and follow it step-by-step:
- Search for NTLDR in the / directory of all partitions that you can read.
- Once you’ve found it, make this partition the root of our console.
- Also make this partition the active partition – some operating systems like old versions of Windows and current editions of OS X won’t boot otherwise.
- Chainload (hand-off the boot process) to the Windows XP bootloader that is called NTLDR and located in the / directory of our current root drive.
- Go ahead and boot. (In this case, it’ll boot by completing the previous chainload command and calling NTLDR.)
You can also have NeoGrub display a list of choices when you select it from the Vista bootloader. This way, you can take advantage of NeoGrub’s features to do more than one thing. It’ll give you a list of tasks to pick from, and you choose the one you want.
Sample multi-entry NeoGrub file:
# NeoSmart NeoGrub Bootloader Configuration File # # This NeoGrub menu.lst file should be located at \NST\menu.lst of the boot drive. # Please see the EasyBCD Documentation for information on how to create/modify entries #This is a comment. Comments are prefixed with a '#' default 0 #Pick the task to be run if the user doesn't pick one within the time limit. timeout 10 #Give the user 10 seconds to choose a task. #We use the "title" keyword to indicate a new entry in the menu. title Windows XP #This is our first entry - it's number 0 find --set-root /NTLDR #Search for NTLDR on all partitions. Once found, use that partition as root. makeactive #Make this the active partition chainloader /NTLDR #Run NTLDR, the Windows XP bootloader #If we're using a menu, we don't need to use the `boot` command - it's automatically implied. #This is our second entry title Ubuntu Gutsy Gibbon root (hd1,2) #Load Ubuntu from the 2nd harddrive's 3rd partition. #Next Line: Translate (hd1,2) to Linux notation and set that as the root partition kernel /boot/vmlinuz-2.6.22-14-generic root=/dev/sdbc initrd /boot/initrd.img-2.6.22-14-generic #End Ubuntu entry #That's it!
Given the sample file above, NeoGrub would display a menu with two entries (“Load Windows XP” and “Load Ubuntu Gutsy Gibbon”). It’ll give you 10 seconds to make a choice, and if you don’t, it’ll load the default entry: number 0.
In a multi-entry menu.lst, there is no need to explicitly use the
boot command. Instead, NeoGrub will automatically issue the
boot command when it reaches the end of the current “title” section.
Other Neat Tricks
You can take a look at the sub-pages of the NeoGrub section for examples on how to boot into Linux, BSD, Windows, and more.
You can easily uninstall NeoGrub by going back to the “Add Entries” screen and selecting “Remove NeoGrub.” EasyBCD will automagically deal with all the grimy details, and NeoGrub will be removed and the associated files deleted. If you wish to use NeoGrub in the future, you may want to save a copy of the NeoGrub boot file before uninstalling it. You can also uninstall NeoGrub by deleting its entry normally.
NeoGrub started off as a fork (modification) of the Grub4Dos bootloader, with the intention of making an NTFS-aware, Windows-compatible version of the open-source GRUB bootloader available to EasyBCD users. Later versions of Grub4Dos saw some NeoGrub’s changes merged into the official Grub4Dos distribution, and today, NeoGrub actually uses the standard Grub4Dos executables. NeoGrub is made possible thanks to the efforts of the Grub4Dos project and their work on a Windows-compatible GRUB bootloader, in particular, NeoGrub would not have been possible without the work of tinybyt and chenall.