GRUB and my OS

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
JoN

GRUB and my OS

Post by JoN »

Hello people,

I'm a french (excuse my english) Linux user (not a newbie, but not an expert ;D) of 13 years old (re-excuse).
I'm good in C programming and I wanna create my own OS.
I've seen the FAQ from mega-tokyo, i've written an 'Hello World'-like kernel and i wanna boot onto it. This code is the same as Whatever5k (with differences but the same result).
I have added this in /boot/grub/menu.lst :

Code: Select all

# 3: bOSs, mon OS de merde
title bOSs
root (hd0,4)
kernel (hd0,4)/bosskz
boot
The kernel, /bosskz, is compiled with a shellscript :

Code: Select all

gcc -o /kz.o -c boss.c
ld /kz.o -o /bosskz --oformat elf32-i386 -tText 0x100000
rm /kz.o
I'm not exactly sure, i'm under Windows (it's AOHeLL...).
Then i've rebooted and i've selected bOSs in the boot list.
AND THEN, THE MIRACLE !

It didn't work >:( !!

Why ? I don't know ! ???

I really need help, plz !
K.J.

Re: GRUB and my OS

Post by K.J. »

If your kernel is on your first hard disk then what you have should work. If your kernel is on a floppy then try this:

# 3: bOSs, mon OS de merde
title bOSs
root (fd0,4)
kernel (fd0,4)/bosskz
boot


Hope that helps,
K.J.
JoN

Re: GRUB and my OS

Post by JoN »

Yes, in fact it's work, but the fuction I used (write to the screen buffer) didn't work. It is the same as the FAQ.
Must I go in Pmode before using the screen buffer ?
User avatar
df
Member
Member
Posts: 1076
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re: GRUB and my OS

Post by df »

grub starts you in pmode.

what you should do

1) - make your own selectors and point cs/ds/es/fs/gs at them

2) - make your own stack!
-- Stu --
Whatever5k

Re: GRUB and my OS

Post by Whatever5k »

Hm, two questions are interesting for me:
1. Do you have only C-files or assembler, too?
2. Did you implement the multiboot-header, and if yes, how?
ImagineOS

Re: GRUB and my OS

Post by ImagineOS »

Can I just ask, Am I correct in thinking that your OS Says "My OS is sh*t?"
Kevin

Re: GRUB and my OS

Post by Kevin »

dude! your 13 and writing your own os? cool! i'm 15 and havn't even learned c/c++ yet, much less write my own os  :D

keep up the good work!
Post Reply