Bona Fide OS Developer
View unanswered posts | View active topics It is currently Mon Mar 18, 2024 11:24 pm



Post new topic Reply to topic  [ 3 posts ] 
 Booting from network 
Author Message

Joined: Thu Jan 13, 2011 10:56 am
Posts: 13
Location: Costa Rica
Post Booting from network
Hello all, i am new here and this is my thirt post.

Using the Gregor Brunmar tutorials I have made a ".img" disk image (of my toy OS) that can boot the pc and print "Hello World!" in the screen. For do that i copy the image (2 boot sectors + kernel) to my usb drive or floppy using WinImage. But i have a problem booting the image from the network using the PXE environment because it has not file format.

I will explain:

A program named "3Com boot image editor" let me modify the ".img" images and make them "network booteable". The procedure is load the image to floppy, run the application, save the resulting image in another place and use FTPD32.

I have made images from win98 recovery floppy disk and bart's net disk, loading this images into floppy drive i am capable of explore the files inside them. When i use the 3Com program with my Os ".img" file it says "There are no files in the floppy disk", so i guess that the problem is produced because i have made an image with no file format header.

So the question is: how can i add format to my Os image? Does someone has a good idea?

Thank you.

_________________
"De veras hijo: Todas las estrellas han partido, pero nunca se pone más oscuro que cuando va a amanecer" - Isaac Felipe Azofeifa


Wed Feb 02, 2011 9:40 am
Profile YIM WWW

Joined: Fri Aug 20, 2010 10:04 pm
Posts: 41
Post Re: Booting from network
If you are asking the format of floppies, it's usually known as "FAT12". Try google searching that. It's a pitty spending time on that format since floppies are obsolete, but that might be the easiest. You could try to get CD-ROM ISO9660 working. It's slightly more complicated.


Wed Feb 02, 2011 4:28 pm
Profile

Joined: Thu Jan 13, 2011 10:56 am
Posts: 13
Location: Costa Rica
Post Re: Booting from network
Thank you Losethos for the answer.

I was surfing in Google and i have written a little table for fat12, but with no success yet. Here the code.

Code:
[BITS 16]       ; We need 16-bit intructions for Real mode

[ORG 0x0]

;TABLA FAT12
jmp start               ;3 bytes
oem    db "........"             ;8 bytes
bytespersector dw 200h      ;2 bytes, 512d
sectorspercluster db  1         ;1 bytes         
reservedsectors dw 1         ;2 bytes
totalfats db 2            ;1 bytes
maxrootentries dw 224d         ;2 bytes, 240d
totalsectorssmall dw 0b40h      ;2 bytes, 2880d
mediadescriptor db 0f0h         ;1 bytes
sectorsperfat dw 9h         ;2 bytes
sectorspertrack dw 12d         ;2 bytes
numheads dw 2d            ;2 bytes
sectoresOcultos dd 0         ;4 bytes
longitudTotalSect   dd  0         ;4 bytes
driverNumber db 0         ;1 bytes
flags db 0               ;1 bytes
signature db 29h            ;1 bytes, 41d
id dd 0ffffffffh            ;4 bytes
volumelabel db "JMFDOS......"      ;12 bytes, 4294967295
systemid db "FAT12..."         ;8 bytes

;[ORG 0x7C00]               ; The BIOS loads the boot sector into memory fixed location 0x7C00

start:
   mov ax,0x7c0
   mov ds,ax
   ;(the rest of the bootstrap...)


With this code i get a non booteable image that after mounted in the floppy can not be readed. When i uncomment "[org 0x7c00]" and erase the 2 lines after the "start" label and quit the diretive "[org 0x0]" in the first line the image works (like in the past).

Sorry for my english.
Is there something wrong with the fat12 table?

_________________
"De veras hijo: Todas las estrellas han partido, pero nunca se pone más oscuro que cuando va a amanecer" - Isaac Felipe Azofeifa


Wed Feb 02, 2011 9:29 pm
Profile YIM WWW
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 4 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin and tweaked by the BF Team.