Seeking advice : Feasiblity of writing boot loader in 1 semester 
Author Message
 Seeking advice : Feasiblity of writing boot loader in 1 semester

Hi,

I am a Master's student in CS and have the option to choose a self
defined project for 1 semester (Spring).

I do not have much experience with Assembly language programming.

I want to write a minimalistic boot loader for this project.

Aims being :
1) To learn Assembly language prog
2) To understand the Intel architecture
3) Most importantly : to understand a component of Operating systems
that I currently do not .

Seeking advice :
Is it feasible at all to write a simple boot loader in 1 semester ?
Will I be able to boot any OS from it ? Which would be the simplest
one for me to work towards to enabling boot support ?

Any help/pointers/resources for this would be highly appreciated.

Thanks,
sriad



Sun, 29 May 2005 02:40:18 GMT  
 Seeking advice : Feasiblity of writing boot loader in 1 semester

Aditya Srinivasan a icrit :

Quote:
> Hi,

> I am a Master's student in CS and have the option to choose a self
> defined project for 1 semester (Spring).

> I do not have much experience with Assembly language programming.

> I want to write a minimalistic boot loader for this project.

> Aims being :
> 1) To learn Assembly language prog
> 2) To understand the Intel architecture
> 3) Most importantly : to understand a component of Operating systems
> that I currently do not .

> Seeking advice :
> Is it feasible at all to write a simple boot loader in 1 semester ?
> Will I be able to boot any OS from it ? Which would be the simplest
> one for me to work towards to enabling boot support ?

> Any help/pointers/resources for this would be highly appreciated.

> Thanks,
> sriad

One semester should be enough to write a simple OS (if you know assembly
that's it).

Here you'll find infos about boot loaders, PC architectures, OSes and so
on:

http://www.nondot.org/sabre/os/articles

h.



Sun, 29 May 2005 07:33:05 GMT  
 Seeking advice : Feasiblity of writing boot loader in 1 semester

Quote:
> Hi,

> I am a Master's student in CS and have the option to choose a self
> defined project for 1 semester (Spring).

> I do not have much experience with Assembly language programming.

> I want to write a minimalistic boot loader for this project.

> Aims being :
> 1) To learn Assembly language prog
> 2) To understand the Intel architecture
> 3) Most importantly : to understand a component of Operating systems
> that I currently do not .

> Seeking advice :
> Is it feasible at all to write a simple boot loader in 1 semester ?

I wrote a FAT12 boot loader in under a week, but I have been programming in
assembler for about 10 years ... Since you presumably have done a bit of
programming, being a CS student, I think you could probably pick up enough
assembler and write a boot loader in 1 semester. It depends on what language
you have been using though. If you only know Java, you will find it a lot
more difficult than if you have learnt stuff like C, as Java hides things
like pointers, what variables actually are, etc.

Quote:
> Will I be able to boot any OS from it ?

Sort of. What most 0th-stage HDD-based bootloaders do it sit in the MBR
(first sector of the HDD) and then load up the first sector of whichever
partition is requested to be booted, often through a pretty menu. This is
not too hard to do.

However, the 1st-stage bootloader, the one that sits in the first sector of
the booted partition, is OS dependant. Different OS's have different
filesystems, so making a generic bootloader that can read FAT12/16/32,
ext2fs, NTFS, HPFS, ReiserFS, etc, etc and also correctly load the kernel
for any OS is a huge task, and basically pointless and this functionality is
provided in the 1st-stage bootloader that comes with the OS.

Quote:
> Which would be the simplest
> one for me to work towards to enabling boot support ?

One which is always fun, and relatively simple, is to make a replacement
FAT12 bootsector for DOS. This teaches you pretty much everything there is
to know about how a bootloader works, from FS details (including the lovely
12-bit FAT hacks), to code-size optimisation, and boot conditions. You can
also turn it into a generic FAT12 bootloader (loads up any file on the disk
into a specified location in memory) quite easily.

This is also relatively safe as you can use something like BOCHS to do all
you testing and debugging, and forget abou HDDs.

--
Michael Brown
My inbox is always open (remove the obvious):



Sun, 29 May 2005 07:56:06 GMT  
 Seeking advice : Feasiblity of writing boot loader in 1 semester

    Aditya> Hi, I am a Master's student in CS and have the option to
    Aditya> choose a self defined project for 1 semester (Spring).

    Aditya> I do not have much experience with Assembly language
    Aditya> programming.

    Aditya> I want to write a minimalistic boot loader for this
    Aditya> project.

    Aditya> Aims being : 1) To learn Assembly language prog 2) To
    Aditya> understand the Intel architecture 3) Most importantly : to
    Aditya> understand a component of Operating systems that I
    Aditya> currently do not .

I am not sure that is is sensible to write a boot loader, since
several boot loaders exists (LILO, GRUB....) for x86 PCs in the
opensource community.

An alternative could be to contribute to enhance existing boot
loaders.

--

Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net
alias: basile<at>tunes<dot>org
8, rue de la Fa?encerie, 92340 Bourg La Reine, France



Sun, 29 May 2005 09:21:02 GMT  
 Seeking advice : Feasiblity of writing boot loader in 1 semester

Quote:
> Is it feasible at all to write a simple boot loader in 1 semester ?

I think that might be dangerous. Specifying the program, learning assembler,
writing the program, debugging the program, and /then/ writing up a proper
report on it, all in one semester, is likely to be too much for anyone.
Assembly programming (especially for the IA) is not easy; it's not like
knocking up a program in a BASIC interpreter. Debugging boot-related
software is notoriously tricky. Don't be disappointed!

Quote:
> Will I be able to boot any OS from it ? Which would be the simplest
> one for me to work towards to enabling boot support ?

I would suggest that instead of writing a new bootloader yourself, you find
an existing bootloader (free, open, or prioprietary, whatever is convenient)
that you know works (and for which the original assembly source code is
available), and then make your project to be simply: to analyse the program;
find out in detail exactly what it is meant to do; work out in detail
exactly how it does it; produce a full, well-written, paper on your
findings.

I think this will work well as a project, because you know you will end up
with a respectable-looking project report at the end for your tutor (and
future employers) to read and appreciate, and because you will not waste any
time actually writing (and debugging) code that doesn't do anything new or
original. It will give you the whole semester to devote to writing and
polishing the report (it never does any harm to make sure that your papers
look good). If you have time over, you could add a section which discusses
ways in which the program could be improved.

This is just a suggestion (I do not know enough about you to be more
specific or definite). Maybe your tutor can help you?

If you really fancy writing a bootloader, I suggest you do it unofficially,
and don't officially make it a part of your project. That way you can enjoy
it: you will have no time constraints, and there will be no serious
consequences as to how well it works.

Anyway, best of luck, and be diligent!

--
Nick Roberts



Wed, 15 Jun 2005 14:47:17 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Problems writing a boot loader

2. CDROM MULTI OS BOOT LOADER

3. Boot loader

4. My boot strap loader won't load a sec and run it

5. boot loader, need segment info

6. boot from floppy but run the bootstrap loader on the hard drive

7. About Old Boot Loaders???

8. Mini op system was boot loader

9. boot strap loaders wanted

10. Boot loader

11. PC boot loader

12. OS Boot Loader in NASM

 

 
Powered by phpBB® Forum Software