bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question about using grub on disk image files (as opposed to discs)


From: John P. Looney
Subject: Question about using grub on disk image files (as opposed to discs)
Date: Tue, 18 Dec 2001 09:28:10 +0000
User-agent: Mutt/1.3.23i

 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

Attachment: pgpSxze43S3UI.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]