Step 4: Install grub files on the CF

Once again I will use the grub program installed on the host machine:

debian:/# grub
Probing devices to guess BIOS drives. This may take a long time.


    GRUB  version 0.93  (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. ]

grub> root (hd
 Possible disks are:  hd0 hd1 hd2

grub> root (hd2,0)
 Filesystem type is fat, partition type 0x1

grub> setup (hd2)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/fat_stage1_5" exists... no
 Running "install /boot/grub/stage1 (hd2) /boot/grub/stage2 p /boot/grub/menu.lst "... succeeded
Done.

grub>quit

What you have to type is what appears in front of the grub> prompt above. In the first entry "root (hd" you can type on the TAB key at the end to see the devices that are recognized. Here my /dev/sda device shows up as hd2. This is confirmed by the fact that once I have fully declared the disk, the msdos partition is recognized. Then issue the setup command and you are done. Your CF should now be able to boot from GRUB. At this stage look in the GRUB manual to refine your menu, add new options,.. I leave that to you :-)