Page 1 of 1
Create img without floppy drive
Posted: Tue Sep 30, 2008 12:33 pm
by sbeng77
Hi all,
on many os dev tutorial there are img files. I don't know if is possible create .img file without floppy. I would create this file on my harddisk.Why need img file?
Best regards.
Re: Create img without floppy drive
Posted: Tue Sep 30, 2008 12:37 pm
by inflater
Why need img file?
How else would run your OS?...
You must create a image file of a either floppy, harddrive, CD-ROM etc and put the kernel binary there. For floppy, I recommend WinImage. Then, after you've written an appropriate bootsector to it, you can start working on your kernel.
Or you can use physical media (I use normal diskettes for my OS, and when it comes to a full version I'll just make a image file from the floppy and upload it on the net).
You then run your kernel by specifying the image file to the emulator, or physical media to any x86 PC.
You should learn computer basics first. OSdeving is not a great idea for you.
(Sorry for my english I know its wacky a bit... too much gaming
).
Re: Create img without floppy drive
Posted: Tue Sep 30, 2008 12:57 pm
by Combuster
The idea of an image file is that its an duplicate of the contents on a floppy. You don't need an image file if you use a floppy directly, you don't need a floppy if you use an image file.
The thing is, you can distribute image files over the internet, but folding up a real floppy and attempt push it down the wire would ruin the floppy at best. An image is also much faster in use than a floppy. Hence most people prefer an image, and only copy that image to floppy when they need to do so.
For the record: I recommend MTools
Re: Create img without floppy drive
Posted: Tue Sep 30, 2008 1:39 pm
by codemastersnake
inflater wrote:Why need img file?
You should learn computer basics first. OSdeving is not a great idea for you.
Never demoralize any one
By the way There's a floppy drive emulator if you would be interested:
http://magneto.co.in/modules/weblinks/visit.php?lid=9
Re: Create img without floppy drive
Posted: Wed Oct 01, 2008 12:26 am
by sbeng77
Excuse me but i didn't explain cleary.
I know that i can start my emulator via img file to simulate floppy boot.
I don't know as i can create a img file only having my compiled sources (for example "kernel" output).
Re: Create img without floppy drive
Posted: Wed Oct 01, 2008 2:33 am
by egos
sbeng77 wrote:Excuse me but i didn't explain cleary.
I know that i can start my emulator via img file to simulate floppy boot.
I don't know as i can create a img file only having my compiled sources (for example "kernel" output).
You must own booting technology.
Just take your first stage boot loader for FAT12 and follow example
here.
Edit:
Code: Select all
include "mkfloppy.inc"
file "bootcode.bin", 512
; fat1
db 0F0h, 0FFh, 0FFh, 9*512-3 dup 0
; fat2
db 0F0h, 0FFh, 0FFh, 9*512-3 dup 0
; root
dent kernel, "KERNEL", FA_ARC
rb 33*512-$
; data
stof kernel, "kernel"
rb 2*80*18*512-$
Compile this code by fasm.
Re: Create img without floppy drive
Posted: Wed Oct 01, 2008 2:38 am
by sbeng77
Thank you!