Setting up GRUB Legacy Problem

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
HitmanYesman
Member
Member
Posts: 47
Joined: Fri Apr 23, 2010 8:27 am

Setting up GRUB Legacy Problem

Post 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?
User avatar
Neolander
Member
Member
Posts: 228
Joined: Tue Mar 23, 2010 3:01 pm
Location: Uppsala, Sweden
Contact:

Re: Setting up GRUB Legacy Problem

Post 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.
HitmanYesman
Member
Member
Posts: 47
Joined: Fri Apr 23, 2010 8:27 am

Re: Setting up GRUB Legacy Problem

Post 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.
Selenic
Member
Member
Posts: 123
Joined: Sat Jan 23, 2010 2:56 pm

Re: Setting up GRUB Legacy Problem

Post 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)
HitmanYesman
Member
Member
Posts: 47
Joined: Fri Apr 23, 2010 8:27 am

Re: Setting up GRUB Legacy Problem

Post 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.
Post Reply