os-tutorial
os-tutorial copied to clipboard
Booting this over PXE
Hi there, I wanted to test this on a real computer so I decided to try to boot my OS over PXE so I don't need to write floppy disks or USB sticks
But I can't
in Quemu my image works fine (I invoe it like qemu-system-x86_64 whole_os_with_kernel.img)
But as soon as I tried to boot this over PXE with something like tftpd
What is extremly confusing is that if I only boot just a simple boot sector program like this
;
; A simple boot sector that prints a message to the screen using a BIOS routine.
;
mov ah, 0x0e ; int 10/ah = 0eh -> scrolling teletype BIOS routine
mov al, 'H'
int 0x10
mov al, 'e'
int 0x10
mov al, 'l'
int 0x10
mov al, 'l'
int 0x10
mov al, 'o'
int 0x10
jmp $ ; Jump to the current address (i.e. forever).
;
; Padding and magic BIOS number.
;
times 510-($-$$) db 0 ; Pad the boot sector out with zeros
dw 0xaa55 ; Last two bytes form the magic number ,
; so BIOS knows we are a boot sector.
It works fine
but as soon as I tried to boot something more complex (code is from this repo from 23-fixes folder) , I get garbage on the screen and I don't know why
insitde testOS.zip you will find 2 files
hello_boot_sector.img -- works fine, prints only hello
whole_os_with_kernel.img -- prints garbage on the screen over PXE
If it helps to diagnoze the problem, both Vmware Vorkstation and Virtual PC 2007 are using Intel PXE ROM
Hope someone knows, whats going on, because I am quite confused