Page 1 of 1

BareBones/Grub Problem

Posted: Mon Feb 23, 2009 4:30 pm
by dayron
Hello,

I have managed to create a floppy.img on Windows using the command:

Code: Select all

copy /b stage1+stage2+pad+kernel.bin  floppy.img
my Stage1 file is 512 bytes.
my Stage2 file is 101,138 bytes.
my pad file is 750 bytes (I put 750 A on an empty file).
my kernel.bin file is 2,426 bytes
.

I have edited the bochsrc.txt file as stated in the Bare Bones Wiki Tutorial, when I run BOCHS, I enter the number 6 (Begin Simulation)... It shows the "monitor", and ends up in a Grub command prompt. I followed the Bare Bones tutorial, and in the command prompt, I entered

Code: Select all

kernel 200+5


^^I entered kernel 200+5 because the 5 is my kernel.bin size (2,426) divided by 512 = 4.73828125, which when rounded as in the tutorial equals 5.

When I enter the command kernel 200+5, I receive the following error:

Code: Select all

Error 13: Invalid or unsupported executable format
Please tell me what I'm dong wrong and how to solve it. This is my first try at building an "OS", I think I followed all the steps in the tutorial correctly.

Thank You

Re: BareBones/Grub Problem

Posted: Mon Feb 23, 2009 4:40 pm
by JohnnyTheDon
Your first problem is color. No color is a rule for posts on this forum because some people (like myself) use different themes and have trouble seeing text in certain colors.

What are you building the files with? If you're not using a GCC cross-compiler or some other elf producing compiler you'll have this problem.

Re: BareBones/Grub Problem

Posted: Mon Feb 23, 2009 4:59 pm
by dayron
JohnnyTheDon wrote:Your first problem is color. No color is a rule for posts on this forum because some people (like myself) use different themes and have trouble seeing text in certain colors.

What are you building the files with? If you're not using a GCC cross-compiler or some other elf producing compiler you'll have this problem.
Color is not a problem since this message is not necessarily meant for you. I'm not making you have to read the message, ?right?... There we go.
____________________________________________________________________
I suppose I use GCC since I have Cygwin installed and that's what I used for the whole process.

Thank You! <--> Enjoy colors... Digital Choice and Freedom Act of 2002

Re: BareBones/Grub Problem

Posted: Mon Feb 23, 2009 5:09 pm
by JohnnyTheDon
Use a cross-compiler, not cygwin. Cygwin makes PE files.

And about the color issue, its in the forum rules smart one: http://forum.osdev.org/viewtopic.php?f=1&t=16944
6: Write legibly
Use

Code: Select all

..
tags when posting code. Use indentation and source comments. This will make it easier to determine how your code works. Do not write in colours. Not everybody uses the same theme and colouring your text might render it invisible. Do not post long urls and large images. These will stretch the window and make it difficult to read normal text. Use .. tags for long links, post a link for images. Remember that some people are still on dial-up and have a 800x600 screen resolution.
RTFM

Re: BareBones/Grub Problem

Posted: Mon Feb 23, 2009 6:41 pm
by steveklabnik
dayron wrote:Color is not a problem since this message is not necessarily meant for you. I'm not making you have to read the message, ?right?... There we go.

Cool. And you're not making us answer, either.

Re: BareBones/Grub Problem

Posted: Tue Feb 24, 2009 1:32 am
by Solar
dayron wrote:Color is not a problem since this message is not necessarily meant for you. I'm not making you have to read the message, ?right?... There we go.
Excellent. Post count of seven, and already established himself to be a class A a**hole. Saves us the trouble of having to answer any of his questions. :roll:

Re: BareBones/Grub Problem

Posted: Tue Feb 24, 2009 2:57 am
by AJ
dayron wrote:Thank You! <--> Enjoy colors... Digital Choice and Freedom Act of 2002
Locked - Forum Rules 2009