dd in Cygwin
dd in Cygwin
When I'm creating my auxiliary boot disk (as described in the FAQ) in Cygwin (WinXP SP2) with the same instructions as told, it returns:
bash: of=/dev/fd0: No such file or directory
Then, I tried A: instead of /dev/fd0, as this is Linux, but it still didn't work... Has anyone done this before and knows what to do in this case?
Thanks
bash: of=/dev/fd0: No such file or directory
Then, I tried A: instead of /dev/fd0, as this is Linux, but it still didn't work... Has anyone done this before and knows what to do in this case?
Thanks
Re:dd in Cygwin
I already use rawwrite, but I want to create my own boot disk. This is because the grub disk I downloaded from BonaFide suddenly stopped working on real hardware (still working in bochs), I always get a Read stage2Read Error
I also tried the boot disk you can download at Clicker's site, but the same result (Bochs:+/Hardware:-); if anyone knows what to do, please help me. The strange thing is that it worked some time ago but suddenly stopped to do so...
I also tried the boot disk you can download at Clicker's site, but the same result (Bochs:+/Hardware:-); if anyone knows what to do, please help me. The strange thing is that it worked some time ago but suddenly stopped to do so...
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
Re:dd in Cygwin
I'm using dd in Cygwin successfully. If you can wait six hours, I'll be able to consult my makefile and give you the answer.
Top three reasons why my OS project died:
- Too much overtime at work
- Got married
- My brain got stuck in an infinite loop while trying to design the memory manager
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
Re:dd in Cygwin
This is the line from my makefile (with the appropriate parameters substituted):
Your source path will of course differ. I'm not sure what you were doing wrong before -- the "of" part looks the same to me.
Code: Select all
dd if=../../../Bin/free_x86_uni/kernel.img of=/dev/fd0
Top three reasons why my OS project died:
- Too much overtime at work
- Got married
- My brain got stuck in an infinite loop while trying to design the memory manager
Re:dd in Cygwin
When you use 'ls /dev/fd0', does it show up? Maybe it's called something like '/dev/floppy/0' or '/dev/floppy0' instead - this is the newer device naming convention under Linux, I don't know about Cygwin however.Candamir wrote: When I'm creating my auxiliary boot disk (as described in the FAQ) in Cygwin (WinXP SP2) with the same instructions as told, it returns:
bash: of=/dev/fd0: No such file or directory
Then, I tried A: instead of /dev/fd0, as this is Linux, but it still didn't work... Has anyone done this before and knows what to do in this case?
cheers Joe
Re:dd in Cygwin
I'm using a windows version of dd (not cygwin). Google for "dd windows". I use a command like this:
Hope this helps.
Code: Select all
dd if=floppy.img of=\\.\a:
Re:dd in Cygwin
Hang on, bash complains? If the path is wrong it should be dd complaining. What command are you using?
Re:dd in Cygwin
Code: Select all
dd if=<stage1> of=/dev/fd0 bs=512 count=1
Code: Select all
dd if=<stage1> of=\\.\a: bs=512 count=1
But actually, I'm doing this because GRUB suddenly stopped working on real hardware, but still works on BOCHS. My tools are Rawwrite and Virtual Floppy Driver, and I thought it might be a bug in Rawwrite and downloaded cygwin, but... :-\ I always get GRUB reading stage2Read Error. I would use a image downloaded from BonaFide and I also tried one available in the Clicker download section. Could it have something to do with the size of my kernel, because if I remember right, things started to go wrong about the time when my kernel grew from 12k to 16k...
Re:dd in Cygwin
Uh, just a moment, do you really write <stage1> - with the '<' and '>' characters? If so, that would explain why bash is complaining: those characters are control characters for bash, and mean to redirect the input and output of the command. With your specific command, bash will connect the file 'stage1' to stdin, and then try to connect the file 'of=/dev/fd0' to stdout - which fails, therefore you get the message from bash that the file 'of=/dev/fd0' was not found.Candamir wrote:andCode: Select all
dd if=<stage1> of=/dev/fd0 bs=512 count=1
and all other variations you posted here, and everytime it's bash that complains, not dd...Code: Select all
dd if=<stage1> of=\\.\a: bs=512 count=1
Just remove the < and > characters and it should do the job.
cheers Joe
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
Re:dd in Cygwin
I assume "<stage1>" is just a placeholder for the real input file name, right?
<edit>
Doh... Sometimes Firefox's "open in tabs" means you're replying to a stale version of the thread if you've left the tab alone for a while.
</edit>
<edit>
Doh... Sometimes Firefox's "open in tabs" means you're replying to a stale version of the thread if you've left the tab alone for a while.
</edit>
Top three reasons why my OS project died:
- Too much overtime at work
- Got married
- My brain got stuck in an infinite loop while trying to design the memory manager
Re:dd in Cygwin
OK. Thanks to your advice, I now brought dd to write stage1 to my floppy disk (of=/dev/fd0 worked), but when I proceed to write stage2, it tells me there's no space left on device; I alredy checked dd documentation, what's wrong here?
Uses to happen... ;D<edit>
Doh... Sometimes Firefox's "open in tabs" means you're replying to a stale version of the thread if you've left the tab alone for a while.
</edit>
Re:dd in Cygwin
That's really strange...that would mean your stage2 is too large, but I can't imagine it's larger than 1.44 MB.Candamir wrote: OK. Thanks to your advice, I now brought dd to write stage1 to my floppy disk (of=/dev/fd0 worked), but when I proceed to write stage2, it tells me there's no space left on device; I alredy checked dd documentation, what's wrong here?
When you set up a GRUB boot floppy with dd (without a filesystem), you want to put stage1 at the beginning, and the stage2 file directly afterwards. So, when I assume your stage1 is exactly 512 bytes (1 block) large, this would mean you issue the following commands:
Code: Select all
dd if=stage1 of=/dev/fd0 bs=512 count=1
dd if=stage2 of=/dev/fd0 bs=512 seek=1
cheers Joe
Re:dd in Cygwin
I'm using exactly those commands and stage2 is ~99 kb big (forgot the exact number)... Strange ??? But is there any reason I could assume that the pre-fabricated images I downloaded (mentioned above) don't work when my kernel's size grows beyond 16k? I also downloaded Clicker, which is based on GRUB, and it did work; my home-made bootloader isn't yet capable of anything but displaying text on the screen (I don't even dare /thinking/ about the nightmare it'll be to make it multiboot-compliant ;D) And I checked boochsout and there wasn't even a warning! Because now, I'm approaching to the problem:
- My OS (GRUB) works on BOCHS
- Clicker w. GRUB works on real hardware, Phoenix BIOS, Compaq BIOS (used Rawwrite)
- My OS (no cool name yet) w. GRUB doesn't work on real hardware (Phoenix & Compaq)(used Rawwrite)
Well, if it would depend on three factors (GRUB, Rawwrite and the BIOS), the problem wouldn't have any logical solution ;D :'(, that's why I'm trying to create my own GRUB disk. I'm now trying to use mkisofs in order to use cd's...
- My OS (GRUB) works on BOCHS
- Clicker w. GRUB works on real hardware, Phoenix BIOS, Compaq BIOS (used Rawwrite)
- My OS (no cool name yet) w. GRUB doesn't work on real hardware (Phoenix & Compaq)(used Rawwrite)
Well, if it would depend on three factors (GRUB, Rawwrite and the BIOS), the problem wouldn't have any logical solution ;D :'(, that's why I'm trying to create my own GRUB disk. I'm now trying to use mkisofs in order to use cd's...