Page 1 of 1

Network support in real mode

Posted: Thu Jul 17, 2008 2:50 pm
by Jabus
Hi,

I'm working on the latest version of my bootloader and I wanted to support downloading kernels and modules from another computer on the network. My bootloader operates in real mode and the problem I'm having at the moment is finding, if there is one, the BIOS interrupt that allows you to send packets. I have searched Ralf Brown's and can't find what I'm after. Do I have to switch to protected mode and detect and initiate the network interface card just to do this or is there a way to do it in real mode?

Re: Network support in real mode

Posted: Thu Jul 17, 2008 11:54 pm
by Alboin
Here is a description of Solaris' boot loading methods.

4.4.3 describes their current system. They use a diskette based method, which runs a 'Device Configuration Assistant', consequently loading the appropriate network card drivers.

Re: Network support in real mode

Posted: Fri Jul 18, 2008 4:18 am
by Brendan
Hi,
Jabus wrote: I'm working on the latest version of my bootloader and I wanted to support downloading kernels and modules from another computer on the network. My bootloader operates in real mode and the problem I'm having at the moment is finding, if there is one, the BIOS interrupt that allows you to send packets. I have searched Ralf Brown's and can't find what I'm after. Do I have to switch to protected mode and detect and initiate the network interface card just to do this or is there a way to do it in real mode?
Have you considered netboot/PXE?

Netboot/PXE may have several advantages:
  • - the network card and/or BIOS provides a device-independent API for you to use, so that you don't need to write lots of network card drivers that are only used during boot. Note: this API doesn't exist unless you boot with Netboot/PXE, and neither does any other API that provides network services.
    - it would mean you don't need to use an additional boot device (e.g. a boot floppy, a boot CD, etc) to get boot started
    - the boot loader is no longer limited to 512 bytes (you can safely have a 480 KB boot loader if you want).
    - it's an extremely nice thing for an OS developer to have (insanely fast and easy way to test your OS on all computers on your LAN, once it's setup).
There's also a few disadvantages:
  • - you'd need a different boot loader (e.g. one boot loader for netboot/PXE and another one for floppy).
    - the client machines will need to support PXE. AFAIK most new computers with built-in network cards do support PXE. For older computers either buy a network card that supports PXE (they're not too expensive) or use etherboot.
    - you'd need a server (to provide DHCP and TFTP) for clients to boot from.
Anyway, I just thought it might be worth mentioning...


Cheers,

Brendan

Re: Network support in real mode

Posted: Fri Jul 18, 2008 4:45 am
by Jabus
I think i'd rather have just the one bootloader which I can develop more and more of when I take breaks from working on my Kernel.
Here is a description of Solaris' boot loading methods.

4.4.3 describes their current system. They use a diskette based method, which runs a 'Device Configuration Assistant', consequently loading the appropriate network card drivers.
Thanks for the link. I've started going down their approach by detecting the different network cards available and then loading an appropriate driver.