21 - GRUB4DOS GUIDE (with videos) - how to make a multi-boot drive (+examples)

.

Contents

  1. 1 Introduction to grub4dos
  2. 2 References
  3. 3 Part 1 - Make a bootable USB pen drive
  4. 4 Part 2 - Testing your USB pen drive
    1. 4.1 Grub4dos 'color' values
      1. 4.1.1 Flashing text
    2. 4.2 Grub4dos commands
  5. 5 Setting a background image
    1. 5.1 Low Resolution 14 colour 640x480 bitmaps
      1. 5.1.1 Make your own splashimage 14-colour background file
      2. 5.1.2 14-Colour SplashImage CONVERSION METHOD 1 (highly recommended for all Windows XP/Vista/7 users - just drag and drop to convert!)
    2. 5.2 High colour and high resolution backgrounds (recommended)
    3. 5.3 Make a high resolution splashimage file
    4. 5.4 Changing the screen resolution with 'graphicsmode'
    5. 5.5 Changing the menu position and border
    6. 5.6 Changing the text font
    7. 5.7 The font command
    8. 5.8 Setting a default entry and numbering the menu entries
    9. 5.9 Adding your own menu heading
      1. 5.9.1 Using the echo command
      2. 5.9.2 More about menu entries and numbering
      3. 5.9.3 Numbering menu entries
      4. 5.9.4 Suppress grub4dos startup/bootup messages (silent)
      5. 5.9.5 Password protection
    10. 5.10 Secret menus
  6. 6 Part 3 - Adding a graphical menu using GFXBoot/GFXMenu
    1. 6.1 Using GfxMenu
  7. 7 Part 4 - Understanding grub4dos commands
    1. 7.1 The map command
      1. 7.1.1 The map command continued...
      2. 7.1.2 Booting DOS from a USB Floppy
    2. 7.2 The hook command
    3. 7.3 The root, kernel, chainloader and other commands
      1. 7.3.1 Contiguous files
    4. 7.4 Multiple sub-menus
    5. 7.5 grub4dos memory and ramdrives
    6. 7.6 Using variables in grub4dos menus
    7. 7.7 The cat command
    8. 7.8 Automatically show only valid menu entries using iftitle
  8. 8 Part 5 - Troubleshooting grub4dos menus
    1. 8.1 Debugging
      1. 8.1.1 Booting from CD or accessing a CD
      2. 8.1.2 Booting older OS's
      3. 8.1.3 Single-Stepping
      4. 8.1.4 Screen Capture
    2. 8.2 Checking what devices are present
    3. 8.3 Slow or no USB booting on some systems?
      1. 8.3.1 PLOP
  9. 9 Grub4dos utilities
    1. 9.1 WENV
    2. 9.2 hotkey
    3. 9.3 Using dd to edit sectors
  10. 10 grub4dos internal variables and functions
  11. 11 Over to you!
    1. 11.1 checktime command
    2. 11.2 terminal command
    3. 11.3 setmenu
  12. 12 Part 6 - Tested menu.lst entry examples
This guide contains many new and previously undocumented features!

Latest grub4dos downloads (GitHub source here) 0.4.5c is an old stable release with no new features and some bugs (a=alpha, b=beta, c=release).

I recommend that you download 0.4.6a 2016-12-24 as a good version to use (many other versions have bugs!).

Version 0.4.6a has Joliet ISO support, can map non-contiguous files, better debugging and it's own rd/wr USB 2.0 driver and better NTFS file-write support, exFAT and ext3/4 support, new features such as setmenu, large font support, .jpg support, etc. etc.

