I need some guidance

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
cristian
Posts: 5
Joined: Sun Jul 25, 2010 11:41 pm

I need some guidance

Post by cristian »

[needs-mercy]
I'm sorry for asking this here, i really don't want to piss anybody off.
To be honest i'm kinda scared, that is why i lost a couple of nights searching to solve my problem.
I hope i won't disturb anybody.
[/needs-mercy]

So for the past 2 nights i'm trying to figure out how to use an emulator to test my kernel.
The real problem comes when i'm trying to make a bootable disk image, since i don't have a floppy drive or enough money to buy a dozen of CD-ROMs.
I tried using boch.I used bochs' image creation tool(bximage) to create a flat 700 mb image.However, i tried mounting it with daemon tools, no success, because it won't recognise the format.I also created a floppy disk image.I used a program that i found somewhere on this forum called "vfd" to mount my image.It worked great, i placed my bootloader and the kernel on the disk, but after i load it with bosch an error messages poped up saying that
Remove disks or other media.
Press any key to restart.
Bochs bxrc file
megs: 32
romimage: file=$BXSHARE/BIOS-bochs-latest
vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest
vga: extension=vbe
floppya: 1_44=floppy.img, status=inserted
#I created a hdd.img, but i still get the error, that's why i commented it
#ata0-master: type=disk, path="hdd.img", mode=flat, cylinders=20, heads=16, spt=63
boot: floppy
log: bochsout.txt
mouse: enabled=0
cpu: ips=15000000
vga_update_interval: 150000
I removed all my virtual and physical disks(unmounted anything that was mounted via PowerISO or "vfd", but the error message still pops up.)

It is kinda anoying considering that this is not even the fun part.
I recently switched from game programming(i worked on a Gothic multiplayer mod which supported up to 10 players and on a 2D side scroller).
I finished both of my projects, but i felt that i need something else.

PS: Please don't be to harsh with me, i barely managed to write this post. :oops:
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: I need some guidance

Post by Combuster »

Hello and welcome to these forums. Please do read the rules before posting, amongst others:
Forum rules wrote:Grovelling is not a substitute for doing your homework

Some people who get that they shouldn't behave rudely or arrogantly, demanding an answer, retreat to the opposite extreme of grovelling. “I know I'm just a pathetic newbie loser, but...”. This is distracting and unhelpful. It's especially annoying when it's coupled with vagueness about the actual problem.

Don't waste your time, or ours, on crude primate politics. Instead, present the background facts and your question as clearly as you can. That is a better way to position yourself than by grovelling.

As for your actual problem: A bootloader is not a file on a disk - how would the computer know that it should run that specific file? Instead you have to install a bootsector or use a floppy image with a preinstalled bootloader. Instructions for both are on the wiki.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: I need some guidance

Post by AJ »

Hi,

Edit: Combuster answered the actual question. Specifically, for your floppy you need to look at Partcopy or dd. For the ISO, you need to look at Mkisofs.

[OT]If you have researched a problem (as you obviously have) and thought about your question (as you have), you really shouldn't need to worry about getting flamed. If you do, use the "report this post" button at the top of the offending post. If people can get this worried about a first post, we're obviously doing something very wrong.[/OT]

Cheers,
Adam
User avatar
Thomas
Member
Member
Posts: 284
Joined: Thu Jun 04, 2009 11:12 pm

Re: I need some guidance

Post by Thomas »

Hi,
The bootsector needs to placed in the first sector of the floppy.you can use ready made programs like partcopy or dd . you can even write a simple program using write() , that just overwrites the first 512 bytes of your image with the bootsector you created :) .For creating floppy images graphically, you can use Winmage.Latest versions I guess allow you to create iso's as well :).

--Thomas
cristian
Posts: 5
Joined: Sun Jul 25, 2010 11:41 pm

Re: I need some guidance

Post by cristian »

I made a little tool in VC++ 6 that writes a loader(or whatever i want) in the first 512 bytes of the disk image.
After that, everything worked well, thank you very much guys!

PS: I attached that little tool i made, in case any newbie can make any use of it.
Thanks!
Attachments
upload.zip
Contains the source file(VC++ 6).
(28 KiB) Downloaded 88 times
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re: I need some guidance

Post by Candy »

That's basically what DD and partcopy can do too ... except that they can do a lot more too, are used all around the world and are maintained without costing you time. Plus, they've been tested much more.
Post Reply