Welcome to the Tiny Core Linux Wiki at tinycorelinux.net!

GRUB4DOS

The GRUB4DOS package “grub4dos.tcz” is intended as an alternative to the GRUB package “grub-0.97-splash.tcz”.

The main use case in which GRUB4DOS supersedes GRUB is that it is possible to install GRUB4DOS in a way that it can be loaded from the Windows Boot Loader without repartitioning your drive.

GRUB4DOS is less error-prone than GRUB since its operation does not depend on a devices.map file that can be invalidated when new storage devices are added to a system. Instead of trying to remember where critical files are located on disk, GRUB4DOS searches for those files.

When GRUB4DOS boots, it searches each partition whose type it recognizes for a file /grldr in the root directory of that partition. If the loader grldr is found on some partition, then the boot loader tranfers control to grldr, which then searches for a file called menu.lst; otherwise, GRUB4DOS enters command mode.

The search for menu.lst begins on the partition where grldr was found and looks in order for /menu.lst, /boot/grub/menu.lst, and /grub/menu.lst. If none of those files is found, then all of the other partitions that GRUB4DOS recognizes are searched for /menu.lst. If menu.lst if found, then it is used to control the boot process; otherwise, GRUB4DOS enters command mode.

+Howto install Tiny Core Linux inside a Microsoft Windows System

  1. Install GRUB4DOS:
  1. Install the menu.lst file
  • *an example is available in the same directory, copy it to the same directory containing the “boot.ini”-file, rename it to menu.lst and edit it to fit your needs.
  1. Integrate the NTFS drivers into the initrd
  • *a script for integrating NTFS into the initrd has been provided via the forum at: http://forum.tinycorelinux.net/index.php?topic=6246.0
  • *run the script “ntfs4tinycore.sh” from the directory to integrate the ntfs-3g example: ./ntfs4tinycore.sh /mnt/sr0/boot/tinycore.gz
  • *copy the created tinycore+ntfs.gz and the bzImage to the Windows partition.
  1. Copy the Tiny Core Linux files to the place specified in “menu.lst”

+Howto install Tiny Core Linux with GRUB4DOS native

  1. Partition the harddrive and format the partition(s)
  1. Install the initial boot loader in the master boot record
  • *Run ”/usr/local/share/grub4dos/bootlace.com –time-out=0 /dev/<harddisk>”
  • *bootlace.com can be run from both Linux and DOS/Windows
  • */dev/<harddisk> is usually /dev/hda or /dev/sda
  1. Install necessary files in the first partition
  • *Copy /usr/local/share/grub4dos/grldr to the root directory of the first partition.
  • *Create a menu.lst in the root directory of the first partition, an example is available as /usr/local/share/grub4dos/menu.lst_example
  1. Copy the Tiny Core Linux files to the place specified in “menu.lst”

Notes

  • Do not copy tinycore.gz into the /tce directory, this might lead to some hard to track down problems.
  • bootlace.com can also be used to install the boot loader in the partition boot sector or a device without a partition table (e.g. floppy) using the –floppy option.
  • Further documentation on GRUB4DOS was available at http://diddy.boot-land.net/grub4dos/Grub4dos.htm, which is unaccessible on 21-Jul-2016, but still reachable via Archive.org. Of particular interest are:
  • The "find --set-root" command with which the root partition of a boot menu can be set based on the location of a file, and
  • Booting from ISO Images, which shows how to boot from an ISO image without unpacking it.

Further Reading/Sources

Print/export