Working with IMG's?

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
Chris Chance

Working with IMG's?

Post by Chris Chance »

I was wondering I currently am in the process
of designing bootloader/kernal etc for my own
small operating system. But as it is i was
wonderin how i can compile an IMG file of a
3.5" diskette to work with bochs. I know of
winimage but for that u have to pay to get
it to accept the bootsector part of the image.
Are there others.

Also are their any sites or areas that provide
information on developing contained operating
systems like BeOS personal is? Such as an IMG
file on a Fat Drive that contains the Ext2 for
my filesystem with all my files and information
and is bootable etc ?????

Any information you can provide would be greatly
appreciated!
Guest

RE:Working with IMG's?

Post by Guest »

>On 2002-01-08 17:16:02, Chris Chance wrote:
>I was wondering I currently am in the process
>of designing bootloader/kernal etc for my own
>small operating system. But as it is i was
>wonderin how i can compile an IMG file of a
>3.5" diskette to work with bochs. I know of
>winimage but for that u have to pay to get
>it to accept the bootsector part of the image.
>Are there others.

If you are on Windows9x:
Go find partcopy and use bochs' bximage.
what you would do is:
1.) bximage a fd of 1_44MB
2.) compile and link everything you need.
3.) partcopy all the stuff into there relative linear address on the image.
e.g.
// if the image is called a.img
partcopy bootsect.bin 0 200 a.img 0
partcopy kernel.bin 0 400 a.img 200

If you are on any of the Unix OSes:
1.) ** I seriously don't know how to make a image file **
so have to find a way to do that
2.) use 'dd' instead of partcopy, and you can do the same thing
to the image and use bochs to emulate it.

That's how i'd done it...i've got the DOS batch file on my CVS server
http://zoftos.sf.net/
it's not a very good one though...
Ben Hsu
Chris Giese

RE:Working with IMG's?

Post by Chris Giese »

>On 2002-01-08 17:16:02, Chris Chance wrote:

You should join the Chris Conspiracy :)

>I was wondering I currently am in the process
>of designing bootloader/kernal etc for my own
>small operating system. But as it is i was
>wonderin how i can compile an IMG file of a
>3.5" diskette to work with bochs. I know of
>winimage but for that u have to pay to get
>it to accept the bootsector part of the image.

The Bochs that I have came with a little program called DSKIMG that takes a "snapshot" of a floppy disk, creating a 1.44 meg .IMG file.

There is also something called MTOOLS, which lets you treat a file like a DOS disk. You can FORMAT it, COPY files to it, DELETE files, MKDIR, RMDIR, etc.

>Also are their any sites or areas that provide
>information on developing contained operating
>systems like BeOS personal is? Such as an IMG
>file on a Fat Drive that contains the Ext2 for
>my filesystem with all my files and information
>and is bootable etc ?????

I don't know of any program that acts like an ext2 analog of MTOOLS; i.e. something that lets DOS and Windows users treat a file like an ext2-formatted disk. Too bad, because this would be a nice thing to have.
Guest

RE:Working with IMG's?

Post by Guest »

>On 2002-01-08 23:44:04, Chris Giese wrote:
>There is also something called MTOOLS, which lets you treat a file like a DOS disk. You can FORMAT it, COPY files to it, DELETE files, MKDIR, RMDIR, etc.

Hey, howcome my comes in with 'bximage' that only creates
image instead of taking a snapshot? What version is your bochs?
Chris Giese

RE:Working with IMG's?

Post by Chris Giese »

>On 2002-01-09 14:52:07, Anonymous wrote:
>Hey, howcome my comes in with 'bximage' that only creates
>image instead of taking a snapshot? What version is your bochs?

It's a version of Bochs compiled for Windows.
This one, I think:
http://members.xoom.com/thekernel/

For completeness, here are some other Windows binaries:
ftp://ftp.v.nu/Bochs/BochsWin32-991114a.zip (no debugger)
http://users.ox.ac.uk/~sedm0996/bochs.html
http://www.psyon.org/bochs-win32/
Post Reply