cat | grub --device-map=/dev/null
Now pay close to the attention of the beginning.
Type: "device (hd0) VPS.img" this is telling what hd0 will be to GRUB and we're telling it the disk image file "VPS.img" in the current directory is hd0, you can specify alternate paths and image names of course.
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
device (hd0) VPS.img
grub> device (hd0) VPS.img
root (hd0,0)
grub> root (hd0,0)
Filesystem type is ext2fs, partition type 0x83
setup (hd0)
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... yes
Checking if "/grub/stage2" exists... yes
Checking if "/grub/e2fs_stage1_5" exists... yes
Running "embed /grub/e2fs_stage1_5 (hd0)"... 15 sectors are embedded.
succeeded
Running "install /grub/stage1 (hd0) (hd0)1+15 p (hd0,0)/grub/stage2 /grub/grub.conf"... succeeded
Done.
install, grub, mbr, disk, dev, null, quot, hd, vps, img, directory, specify, alternate, paths, gnu, minimal, bash, editing, supported, tab, lists, completions, filename, filesystem, ext, fs, partition, fs_stage, _, embed, sectors, embedded, succeeded, conf,