Bona Fide OS Development
http://forums.osdever.net/

Booting from network
http://forums.osdever.net/viewtopic.php?f=15&t=916
Page 1 of 1

Author:  juanma268 [ Wed Feb 02, 2011 9:40 am ]
Post subject:  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.

Author:  losethos [ Wed Feb 02, 2011 4:28 pm ]
Post subject:  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.

Author:  juanma268 [ Wed Feb 02, 2011 9:29 pm ]
Post subject:  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?

Page 1 of 1 All times are UTC - 6 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/