flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Second-Stage Loader before File System?

Author
Thread Post new topic Reply to topic
RHaden



Joined: 22 Aug 2009
Posts: 6
RHaden 28 Aug 2009, 01:43
I'm starting this thread here because I still can't get into the Osdev forums. Mad

Anyway, I'm thinking about putting my second-stage loader before the start of the actual file-system structure (which will be based on the FAT). That way it will always start at the second logical sector and the boot loader doesn't need to understand the file system in order to load it. Does anyone see any major disadvantages to doing this? Please don't be afraid to speak out - by no means am I an expert here! Razz
Post 28 Aug 2009, 01:43
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20309
Location: In your JS exploiting you and your system
revolution 28 Aug 2009, 02:03
Well usually I am afraid to say anything here, but since you say "don't be afraid" then I will make a comment. Razz

Basically, it doesn't matter what you do when you start your OS. It all depends upon how you have structured it. If you find that putting a "second-stage" loader before something else to be useful to aid your development then go ahead and do it. You have nothing to lose by trying.

No one else can tell you that it is bad, or good, since no one else but you knows what your OS even does or how it works.
Post 28 Aug 2009, 02:03
View user's profile Send private message Visit poster's website Reply with quote
cod3b453



Joined: 25 Aug 2004
Posts: 618
cod3b453 28 Aug 2009, 13:15
I've also planned to do it that way both for simplicity and allowing me to have code to debug any FS problems.
Post 28 Aug 2009, 13:15
View user's profile Send private message Reply with quote
Mac2004



Joined: 15 Dec 2003
Posts: 314
Mac2004 28 Aug 2009, 13:43
Maybe this example helps you a bit?

http://board.flatassembler.net/topic.php?t=6529


Regards
Mac2004
Post 28 Aug 2009, 13:43
View user's profile Send private message Reply with quote
dosin



Joined: 24 Aug 2007
Posts: 337
dosin 28 Aug 2009, 13:59
Quote:
Second-Stage Loader before File System


If your using a floppy disk for testing.. should be fine only would cause a little less space on what all ready has limited space..

using a floppy disk every bit counts..

but you could code it to have a multi boot sys.. loads your OS on the floppy or if keypress load the mbr off the hd... but could all be done by removing the floppy..but would be good to learn how to boot your OS and how other OS boot..

For testing I made a multi boot system for a floppy but does not boot the floppy .. it boots the HD ... either windows or my os.. I am still working on a new file system..

but like rev... stated - its your os.. you are in control of how it loads..

but one advandage of just using the Fat is that other OS can read it..
so just copy and past your updated kernel and go .. versus using a tool to format every time you make a change.. your floppies will last longer..
Post 28 Aug 2009, 13:59
View user's profile Send private message Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville 29 Aug 2009, 02:12
Maybe it's not so much the OS but the particular application you're running that decides what is accessible. For example I use DEBUG a lot for reading and writing disk sectors. However all of the Microsoft versions of DEBUG supplied with MSDOS or Windoze are annoying because they refuse to access any media without a valid FAT and the so-called BIOS Parameter Block (BPB). They also check that their own "version" matches the OS version for no apparent reason other than to be a pain. I discovered that the DR-DOS version of DEBUG contains no limitations and is quite happy to read/write disk sectors on non-FAT disks, even disks without the BPB, and when running under any version of DOS or Windoze! Very Happy

An excellent 32-bit version of DEBUG, David Lindauer's "Get Real DeBugger" GRDB also has no such limitations when running under DOS. It even has support for Flat Real Mode and PCI bus access so I've used it extensively Cool

_________________
FAMOS - the first memory operating system
Post 29 Aug 2009, 02:12
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.