User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
usersguide:bootingovernetworkusingpxe [2015/01/21 06:03]
antoineleca Add Bochs setup for PXE booting (qEmu should be similar, feel free to add)
usersguide:bootingovernetworkusingpxe [2016/03/22 13:08]
jeanbaptisteboric Rewrite page using boot-to-ramdisk image
Line 1: Line 1:
 +====== Booting over network using PXE ======
 +It is possible to boot MINIX 3 over the network. This makes use of the [[https://​​wiki/​Preboot_Execution_Environment|PXE protocol]] supported in some network cards. The network card loads its boot files over network and boot the PC from these files.
 +PXE booting involves two machines :
 +  * The **server**, which has a DHCP and TFTP server ;
 +  * The **client**, which is set to boot over PXE.
 +This document will explain how to populate the TFTP root directory for booting MINIX 3.
 <div round info> <div round info>
-**Stale page**+** Setting up a PXE server**
-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.+Setting up a DHCP/TFTP server is outside the scope of this document. Check your operating system'​s documentation ​to learn how to set up a PXE server.
 </​div>​ </​div>​
-====== ​Introduction ​====== +===== MINIX 3 files =====
-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 ====== +The boot-to-ramdisk image is suitable for booting over PXE. [[developersguide:​crosscompiling|To generate ​the image]]run ''​releasetools/​''​. The kernel ​and modules ​will be placed into ''​../obj.i386/​work'',​ move them to the TFTP root directory.
-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.1And install the following packages:+
-  * dhcp3-server +===== Bootloader =====
-  * tftpd-hpa +
-  * syslinux+
-==== DHCP server ==== +As with hard drive installation,​ a boot loader ​is required to bootstrap ​the system.
-Setup the network interface of the host to static IP. For example: +
-<​code>​ +
-ifconfig eth0 netmask +
-</​code>​ +
-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**:​ +==== PXELINUX ====
-<​code>​ +
-... +
-subnet netmask { +
-  range;​ +
-  filename "​pxelinux.0";​ +
-... +
-You should now proceed to [[#​TFTP|TFTP]] setup. +//Main documentation : [[​wiki/​index.php?​title=PXELINUX]]//
-===== Virtual machine host ===== +
-As an alternative,​ you can set up most (all?) virtual machine software to provide a PXE booting environmentDetails vary between VM environments,​ we will use [[.:​runningonbochs|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 [[|]] 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.+Download ​the latest release of SYSLINUX at [[]]. Extract ​the following files and put them in the TFTP root directory :
-==== Bochs virtual machine ==== +  * ''​bios/​com32/​elflink/​ldlinux/​ldlinux.c32''​ 
-Now, create a new virtual machine configuration file ''​bochsrc.txt'' ​as +  * ''​bios/com32/lib/​libcom32.c32''​ 
-<​code>​ +  * ''​bios/com32/libutil/libutil.c32''​ 
-megs: 768 +  * ''​bios/​com32/​mboot/​mboot.c32''​ 
-romimage: file=$BXSHARE/BIOS-bochs-latest +  * ''​bios/com32/menu/menu.c32''​ 
-vgaromimage:​ file=$BXSHARE/VGABIOS-lgpl-latest +  * ''​bios/core/pxelinux.0''​
-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 +
-</code> +
-Note that the //ethdev=// parameter matches the usual Linux setting, but you can use anything you want.+
-You also need to create ​SLiRP configuration file ''​slirp.conf'',​ which only needs to contain +Create ​directory named ''​pxelinux.cfg/'' ​in the TFTP root directory. Inside itcreate ​a file named ''​default''​ with the following contents ​:
-<​code>​ +
-# slirp config +
-bootfile = pxelinux.+
-</code> +
-===== TFTP ===== +
-Now copy the following files to ''/​var/​lib/​tftpboot'' ​(the dir the TFTP daemon reads its files fromadjust if needed): +
-  * /​usr/​lib/​syslinux/​memdisk (memdisk can emulate ​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 [[http://​​download|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'':​+<file
 +DEFAULT menu.c32 
-<​code>​ +LABEL x86 
-default menu.c32 +  MENU LABEL MINIX 3 
-timeout 100 +  KERNEL mboot.c32 
- +  ​APPEND ​kernel ​bootramdisk=1 --- mod01_ds --- mod02_rs --- mod03_pm --- mod04_sched --- mod05_vfs --- mod06_memory --- mod07_tty --- mod08_mib --- mod09_vm --- mod10_pfs --- mod11_mfs --- mod12_init 
-label X +</file>
-menu label  Minix3 +
-kernel ​memdisk +
-append initrd=mnxusb.img +
-</code> +
-====== 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 ​====== +====== ​Booting directly with QEMU ======
-====== VirtualBox ====== +
-This method has been reported **not to work** on VirtualBox version 3.2.8 and 3.1.4.+
-====== ArchLinux ====== +You can test the TFTP root directory with QEMU without setting up a DHCP/TFTP server first. ​To boot with QEMU''​cd''​ to the TFTP root directory and use the following command :
-To allow incoming tftp connectionsextend **/​etc/​hosts.allow**+
 <​code>​ <​code>​
-..+qemu-system-i386 --enable-kvm -m 1G -tftp -bootp pxelinux.0 -boot n
-tftpd: ALL +
-in.tftpd: ALL +
 </​code>​ </​code>​
-===== 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.txt · Last modified: 2016/03/22 13:27 by jeanbaptisteboric