Grub4dos Guide - Loading/Installing Grub4dos From Linux
Tags: boot, linux, grub4dos
Published: 2019-07-21 13:11:42

---
title: Grub4dos Guide - Loading/Installing Grub4dos From Linux
series: grub4dos_for_linux
published: true
tags: boot,linux,grub4dos
---

_This is the cached version of http://diddy.boot-land.net/grub4dos/files/install_linux.htm, a snapshot of the page as it appeared on 1 Jul 2019 11:11:19 GMT, because, as of today, 2019-07-21, the current stage of the site is:_

```
This site can’t be reached 
diddy.boot-land.net’s server IP address could not be found.
DNS_PROBE_FINISHED_NXDOMAIN
```

Original articles starts:

### Load via SysLinux

To load via Syslinux you will first need to install Syslinux to a bootable device (version 3.70 tested). Copy `C:\Grub4dos\GRUB.EXE` to the syslinux folder on the drive containing your Syslinux files and add an entry to the Syslinux configuration file `syslinux.cfg`. e.g. –

```
LABEL grud4dos
MENU LABEL Grub4dos
KERNEL grub.exe
```

Alternatively copy `C:\Grub4dos\GRUB.EXE` to the root of the drive containing your Syslinux files and add following entry to `syslinux.cfg` –

```
LABEL grud4dos
MENU LABEL Grub4dos
KERNEL /grub.exe
```

Note the use of kernel `/grub.exe`.

### Load Via (Legacy) Grub

Linux users with (Legacy) GRUB already installed can use it to boot Grub4dos. Identify the partition containing the GRUB boot files/folder (e.g. `(hd0,0)/boot/grub`). Copy `grub.exe` to the GRUB boot folder. Now add the following entry to your `/boot/grub/menu.lst` file.

```
title Grub4dos
root (hd0,0)
kernel /boot/grub/grub.exe
```

Change the `root (hd0,0)` command to reflect your own setup.

### Load From Linux (kexec)

Following was tested using ubuntu Linux (version 8.04 (Hardy Heron)) - kexec package was installed using terminal command `sudo apt-get install kexec-tools` -

`sudo kexec -l grub.exe`
`sudo kexec -e`

### Installing Grub4dos Code to the MBR

To install Grub4dos code to the MBR use bootlace.com. Using Puppy Linux version 4.0, `(hd0)` was identified as `/dev/sda` - Grub4dos was installed using the command `/mnt/sdb1/bootlace.com /dev/sda`. Output from running this command in a terminal -

```
# /mnt/sdb1/bootlace.com /dev/sda 

Disk geometry calculated according to the partition table: 
   Sectors per track=63, Number of heads=255 

Success. 
```

### Installing Grub4dos Code to the Partition Boot Sector

The following instructions have been copied from `README_GRUB4DOS.txt` -

```
******************************************************************************
***           Use bootlace.com to install partition boot record            ***
******************************************************************************

Since bootlace.com has not implemented the --install-partition option, you
need to use the already implemented --floppy=PartitionNumber option instead.

Hear is a way you might want to follow:

Step 1. Get the boot sectors of the partition and save to a file MYPART.TMP.
	For NTFS, you need to get the beginning 16 sectors. For other type of
	filesystems, you only need to get one sector, but getting more sectors
	is also ok.

Step 2. Run this:

	bootlace.com --floppy=Y --sectors-per-track=S --heads=H --start-sector=B --total-sectors=C --vfat --ext2 --ntfs MYPART.TMP

	where we suppose MYPART.TMP is for (hdX,Y) and the partition number Y
	should be specified as in the --floppy=Y option.

	Note that for FAT12/16/32/NTFS partitions, you can omit these options:

		 --sectors-per-track, --heads, --start-sector, --total-sectors,
		 --vfat and --ext2.

	For NTFS partitions, you must specify --ntfs option.

	For ext2 partitions, you can omit --vfat, --ntfs and --ext2 options,
	but other options should be specified.

Step 3. Put MYPART.TMP back on to the boot sector(s) of your original partition
	(hdX,Y).


Note: Only a few file systems(FAT12/16/32/NTFS/ext2/ext3) are supported by now.

Note2: Under Linux you may directly write the partition. That is to say, Step
	1 and Step 3 are not needed. Simply use its device name instead of
	MYPART.TMP.

Note3: grubinst has the feature of installing grldr boot code onto a partiton
	boot area.

```

￼
To install Grub4dos code to `(hd0,1)` which is an NTFS formatted partition and is device `/dev/sda2` (in Puppy Linux version 4.0) -

Use the formula `(hdX,Y)` to calculate the `floppy=` parameter to be used with bootlace.com. For (hd0,1) Y=1, therefore we will use `floppy=1` (to install to `(hd0,2)` we would use `floppy=2`, for `(hd1,3)` we would use `floppy=3`, etc).
Use bootlace.com command `bootlace.com --floppy=1 --ntfs /dev/sda2` - hopefully you will receive confirmation similar to the following

```
# /mnt/sdb1/bootlace.com --floppy=1 --ntfs /dev/sda2 

Filesystem type is NTFS. 

Success. 
```

Copy `grldr` to (hd0,1) and set (hd0,1) as active. `grldr` must be present on the partition on which the bootsector was installed, `menu.lst` can however be on another partition.