blog:netboot_netbsd

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
blog:netboot_netbsd [2018/11/08 20:41] johnblog:netboot_netbsd [2018/11/08 21:03] (current) – [Motorola MVME 68k] john
Line 1: Line 1:
 ===== Netbooting NetBSD ===== ===== Netbooting NetBSD =====
  
-=== Intel Architectures (i386/AMD64) ===+{{:blog:netbsd2.png?nolink&200 |}} 
 + 
 +==== Intel Architectures (i386/AMD64) ====
  
 There are some differences in how 32bit and 64bit bootloaders work to PXE boot NetBSD on Intel systems. There are some differences in how 32bit and 64bit bootloaders work to PXE boot NetBSD on Intel systems.
  
-== NetBSD 8.0 on AMD64 ==+==== NetBSD 8.0 on AMD64 ====
  
 To successfully netboot, you need two files: To successfully netboot, you need two files:
  
- * netBSD-INSTALL.gz - Kernel and miniroot sourced from: /pub/NetBSD/NetBSD-8.0/i386/binary/kernel/netbsd-INSTALL.gz +  * **netBSD-INSTALL.gz** NetBSD kernel and miniroot sourced from: /pub/NetBSD/NetBSD-8.0/i386/binary/kernel/netbsd-INSTALL.gz 
- * pxeboot_ia32.bin - Netboot loader sourced from: /pub/NetBSD/NetBSD-8.0/i386/installation/misc/pxeboot_ia32.bin+ 
 +  * **pxeboot_ia32.bin** - Netboot loader sourced from: /pub/NetBSD/NetBSD-8.0/i386/installation/misc/pxeboot_ia32.bin
  
 An example working **syslinux** menu entry is shown below: An example working **syslinux** menu entry is shown below:
Line 23: Line 26:
 </code> </code>
  
-For amd64 +For amd64, there is an additional awkward step in that the **pxeboot_ia32.bin** loader is hardcoded to expect the NetBSD kernel to be called **netbsd** in the root of the TFTP server. To get it to be served from anywhere other than there, you need to modify the PXE server (dnsmasq in our case) to catch the request and point it somewhere else. 
 + 
 +This entry is added to dnsmasq.conf: 
 + 
 +<code>dhcp-vendorclass=netbsd_amd64,"NetBSD:i386:libsa"</code> 
 +... and will flag any TFTP requests from the NetBSD boot loader. 
 + 
 +And then this entry: 
 + 
 +<code>dhcp-boot=net:netbsd_amd64,tftp:netbsd/amd64/8.0.0/netbsd-INSTALL.gz</code> 
 +... will redirect the boot file request to another location, in this case, the real location of the NetBSD 8.0.0 kernel image. 
 + 
 +You **can** avoid having to put those entries in dnsmasq.conf, but you instead have to manually specify the path to the real kernel at the **boot:** prompt after selecting the NetBSD 8.0.0 AMD64 menu entry (it fails once trying to load the default kernel path). 
 + 
 +Once all that is in place, it will boot and start the normal NetBSD installer - use HTTP/FTP or NFS as the source for installation media. I haven't yet found a preseed/automated installer harness for NetBSD. 
 + 
 +---- 
 + 
 +==== NetBSD 8.0 on i386 ==== 
 + 
 +Network booting NetBSD 8.0 on i386 is fairly simple, here's the syslinux menu entry I'm using: 
 + 
 +<code> 
 +LABEL BSD - NetBSD 8.0.0 i386 
 +KERNEL syslinux/mboot.c32 
 +APPEND netbsd/i386/8.0.0/netbsd-INSTALL.gz 
 +TEXT HELP 
 +Start the 32bit NetBSD 8.0.0 netboot installer. 
 +ENDTEXT 
 +</code> 
 + 
 +Only one file is needed: **netbsd-INSTALL.gz** - which is sourced from: /pub/NetBSD/NetBSD-8.0/i386/binary/kernel/netbsd-INSTALL.gz 
 + 
 +The **kernel** listed for the syslinux entry is just a standard binary found in most syslinux/pxelinux distributions; it is **not** specific to NetBSD. 
 + 
 +Once loaded, the NetBSD installer will run. NFS/HTTP/FTP will have to be chosen as the installation medium. 
 + 
 +---- 
 + 
 +===== Motorola MVME 68k ===== 
 + 
 +Surprisingly, the 147/167/177bug firmware built in to the Motorola MVME single board computers supports network booting, not via anything as sophisticated as PXE, but by traditional BOOTP methods, and fortunately we can support that in any modern Linux system. 
 + 
 +==== NetBSD 8.0 on MVME 68k ==== 
 + 
 +TBD 
 + 
 +==== NetBSD 7 on MVME 68k ====
  
-=== Motorola MVME 68k ===+TBD
  • blog/netboot_netbsd.1541709719.txt.gz
  • Last modified: 2018/11/08 20:41
  • by john