During the GRUB4DOS boot process a number of messages are parsed. Due to the speed at which the messages are displayed it is very difficult to read them, which can cause problems identifying at which point the boot process fails in the event of any problems. If grub4dos fails to boot, quickly press the [insert] key whilst it’s loading to enter debug mode – this will display detailed step-by-step startup information and will allow you to identify at which point grub4dos is failing.
Grub4dos has a powerful command line interface, which can be scripted via a configuration file. The configuration file (menu.lst) is automatically loaded if found - to access the command line from a boot menu press the [c] key. Entering commands from the command line is far more flexible than using configuration file entries, and will provide detailed feedback. Although the command line can be intimidating, only a handful of the supported commands are needed to boot the majority of operating systems. The command line is the recommended method for testing new boot options and is essential for troubleshooting problems.
Screenshot of the GRUB4DOS command line (GRUB4DOS version 0.4.5c 2016-01-18) -
GRUB4DOS has a built in menu that will search for the configuration file menu.lst and will load this file if found on any accessible devices. Screenshot of the built in menu -
The root device will be set as the device from which the configuration file menu.lst was loaded. If a configuration file was not found, then the root device will be set as the device from which GRUB4DOS was loaded.
To check the current root device, type root [enter]. Sample output -
To change the root device use the command root [PATH], where PATH = device name. E.g. root (hd0,0).
Once a device has been set as root, all further commands will be issued for that device, unless specified otherwise. For example, if (hd0,0) is set as the root device, the command Chainloader +1 will boot the first sector (the boot sector) of that device.
The root command can be used to set a working directory - a relative path for additional commands. E.g. the command root (hd0,0)/boot will set (hd0,0)/boot as the current working directory.
The current root device can be designated by using closed brackets (). E.g. Assuming the current root device is (hd0,0), the command root ()/My/Path will change the working directory to (hd0,0)/My/Path.
File/folder paths in Grub4dos are separated with a forward slash (/). E.g. (hd0,0)/My/Path/test.vhd
Paths can be absolute using the device. E.g. (hd0,0)/My/Path/test.vhd
Paths can be relative to the current root device/directory. E.g. Assuming the current root device is (hd0,0) - /My/Path/test.vhd will function the same as the absolute path in the preceding example.
Paths with spaces are supported, however spaces must be seperated with a backslash's (\). E.g. for the file "Path With Spaces\test.vhd" on device (hd0,0), use (hd0,0)/Path\ With\ Spaces/test.vhd.
When using the find (or find --set-root) command, all (hd) devices (and partitions) are searched before (cd), and (cd) devices are searched before (fd).
There are two commands available to make a device root - root and rootnoverify. The root command will attempt to mount the specified device/partition, verifying the filesystem type. Using the rootnoverify command, the device/partition is not mounted. Using the root command is the preferred method, rootnoverify should only be used if the root command fails. See below for example output after using the root command, using rootnoverify does not provide any feedback -
The Grub4dos command line has an inbuilt auto complete feature, accessed by using the [tab] key. Using the [tab] key without any commands will display a list of all available commands. Entering part of a command followed by the [tab] key will list all possible completions of the command. E.g. entering de [tab] will list the following commands -