Page 1 of 1

Setting up GRUB Legacy Problem

Posted: Sat May 01, 2010 6:37 pm
by HitmanYesman
I'm following this guide on how to setup GRUB Legacy: http://wiki.osdev.org/GRUB I follow everything and when I get to the part where I type.

Code: Select all

dd if=<stage1> of=/dev/fd0 bs=512 count=1
dd if=<stage2> of=/dev/fd0 bs=512 seek=1
The first command seems to run successfully. But when I type in the second command here is what happens:

Code: Select all

dd: writing '/dev/fd0': No space left on device
197+1 records in
197+0 records out
100864 bytes (101 kB) copied, 3.651 s, 27.6 kB/s
The no space left made me think that the bpb must have been overwritten. So I use WinImage to change stage1 for bootsector properties. So I try the commands again and the same thing happened.

I used bochs to boot it (to try it anyways) and tried the install command but says that the file was not found meaning (menu.cfg) was not found because it was never written on it in the first place. Any ideas?

Re: Setting up GRUB Legacy Problem

Posted: Sun May 02, 2010 3:50 am
by Neolander
Well... Did you try to copy-paste the brackets from the tutorial ? If so, I suggest that you remove them, since the following works on linux (at least for floppy images) :

Code: Select all

dd if=stage1 of=floppy.img bs=512
dd if=stage2 of=floppy.img bs=512 seek=1
I think that those brackets are in the tutorial in order to tell you that you should enter the path to stage[1|2] here. But I may be mistaken, though.

Re: Setting up GRUB Legacy Problem

Posted: Sun May 02, 2010 11:13 am
by HitmanYesman
Well, I actually copy-pasted that directly from the tutorial into the post, but I didn't type in the brackets when I typed in the commands.

Re: Setting up GRUB Legacy Problem

Posted: Sun May 02, 2010 4:38 pm
by Selenic
... and this is why you use a floppy image :wink: (assuming you don't go for emulating something else like a CD or hard drive image instead)

Re: Setting up GRUB Legacy Problem

Posted: Sun May 02, 2010 7:53 pm
by HitmanYesman
Well, you're right. So I found a suitable guide on setting it up using a floppy image and it works fine now. Thanks for the advice.