Question

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
Tom

Question

Post by Tom »

( I would have made the title different...but didn't know what even to call this ).
I have a question, as you might know ;)

I have 2 bins that are created...in linux commands...or even DOS comands/programs, how would I make those two files put together? like, here's on a floppy:

bootsector->Kernel.

How would I take my two bin files and make them one file like this:

somefile.bin:
bootsector & then kernel.bin

thank you,
Tom

Re:Question

Post by Tom »

( i need to do this because i'm wearing out my floppys...and I need to make a image file for BOCHS )
PlayOS

Re:Question

Post by PlayOS »

Hi,

Why dont you write a small c++ program that will take a list of files and join them into one, in the order in which they are passed. ;)
Tom

Re:Question

Post by Tom »

DUH!

Of all that time programming....and I didn't even think of that!

Thankyou.
Curufir

Re:Question

Post by Curufir »

Can't you do this with dd in Linux if you had a nice big file to dd it into?

Here's another idea:
You can mount a file (Bochs comes with a utility bximage to create blank hd and fd images) on the loopback device, you then copy files to it as you normally would to a floppy, then unmount the file and use it as an image in bochs (I guess in theory you could point bochs at the loopback device, but I wouldn't recommend it).

You could probably wrap that all up quite nicely into a bash script. So after you've put the bootsector in using dd you can just use the file as you would a normal disk.

Was this what you wanted?

More fun things to do with Bochs under Linux:
Setup the serial port on bochs to let you view Bochs com1 output on a linux console or X window. So you can pass debugging messages from your kernel to the serial port and see them real (Bochs real) time.

Bochs + Linux is very versatile, and the prereleases of version 2.0 runs very nicely indeed.

Curufir
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Question

Post by Pype.Clicker »

cat bootsector.bin kernel.bin > floppy.bin

or

copy /b bootsect.bin +kernel.bin floppy.bin

(note: it was in the manuals ;D )
Tom

Re:Question

Post by Tom »

Oh ok....

( I did look in the help command and the info command....but I guess I didn't see it )
Post Reply