To install grub4dos, I recommend using RMPrepUSB. Click here for a complete set of RMPrepUSB and grub4dos YouTube video tutorials.

  • Grub4dos Commands Primer by Stephenldj (translated from Chinese)
  • Tutorial 71 - Grub4dos utilities (Wenv, hotkey. bios, etc.)
  • Grub4dos internal variables and Functions
  • Grub4dos and Plop!
  • Lots of menu.lst examples.
  • Sample background menus here.
  • Tutorial 57 - Automatic grub4dos menus, using hotkeys, hiding the menu and silent startup
  • Look here for advanced example menus and downloads including unifont to support UTF.8 characters, wallpapers, moving the menu, coloured text, etc.
  • Use the Search box at the top of this page to find a grub4dos menu for your particular ISO/OS/App.
    RMPrepUSB Blog - please leave a comment or feedback on RMPrepUSB or this Tutorial (please mention Tutorial number).

    Introduction to grub4dos

    This tutorial is an introduction on how to make a bootable grub4dos USB drive.

    If you are a beginner to multibooting USB drives and just want to quickly make and test a multiboot USB drive, check out the Easy2Boot Tutorial here.
    Grub4dos allows you to make a multiboot (multipass) drive. When you boot from a bootable drive that contains the grub4dos bootloader, you are normally presented with a menu which allows you to boot from any OS or other program such as a memory test program that you have copied to the drive.

    Grub4dos does not support UEFI-booting.

    Grub4dos boot code can be installed either onto the MBR (Master Boot Record, on the first sector of the disk) and boot track (first track) of a drive, or the partition boot record. It consists of two parts or stages. The first part is the boot code which is in the first sector and some of the following sectors of the boot drive or partition. Once this code is run by the CPU, the code then looks for a file called grldr. The grldr file needs be in the root and on the same boot partition if the boot code is installed onto the partition boot record (PBR - start of the partition).

    If the boot code was installed onto the MBR, then the root of all devices will be searched to find the grldr file. See here for more details.

    Grub4dos can boot an OS or executable from a 'flat file' structure or from disk image files or even ISO files. It can even load images into memory (ram drive) and run the OS from there! Grub4dos is used in most of my tutorials and is well worth getting to know it, if you are interested in making your own multi-boot drives. The RMPrepUSB download includes grub4dos. RMPrepUSB will install grub4dos onto a drive at the click of a button either to the MBR (Master Boot Record) or PBR (Partition Boot Record). Tip: If in doubt, always install twice, to both MBR and PBR!

    Most of the tutorials on this website use grub4dos. Grub4dos can be installed onto a USB Flash drive, USB Hard Disk or even your PC's hard disk. It can also be added to a bootable CD or DVD. Using grub4dos, you can make a bootable disk/CD/DVD that can run or install Windows XP, Windows 7/8, various versions of linux, memory tests and do much, much more...

    Grub4dos can run grub4dos batch files (which must start with !BAT) and grub4dos executables and supports environment variables. It can access FAT12, FAT16, FAT32, NTFS, exFAT, ISO 9660 CDFS and ext2/3/4 filesystems. It is a very powerful environment and is under constant development and improvement by chenall, tinybit, yaya and many others. There is an active forum on reboot.pro here. Grub4dos programs may have the file extension .g4e, grub4dos batch files may have the extension .g4b.
    Tip: You can make Nov 2013 and later versions of grub4dos run these without needing to specify the file extension, by adding command --set-ext=.g4b;.g4e to a grub4dos menu.lst file.

    If you have never used grub4dos before, I will give you a quick 'How to' introduction so you can make a working USB pen drive with which you can experiment.

    IMPORTANT: Always use the latest RMPrepUSB version which will include a recent version of grub4dos or obtain the very latest grub4dos grldr file from the latest build.

    I recommend that you always use the latest version of RMPrepUSB to install grub4dos rather than using grubinst or bootice for two reasons:

    (1) Only (small) USB drives are listed by default, so you cannot accidentally damage your system or external USB hard disks,
    (2) RMPrepUSB adds special modifications to the grub4dos boot code (using a specially modified version of grubinst.exe) which increase the chances of booting grub4dos on a wider variety of systems.

    Note: The RMPrepUSB version of the grub4dos MBR code is not compatible with BootIce - so don't attempt to tweak the defaults timeout,etc. using BootIce!

    If you are having problems booting to grub4dos on some very old systems try FlashBoot to prepare your USB drive.

    RMPrepUSB Part 3a - grub4dos

    RMPrepUSB Part 3b - grub4dos