I am trying to make a scratch linux installation on a PC board that has an x86 processor running on it. It also has a compact flash drive on it to which I have copied my compiled kernel image. The problem I am having is with the bootloader aspect. I want to use GRUB, but I do not really know how to go about getting it onto the compact flash drive. Most documentation I have found is concerned with installing GRUB after you have a working installation of linux up and running. I had thought about using a USB floppy drive and using that with GRUB on a disc to boot the kernel image and from there try the grub-install approach mentioned in the GRUB documentation pages. Any advice on how to (or how not to) proceed will be gratefully received.
Well, it's true, that you need a working installation of linux (well I guess more like *nix and probably not even that). I assume you are following some kind of lfs or similar procedure. In this case you already should be in some kind of unix, to be able to build all the packages and then you can run
grub-install from there.
grub-install --no-floppy /dev/sd<whatever> or for the minimal approach
grub --no-floppy grub> root (hd1,0) grub> setup (hd1) grub> quit
Both will work from within your old system. I assume your old system to have gotten number 0 and your new one no 1 in
grub's scheme. Please make very sure that this is correct, for example to find out what numbers grub gave your devices
grub-mkdevicemap --device-map=device.map cat device.map