BareBones/Grub Problem

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.
Locked
dayron
Posts: 7
Joined: Fri Nov 28, 2008 2:38 pm

BareBones/Grub Problem

Post 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
JohnnyTheDon
Member
Member
Posts: 524
Joined: Sun Nov 09, 2008 2:55 am
Location: Pennsylvania, USA

Re: BareBones/Grub Problem

Post 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.
dayron
Posts: 7
Joined: Fri Nov 28, 2008 2:38 pm

Re: BareBones/Grub Problem

Post 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
JohnnyTheDon
Member
Member
Posts: 524
Joined: Sun Nov 09, 2008 2:55 am
Location: Pennsylvania, USA

Re: BareBones/Grub Problem

Post 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
User avatar
steveklabnik
Member
Member
Posts: 72
Joined: Wed Jan 28, 2009 4:30 pm

Re: BareBones/Grub Problem

Post 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.
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: BareBones/Grub Problem

Post 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:
Every good solution is obvious once you've found it.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: BareBones/Grub Problem

Post by AJ »

dayron wrote:Thank You! <--> Enjoy colors... Digital Choice and Freedom Act of 2002
Locked - Forum Rules 2009
Locked