Getting started with GRUB and Virtual PC?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
jdam
Posts: 3
Joined: Sun Oct 22, 2006 6:05 pm

Getting started with GRUB and Virtual PC?

Post by jdam »

First of all, let me apologize for asking what may be a stupid question, for I know it is a very basic problem that doubtless has a simple and obvious solution, but I have been unable to find it.

How can I install GRUB onto a Virtual PC disk image? I can't seem to figure out a way to mount the image or do anything useful with it.

I'm using Windows 2000 with Cygwin/gcc and I've managed to compile a simple kernel, and I planned on testing it in Virtual PC but I don't know where to begin. Any help?

(And if this is answered elsewhere, please just point me in the right direction, as I couldn't find it.)
jdam
Posts: 3
Joined: Sun Oct 22, 2006 6:05 pm

Post by jdam »

Well, on cue, after posting this I believe I found the answers. I picked up vfloppy and tried to install grub on it following the GRUB FAQ, but I don't know what to do as the /dev directory doesn't exist / is meaningless in cygwin.

Anyway, I think I'll try one of the pre compiled images available and see how that goes.
TheQuux
Member
Member
Posts: 73
Joined: Sun Oct 22, 2006 6:49 pm

Post by TheQuux »

Another option is o take any linx install CD, boot it into recovery bode on Virtual PC, and, at the shell, type "grub"

Then, follow standard grub installation instructions.

or, mount a blank virtual floppy and type

cat /boot/grub/stage{1,2} >/dev/fd0

to do a floppy install.

Or, you can just grab the floppy that I use (http://thequux.com/xenon-0.01.tar.bz2 ; the file in there that you want is boot.img.tmpl ... just rename it to boot.img and all will be fine. Note, though, that one is ext2-based)
jdam
Posts: 3
Joined: Sun Oct 22, 2006 6:05 pm

Post by jdam »

Thanks for the advice. I managed to get it working using the boot image at the link I provided.

The command "cat /boot/grub/stage{1,2} >/dev/fd0" wouldn't work for me because with my current setup (cygwin on win2k) there is no /dev directory. Not sure if this is because I've neglected to install some cygwin component or not....

Ideally I'd like to move to one of VirtualPC's virtual hard drives, but I'm not sure where to start with that either.
Post Reply