Page 1 of 1

GRUB and my OS

Posted: Sat Feb 23, 2002 10:49 am
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 !

Re: GRUB and my OS

Posted: Sat Feb 23, 2002 4:49 pm
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.

Re: GRUB and my OS

Posted: Sat Feb 23, 2002 9:46 pm
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 ?

Re: GRUB and my OS

Posted: Sun Feb 24, 2002 1:38 am
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!

Re: GRUB and my OS

Posted: Sun Feb 24, 2002 2:07 am
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?

Re: GRUB and my OS

Posted: Sun Feb 24, 2002 2:42 am
by ImagineOS
Can I just ask, Am I correct in thinking that your OS Says "My OS is sh*t?"

Re: GRUB and my OS

Posted: Thu Feb 28, 2002 5:57 pm
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!