Creating image files under linux?

All off topic discussions go here. Everything from the funny thing your cat did to your favorite tv shows. Non-programming computer questions are ok too.
Post Reply
Freanan

Creating image files under linux?

Post by Freanan »

I have been searching the web for days now for a application similiar to
makeboot (just that i need it for linux), which can be used to put a simple bootsector and kernel together in a raw floppy-image file which can boot with bochs or be written onto a real floppy afterwards.
I tried recompiling makeboot under linux, but the imagefile that was created by my recompiled makeboot was messed up and did not work properly.
I tried an image created under windows before and it was laded correctly.
So the problem i this little tool...

After setting up bochs inside wine (it would not run directly with linux) this would be the last step i need, before i can go on with OSDev and lowlevel experiments only under linux and without rebooting all the time..

Please tell me a command or application to use!
Thanks in advance!
DennisCGc

Re:Creating image files under linux?

Post by DennisCGc »

How about DD ?

Code: Select all

dd if=input file of=output file skip=totalsectors to skip
Don't know what the beginning was... seek ? ::)
Freanan

Re:Creating image files under linux?

Post by Freanan »

DennisCGc wrote: How about DD ?

Code: Select all

dd if=input file of=output file skip=totalsectors to skip
Don't know what the beginning was... seek ? ::)
I have already tried it in several ways, but bochs did not accept it..:
i tried:
cp bootsector.bin bochs/1.44
dd if=kernel.bin of=bochs/1.44 skip=1
With skip =1 because the bootsector is 1 sector....
i also tried it without the skip.
And i did not find anything about using 2 input files and one output file automatically.
beyondsociety

Re:Creating image files under linux?

Post by beyondsociety »

cp bootsector.bin bochs/1.44
dd if=kernel.bin of=bochs/1.44 skip=1
With skip =1 because the bootsector is 1 sector....
i also tried it without the skip.
And i did not find anything about using 2 input files and one output file automatically.
To create an image in linux:
After you compile both the bootsector and the kernel, type:
cat bootsector.bin kernel.bin >os_image.img

Then copy the image file to the bochs directory, add the name to the bochsrc file and boot it.

Hope this helps.
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re:Creating image files under linux?

Post by df »

check the OS faq on this site, it has image instructions.
-- Stu --
Post Reply