Hi
I'm really new to OS development , I have theoretic OS knowledge and I decided that I want to
start learning by doing.
I've read some of the tutorials out there and the Bare Bones tutorial was the best I've found.So I
decided to work according to it.
I'm working on a virtual box (Sun's virtual box) running Ubuntu,
I've compiled and linked all the needed files , installed qemu emulator and created the kernel image.
After running qemu with the given command: qemu -fda floppy.img the GRUB command prompt is displayed.
As instructed I've calculated the number of kernel blocks( kernel.bin size is 4976 --> 10 blocks)
but when I type kernel 200 + 10 I'm receiving an Error 13.
I've tried to read and look for similar problems here and on the net but couldn't find any.
I ran 'mbchk' as suggested in the tutorial but all checks passed.
BUT I did notice a strange thing , according to the tutorial I created a pad file (of length 750).
Quote: "Also create a file named pad with exactly 750 bytes (content does not matter; more precisely, the 750 is the result of 102400 - len(stage1)- len(stage2)). eg: 102400 - (512 + 101138) = 750"
I checked the size of stage1 file and it is indeed 512 , but the size of stage2 is NOT 101138 but
121468 , which gives a negative number according to the equation above.
I really don't know if this has something to do with my kernel not working.
I would really appreciate any help with this.
Thank you.
Bare Bones tutorial , problem with kernel boot
Re: Bare Bones tutorial , problem with kernel boot
I fixed the problem , the problem was in fact due to the incorrect size of stage2 which is assumed
in the tutorial to be 101138 (and it is NOT correct), I copied the stage1 and stage2 files from an older package and it worked.
I think you need to correct this in the tutorial , or at least explain what are you doing in this computation of the pad file size , and make a note that this computation is wrong for other versions of GRUB.
in the tutorial to be 101138 (and it is NOT correct), I copied the stage1 and stage2 files from an older package and it worked.
I think you need to correct this in the tutorial , or at least explain what are you doing in this computation of the pad file size , and make a note that this computation is wrong for other versions of GRUB.
- gravaera
- Member
- Posts: 737
- Joined: Tue Jun 02, 2009 4:35 pm
- Location: Supporting the cause: Use \tabs to indent code. NOT \x20 spaces.
Re: Bare Bones tutorial , problem with kernel boot
Nah: I think that tutorial should remain just the same
17:56 < sortie> Paging is called paging because you need to draw it on pages in your notebook to succeed at it.
Re: Bare Bones tutorial , problem with kernel boot
The stage2 length is for the copy of GRUB linked to by the page it is mentioned on, which (IIRC) is 0.95; for 0.97 it is indeed a bit longer, specifically just under 208 sectors, so you could pad it out to that length, or just get the stage2 from the wiki...