OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Apr 25, 2024 3:08 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: GRUB and my OS
PostPosted: Sat Feb 23, 2002 10:49 am 
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:
# 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:
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 !


Top
  
 
 Post subject: Re: GRUB and my OS
PostPosted: Sat Feb 23, 2002 4:49 pm 
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.


Top
  
 
 Post subject: Re: GRUB and my OS
PostPosted: Sat Feb 23, 2002 9:46 pm 
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 ?


Top
  
 
 Post subject: Re: GRUB and my OS
PostPosted: Sun Feb 24, 2002 1:38 am 
Offline
Member
Member
User avatar

Joined: Fri Oct 22, 2004 11:00 pm
Posts: 1076
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 --


Top
 Profile  
 
 Post subject: Re: GRUB and my OS
PostPosted: Sun Feb 24, 2002 2:07 am 
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?


Top
  
 
 Post subject: Re: GRUB and my OS
PostPosted: Sun Feb 24, 2002 2:42 am 
Can I just ask, Am I correct in thinking that your OS Says "My OS is sh*t?"


Top
  
 
 Post subject: Re: GRUB and my OS
PostPosted: Thu Feb 28, 2002 5:57 pm 
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!


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 228 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group