Netboot Mailing List (by thread)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

netboot image on hard disk - it is easy




It is good joke, at this moment I have only simple version of MBR to load
image from HD, but only from track 0. HD have to have enough sectors per
track for rom image.
And small program in turbo-pascal to download image to HD.

below is assembler code for MBR. Is writen for tasm and tlink. 
If you have 512 bytes binary file with MBR code, then concat it with
rom-image and download to hda. BUT NOT DIRECTLY !!!! You have to copy 
partition table ( and NT signature ) to MBR and then download. BUT ONLY tO
TRACK 0.

Everything in your own risk.

If I will have some free time, I will write some code directly to netboot.

poli




.model large, pascal

.code
.386
	public 	mbrasm, mbrend

ROMLOAD	equ	5000h

	org	600h

mbrasm	proc

	cli
	xor	ax, ax
	mov	ss, ax
	mov	sp, 7C00h
	mov	si, sp
	mov	es, ax
	mov	ds, ax
	sti
	cld
	mov	di, 600h
	mov	cx, 100h
	rep	movsw
	db	0EAh
	dw	offset @@jump
	dw	0
@@jump:
	mov	si, offset Hlaska
	call	@@print

        ; rozmery prvniho HD
        mov     ah, 8
        mov     dl, 80h
        int     13h
        jc      @@chyba
        ; dh - H, cx - CS

        ; prvi stopa obsahuje bootrom, tak ji natahneme do RAM
        mov     ah, 2
        mov     al, cl
        and     al, 3Fh
        dec     al
        mov     dx, 80h
        mov     cx, 2
        mov     bx, ROMLOAD
        mov     es, bx
        xor     bx, bx
        int     13h
        jc      @@chyba

        ; hromada kodu podle zdrojaku netboot
        xor     di, di
        mov     es, di
        mov     di, 380h
        push    di
        mov     cx, 10
        cld
        rep     stosw
        pop     di
        mov     word ptr [ di ], 5a5ah
        mov     byte ptr [ di + 2 ], 50h
        mov     word ptr [ di + 10h ], 0FFFFh
        mov     word ptr [ di + 12h ], 0FFFFh

        ; navratova adresa, kdyby nezabrala ROM
        mov	OfsErr, offset RomErr
        push    cs
        push    offset @@chyba

        mov     ax, ROMLOAD
        mov     es, ax
        push    es
        ; kouzelny jump....
        mov     si,  es:[ 1ah ]
        push    word ptr es:[ si + 1ah ] ; ...do bootrom v RAM
        retf

@@chyba:
	mov	si, OfsErr
	call	@@print
        mov     si, offset CRLF
	call	@@print
        jmp     @@chyba

@@print:
	lodsb
	cmp	al,0
	je	@@navrat
	push	si
	mov	bx,7
	mov	ah,0Eh
	int	10h
	pop	si
	jmp	@@print

@@navrat:
	retn

Hlaska	db	13, 10, 'HD Net Loader v1.0 (c) poli 1999', 13, 10, 0
CRLF	db	13, 10, 0
OfsErr	dw	offset Error
Error	db	'Error load from HD !', 0
RomErr	db	'ROM Error !', 0

mbrasm	endp

mbrend	proc
	ret
mbrend	endp

        org 800h - 2
        dw  0AA55h

end

On Wed, 15 Sep 1999, Davide Dao wrote:

>                 Has anyone had any success booting with netboot
> (image.flo) on a
>                 bootable hard disk partition on the client?  I have a
> project where this
>                 would be of benifit and would eliminate the need to burn
> a chip for my
>                 NIC card.  I dd'ed image.flo onto /dev/hda on my Linux
> disk and it
>                 starts to bootstrap but then gives me "Error reading
> diskette".
>                 Shouldn't it continue to read from the hard disk or is
> there something
>                 in the netboot floppy code that specifically looks at
> the floppy
>                 hardware?  Curious, the netboot INSTALL doc says this
> can be done.  Any
>                 thoughts?
> 
>                 Richard Schroeder
>                 richard.schroeder@splashtech.com
> 
> Well if you asemble a program to read X bytes from floppy it will not
> read X bytes from HD.
> Basically what is happening is that things startup fine just untill code
> executes a read from floppy.
> To realize yourself boot from HD with netboot and put a floppy in drive
> also with netboot (set boot sequence C,A) ...
> everything workes as long as you have floppy with netboot  in drive A.
> 
> CIAPS
> Dave
> 
> ===========================================================================
> This Mail was sent to netboot mailing list by:
> Davide Dao <davide.rao@gsmbox.com>
> To get help about this list, send a mail with 'help' as the only string in
> it's body to majordomo@baghira.han.de. If you have problems with this list,
> send a mail to netboot-owner@baghira.han.de.
> 

===========================================================================
This Mail was sent to netboot mailing list by:
Petr Olivka <Petr.Olivka@vsb.cz>
To get help about this list, send a mail with 'help' as the only string in
it's body to majordomo@baghira.han.de. If you have problems with this list,
send a mail to netboot-owner@baghira.han.de.



For requests or suggestions regarding this mailing list archive please write to netboot@gkminix.han.de.