Understanding the syntax used for devices is essential - refer to previous section Device Allocation/Numbering.
When booting grub4dos a message is displayed "Booting GRLDR" closely followed by various entries. This process is displayed too quickly to read, 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 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 60+ 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.
File/folder paths in Grub4dos are separated with a forward slash / (not a backslash \ as used in windows based systems). Paths can be absolute using the device (e.g. (hd0,0)/disk_images/msdos.img) or relative to the root directory (e.g. if root is set as device (hd0,0) then folder path /disk_images/msdos.img is valid – if root is set as (hd0,0)/disk_images then folder path /msdos.img is valid). Spaces in paths are not supported.
The root directory will be set to the device from which the configuration file menu.lst is loaded, irrespective of the device containing grldr (or GRUB.exe). If no configuration file is found then the root device will be the device from which grldr was loaded. To change the root device or directory use the command root [PATH], where PATH = device name (e.g. root (hd0,0) ) or device and directory name (e.g. root (hd0,0)/disk_images). The current root device can be designated by using closed brackets () (e.g. root ()/disk_images. Once a device has been set as root, all further commands will be issued for that device, unless otherwise stated. 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.
To check the current root device, type root [enter]. E.g. -
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).
Devices must be made root in order to boot from them. 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 autocomplete 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 completions -
The [tab] features will be explored in more detail in the next section.
PREVIOUS INDEX NEXT