I'm trying to use grub to boot a flash image, which I'm making up as a normal file under linux, then creating partitions inside that file with fdisk, dding mkfs'd partitions into that file with offsets, then mounting those partitions, and populating them with an OS.
It all works. Except for the last bit. Grub. I've tried, and failed to get "lilo" working. I was hoping grub would be easier. Only, I'm not quite sure how to go about it. It should be similar to a floppy - dd in the first & second stage loaders. Only it occured to me that where the docs for "making a grub floppy" show using dd to put the second stage loader in place with something like; # dd if=stage2 of=/tmp/myflash.img bs=512 count=1 seek=1 wouldn't that over write a partition table ? If so, where should I put the second stage loader ? Or, do I have to bite the bullet, and go in through the grub shell, and install the second stage loader into (say) the first partition, and have it tell the first stage loader where to find it ? The idea of this is to finish off a shell script that builds an OS from source, and generates a complete image, so I'd really like to avoid manual intervention if possible. Anyone got any ideas ? John -- _______________________________________ John Looney Chief Scientist a n t e f a c t o t: +353 1 8586004 www.antefacto.com f: +353 1 8586014
msg04903/pgp00000.pgp
Description: PGP signature