Post Reply 
 
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
boot script for install NetBSD
2019-10-25, 23:19
Post: #1
boot script for install NetBSD
Hello, people!

I use multiboot OS with TFTP server using the script menu of different configurations according to the manual (PXE chainloading)
Code:
if exists user-class and option user-class = "iPXE" {
    filename "menu.ipxe";
} else {
    filename "undionly.kpxe";
}

Please, help me to create a configuration of possible variants of the script (menu.ipxe) to install NetBSD by Protocol TFTP!

With according to the man page for this OS
Quote:Bootfile name is set to ``boot.cfg'' during the first request, and then to the filename argument on the boot command line typed in by the user (can be empty), using ``netbsd'' in the non-interactive case.

DHCP Vendor class identifier tag is set to ``NetBSD:i386:libsa''.

The DHCP server can use these fields (i.e. the DHCP vendor class identifier tag and the requested file name, possibly supplied by the user's command line input to the pxeboot program) to distinguish between the various originators of requests (PXE BIOS, first and second pxeboot stage, NetBSD kernel), and to alter its behaviour.
, configuration of the DHCP server does not provide for the use of different menu items:
Code:
if substring (option vendor-class-identifier, 0, 20)
  = "PXEClient:Arch:00000" {
    filename "pxeboot_ia32.bin";
} elsif substring (option vendor-class-identifier, 0, 17)
  = "NetBSD:i386:libsa" {
    if filename = "boot.cfg" {
        filename "tftp:boot.cfg";
    } else if filename = "netbsd" {
        filename "tftp:netbsd-INSTALL.gz";
    }
}
In this way, the loading takes place in several stages (PXE BIOS, first and second pxeboot stage, NetBSD kernel), so, the order of the query filenames is different by DHCP tags..

How to this can be redone to worked menu.ipxe (with a undionly.kpxe)?
Find all posts by this user
Quote this message in a reply
2019-10-26, 08:26
Post: #2
RE: boot script for install NetBSD
I don't really understand your question fully, however you might want to take a look at https://gist.github.com/robinsmidsrod/4008017 for good ways of that config for iPXE

Use GitHub Discussions
VRAM bin
Visit this user's website Find all posts by this user
Quote this message in a reply
2019-10-27, 19:54
Post: #3
RE: boot script for install NetBSD
NiKiZe, thanks for the examples, but i don't quite understand how to pass filenames through the script IPXE, because in this case, in the configuration DHCP they are not.
In fact, according to the man NetBSD, the decision to transfer the filenames to the client for download is made at the stage of exchange of DHCP packets based on the substring "NetBSD:i386:libsa" and vendor class ID.
Is it possible to pass them through a script?
p.s. Sorry by very bed english Confused
Find all posts by this user
Quote this message in a reply
2019-10-28, 07:00
Post: #4
RE: boot script for install NetBSD
iPXE supports creating "virtual" DHCP packets, which is cached in the UNDI stack. (one example is at http://forum.ipxe.org/showthread.php?tid...0#pid10350 which just sets the relevant dhcp options, and then loads next stage PXE binary, but you will have to test this yourself)
However if the NetBSD stuff forces a real DHCP request than it is your DHCP server that needs to do this, and then there is no way of iPXE to send specific strings.

After a quick read, your best bet if you want to have iPXE change settings or similar, is to try and not use the NetBSD pxeboot at all, and instead implement that in iPXE
Sorry that I can't help you more here.

Use GitHub Discussions
VRAM bin
Visit this user's website Find all posts by this user
Quote this message in a reply
2019-10-28, 07:56
Post: #5
RE: boot script for install NetBSD
(2019-10-28 07:00)NiKiZe Wrote:  is to try and not use the NetBSD pxeboot at all, and instead implement that in iPXE
This is exactly what I want to achieve, so that only the iPXE core loader (undionly.kpxe, menu.ipxe) will participate in the loading stages of the filenames (boot.cfg, netbsd-INSTALL.gz).., being from pxeboot_ia32.bin..

Thanks for the help, I will continue experiments..
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)