some questions towards the boot sequence

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
matott
Posts: 3
Joined: Sun Apr 03, 2005 12:00 am

some questions towards the boot sequence

Post by matott »

Hi!
I'm currently developing a small OS. But I have some questions towards the boot sequence:
Grub (0.9.6) is installed in the MBR of the Harddisk (512 Byte - Stage 1) than grub loads Stage 2 which is located at a fixed address (specified in stage1.h), but how is this location linked to an inode and marked as used (e.g. in the ext2/3 bitmap)? And doesn't it conflict with the file system? And how can I instruct grub to load a file from a not specified location which is maybe splited without updating it every time the location changes?
Maybe there are some documents which include the answers to my questions and some additional information.

Thanks
matott
Last edited by matott on Sun Apr 03, 2005 12:00 am, edited 1 time in total.
Legend
Member
Member
Posts: 195
Joined: Tue Nov 02, 2004 12:00 am
Contact:

Re: some questions towards the boot sequence

Post by Legend »

First you copy stage2 to the filesystem - then it is a normal file in the filesystem. Then you install grub stage 1 on it, which will then be able to load stage2.

and if you don't want to enter everything every time, use a menu.lst file!
*post*
matott
Posts: 3
Joined: Sun Apr 03, 2005 12:00 am

Re: some questions towards the boot sequence

Post by matott »

But how does stage1 know where stage2 is on the harddisk (you don't update grub everytime like lilo)?

Code: Select all

  
  File: `/boot/grub/stage1'
  Size: 512             Blocks: 2          IO Block: 4096   regular file
Device: 301h/769d       Inode: 2018        Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2004-07-16 22:01:44.000000000 +0200
Modify: 2004-07-16 22:01:44.000000000 +0200
Change: 2005-01-25 18:13:15.000000000 +0100

  File: `/boot/grub/stage2'
  Size: 100306          Blocks: 198        IO Block: 4096   regular file
Device: 301h/769d       Inode: 2019        Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2005-04-03 17:26:01.000000000 +0200
Modify: 2004-07-16 22:01:44.000000000 +0200
Change: 2005-01-25 18:13:15.000000000 +0100
[AlAdDiN]
Member
Member
Posts: 107
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re: some questions towards the boot sequence

Post by [AlAdDiN] »

when you install the stage1 in the MBR it stores stage2 inode addresse so she can know the size and all information needed to load stage2.
-----------------------
There are 10 types of people in this world... those that understand binary, and those that don't.
Legend
Member
Member
Posts: 195
Joined: Tue Nov 02, 2004 12:00 am
Contact:

Re: some questions towards the boot sequence

Post by Legend »

Stage1 would get updated like Lilo if you modify Stage2! Stage2 can load the kernel however without being modified!
*post*
Post Reply