making an image with grub to test iut with bochs
making an image with grub to test iut with bochs
i have the file kernel.bin witch have the multiboot header for grub - it is bran's kernel - how can i use grub to make an image that i can test it with bochs i never used grub before and i am using windows i assure you that google was gonna tell me "That's enough you are searching for hours!!"
- AndrewAPrice
- Member
- Posts: 2309
- Joined: Mon Jun 05, 2006 11:00 pm
- Location: USA (and Australia)
Re: making an image with grub to test iut with bochs
Either, find a grub FAT12-formatted floppy image and use that, or get find a Windows port of grub (I think I recall a projected called WinGRUB or something similar) and create a floppy disk, then use a imaging tool (I'd use WinImage) to turn the disk into an image.mohammed wrote:i have the file kernel.bin witch have the multiboot header for grub - it is bran's kernel - how can i use grub to make an image that i can test it with bochs i never used grub before and i am using windows i assure you that google was gonna tell me "That's enough you are searching for hours!!"
Once you have your image, use a program which allows you to either edit or mount a floppy image (again, I use WinImage, but look on the Wiki for other tools) and copy kernel.bin onto the floppy image. Unmount/save the image then run bochs.
My OS is Perception.
Re: making an image with grub to test iut with bochs
There's also a "makeboot.exe" program that comes with a release of BartPE that will do this kinda stuff too...I used that when I'd do anything that required booting on Windows.MessiahAndrw wrote:Either, find a grub FAT12-formatted floppy image and use that, or get find a Windows port of grub (I think I recall a projected called WinGRUB or something similar) and create a floppy disk, then use a imaging tool (I'd use WinImage) to turn the disk into an image.mohammed wrote:i have the file kernel.bin witch have the multiboot header for grub - it is bran's kernel - how can i use grub to make an image that i can test it with bochs i never used grub before and i am using windows i assure you that google was gonna tell me "That's enough you are searching for hours!!"
Once you have your image, use a program which allows you to either edit or mount a floppy image (again, I use WinImage, but look on the Wiki for other tools) and copy kernel.bin onto the floppy image. Unmount/save the image then run bochs.
Not sure if you can use GRUB with it...but, meh.
I've found it easier to work with CD images, since mkisofs is available for cygwin. Assuming you're not attached to using floppies, you can get mkisofs in the cdrtools package here: http://freshmeat.net/projects/cdrecord/
When I was still working with floppies, I didn't have a physical floppy drive in my development machine, and used FileDisk to mount floppy images as drives. This is a convenient way to do things if you use a linux (cygwin) build environment, since you can just write a bash script to create the distributable floppy image (or just stick it in your makefile). Read more about filedisk here: http://www.osdev.org/wiki/File_Disk
I wasn't terribly pleased with WinImage, since it advertises itself as a trial. You also have to click through their GUI every time you want to test your new build, when filedisk or mkisofs could be automated with a script. Just a convenience thing, but when you're already stuck on something, that extra convenience is always helpful.
On an unrelated note, you may like Qemu (as an alternative to bochs). Again, just a personal preference, but it's much easier to configure than bochs if you use any of the front-ends that are available (I use qemu manager), and provides a gdb-like console mode that is handy for tracking down bugs.
When I was still working with floppies, I didn't have a physical floppy drive in my development machine, and used FileDisk to mount floppy images as drives. This is a convenient way to do things if you use a linux (cygwin) build environment, since you can just write a bash script to create the distributable floppy image (or just stick it in your makefile). Read more about filedisk here: http://www.osdev.org/wiki/File_Disk
I wasn't terribly pleased with WinImage, since it advertises itself as a trial. You also have to click through their GUI every time you want to test your new build, when filedisk or mkisofs could be automated with a script. Just a convenience thing, but when you're already stuck on something, that extra convenience is always helpful.
On an unrelated note, you may like Qemu (as an alternative to bochs). Again, just a personal preference, but it's much easier to configure than bochs if you use any of the front-ends that are available (I use qemu manager), and provides a gdb-like console mode that is handy for tracking down bugs.
If I remember correctly, there's a Windows port of mkisofs as well...speal wrote:I've found it easier to work with CD images, since mkisofs is available for cygwin. Assuming you're not attached to using floppies, you can get mkisofs in the cdrtools package here: http://freshmeat.net/projects/cdrecord/
When I was still working with floppies, I didn't have a physical floppy drive in my development machine, and used FileDisk to mount floppy images as drives. This is a convenient way to do things if you use a linux (cygwin) build environment, since you can just write a bash script to create the distributable floppy image (or just stick it in your makefile). Read more about filedisk here: http://www.osdev.org/wiki/File_Disk
I wasn't terribly pleased with WinImage, since it advertises itself as a trial. You also have to click through their GUI every time you want to test your new build, when filedisk or mkisofs could be automated with a script. Just a convenience thing, but when you're already stuck on something, that extra convenience is always helpful.
On an unrelated note, you may like Qemu (as an alternative to bochs). Again, just a personal preference, but it's much easier to configure than bochs if you use any of the front-ends that are available (I use qemu manager), and provides a gdb-like console mode that is handy for tracking down bugs.
Supposed to do everything mkisofs can do for Linux...I don't have any looks though, but Google might.
http://www.jamesmolloy.co.uk/downloads/floppy.img
That's an ext2 formatted disk image with a file called 'kernel' on it, grub installed and menu.lst set up.
That's an ext2 formatted disk image with a file called 'kernel' on it, grub installed and menu.lst set up.
Short story shorter, GRUB's purpose is to handle all the dirty work of setting your kernel up to be in 32-bit protected mode.mohammed wrote:thank you all i thought it will be something like this
grub input:kernel.bin output:kernel.image that i can use with bochs
i was extremely wrong what is the use of grub then ???????
i am going to try programs that you mentioned and if i faced a problem you are there right ?
is it okay to use VFD ??
Use GRUB to load your kernel loader, then that calls your kernel, etc...
i am really sorry dudes for being dump
look!
when you want to assemble your bootsector you type
nasm so and so
whne you want to compile your kernel
you type
gcc so and so
i assembled and compiled and linked them all with the result kernel.bin
now i want to test it with bochs
next step is to type
grub so and so in order to have a result like this kernel.img
so i can test it with bochs i have the configuration file already what al i want is one by one steps to have the file that i can test
(
look!
when you want to assemble your bootsector you type
nasm so and so
whne you want to compile your kernel
you type
gcc so and so
i assembled and compiled and linked them all with the result kernel.bin
now i want to test it with bochs
next step is to type
grub so and so in order to have a result like this kernel.img
so i can test it with bochs i have the configuration file already what al i want is one by one steps to have the file that i can test
![Sad :(](./images/smilies/icon_sad.gif)
Well, if you want to do a CD ISO boot (which is simplest in my opinion for doing GRUB), just look at the GRUB documentation.mohammed wrote:i am really sorry dudes for being dump
look!
when you want to assemble your bootsector you type
nasm so and so
whne you want to compile your kernel
you type
gcc so and so
i assembled and compiled and linked them all with the result kernel.bin
now i want to test it with bochs
next step is to type
grub so and so in order to have a result like this kernel.img
so i can test it with bochs i have the configuration file already what al i want is one by one steps to have the file that i can test(
now i want to know your problem more than mine
i have kernel.bin
i want to convert it to kernel.img that i can use with bochs
we have two cases you know the answer and thank you for it
the second one os wasting both my time and yours by offering me google
do you think that i didn't try it
i setup cygwin so i can use linux commands but i failed to have a result also![Sad :(](./images/smilies/icon_sad.gif)
i have kernel.bin
i want to convert it to kernel.img that i can use with bochs
we have two cases you know the answer and thank you for it
the second one os wasting both my time and yours by offering me google
do you think that i didn't try it
i setup cygwin so i can use linux commands but i failed to have a result also
![Sad :(](./images/smilies/icon_sad.gif)
Insufficient input.
Redo from start.
Honestly. JamesM and kubeos linked a ready-made floppy image for your convenience. You might also want to check the various wiki pages (Disk Image Utilities, GRUB, Bochs) on the subject.
And if that really does not help you, it will certainly help if you provide a proper error description instead of "I failed to have an result". That way, we could try to solve your problem instead of having to defend against an attitude.
Redo from start.
Honestly. JamesM and kubeos linked a ready-made floppy image for your convenience. You might also want to check the various wiki pages (Disk Image Utilities, GRUB, Bochs) on the subject.
And if that really does not help you, it will certainly help if you provide a proper error description instead of "I failed to have an result". That way, we could try to solve your problem instead of having to defend against an attitude.
Every good solution is obvious once you've found it.
Well, if you'd have read the GRUB manual, it gives you step-by-step directions on how to create an ISO, which works just as well (but better in some aspects) as an IMG file for floppy disks.mohammed wrote:now i want to know your problem more than mine
i have kernel.bin
i want to convert it to kernel.img that i can use with bochs
we have two cases you know the answer and thank you for it
the second one os wasting both my time and yours by offering me google
do you think that i didn't try it
i setup cygwin so i can use linux commands but i failed to have a result also
I gave you the link to Google because if you aren't going to take the time to research keywords people here give you, then why should we give you a step-by-step tutorial on how to do your work?
Like I said, just to reiterate my point...the GRUB manual has a section on creating bootable images and discs...which also includes a guide on creating a bootable CD ISO, step-by-step in the baby-way.
i reviewed the faq and downloaded the file grub_disk.img
now i have kernel.bin (that is boot.asm+main.c)
grub_disk.img (i still don'tknow what it is exactly)
bochsrc.txt (that allow me to emulate with bochs)
see? i have alot of things what i need is less than what i have
how can i add kernel.bin and grub_disk.img to test it with bochs
i swear i wasted the whole night trying tar dd mount and so on but i figured out that i am not clever in linux stuff anyway are you gonna tell me or should i kill myself to end this miserable scene!!
don't be stingy God will punish you for hiding knowledge
now i have kernel.bin (that is boot.asm+main.c)
grub_disk.img (i still don'tknow what it is exactly)
bochsrc.txt (that allow me to emulate with bochs)
see? i have alot of things what i need is less than what i have
how can i add kernel.bin and grub_disk.img to test it with bochs
i swear i wasted the whole night trying tar dd mount and so on but i figured out that i am not clever in linux stuff anyway are you gonna tell me or should i kill myself to end this miserable scene!!
don't be stingy God will punish you for hiding knowledge