User Tools

Site Tools


usersguide:bootingovernetworkusingpxe

This is an old revision of the document!


Stale page

The contents of this page must be revised to reflect the current state of MINIX3. Mainly the fact that we do not have anymore the USB image, as referenced.

Introduction

It is possible to boot the MINIX 3 usb image over network using pxelinux and memdisk. This makes use of the PXE protocol supported in some network cards. The network card loads its boot files over network and boot the PC from these files.

Setup

PXE booting involves two machines, one which is hosting the files and can be used for many other tasks, and the other which will be booting MINIX 3 through the PXE protocol.

Physical host system

Host system

As a host, use for example Ubuntu 10.04.1. And install the following packages:

  • dhcp3-server
  • tftpd-hpa
  • syslinux

DHCP server

Setup the network interface of the host to a static IP. For example:

ifconfig eth0 192.168.0.1 netmask 255.255.255.0

It is important that eth0 has an IP in the dhcpd IP subnet, otherwise the dhcpd does not work.

Edit the configuration file of the DHCP server /etc/dhcp3/dhcpd.conf:

...
subnet 192.168.0.0 netmask 255.255.255.0 {
  range 192.168.0.10 192.168.0.20;
  filename "pxelinux.0";
}
...

You should now proceed to TFTP setup.

Virtual machine host

As an alternative, you can set up most (all?) virtual machine software to provide a PXE booting environment. Details vary between VM environments, we will use Bochs as an example here.

In addition to the VM software installed, you will need the PXE BIOS option ROM for the emulated network adapter; using ne2k as an example, go to ROM-o-matic.net for Etherboot-git service, choose ns8390:rtl8029 (this should match the PCI ids for the emulated NIC) as NIC/ROM type and Binary ROM image as output format, and press the button to download the resulting eb-git-rtl8029.zrom image which ROM-o-Matic just compiled for you.

Bochs virtual machine

Now, create a new virtual machine configuration file bochsrc.txt as

megs: 768
romimage: file=$BXSHARE/BIOS-bochs-latest
vgaromimage: file=$BXSHARE/VGABIOS-lgpl-latest
pci: enabled=1, chipset=i440fx, slot1=pcivga, slot2=ne2k
ne2k: mac=B0:C4:00:12:34:65, ethmod=slirp, ethdev=/var/lib/tftpboot, script="slirp.conf", bootrom=eb-git-rtl8029.zrom
log: bochsout.txt
mouse: enabled=0
boot: network

Note that the ethdev= parameter matches the usual Linux setting, but you can use anything you want.

You also need to create a SLiRP configuration file slirp.conf, which only needs to contain

# slirp config
bootfile = pxelinux.0

TFTP

Now copy the following files to /var/lib/tftpboot (the dir the TFTP daemon reads its files from, adjust if needed):

  • /usr/lib/syslinux/memdisk (memdisk can emulate a disk drive from an image using bios int 13h)
  • /usr/lib/syslinux/pxelinux.0 (the first file)
  • /usr/lib/syslinux/menu.c32 (for the menu)
  • the minix 3 usb image from the download page, call it mnxusb.img

Now create the directory /var/lib/tftpboot/pxelinux.cfg and create the file /var/lib/tftpboot/pxelinux.cfg/default:

default menu.c32
timeout 100

label X
menu label  Minix3
kernel memdisk
append initrd=mnxusb.img

Boot

Now start the MINIX machine, with network card. On this machine choose LAN boot or PXE boot as boot option. If everything goes well, the menu should popup. Press enter, and the USB image is transferred via network (this can take a while (~40 s), the image is over 400MB :P). When this is done, the system is loading boot sector and MINIX 3 is started from a ramdrive.

Troubleshooting

VirtualBox

This method has been reported not to work on VirtualBox version 3.2.8 and 3.1.4.

ArchLinux

To allow incoming tftp connections, extend /etc/hosts.allow

...
tftpd: ALL
in.tftpd: ALL
...

DHCPD

If your DHCP does not work, make sure the network address of your network card is in the subnet specified in the dhcpd configuration.

usersguide/bootingovernetworkusingpxe.1421838222.txt.gz · Last modified: 2016/03/22 18:08 (external edit)