NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: PXE Booting
Hi Martin,
Good of you to get back to me, thank you.
I am using GENERIC amd64, I unpacked base, modules and others into the
directory /srv/vm/mail.
Boot.cfg currently looks like this (I think it's version 75,000 at this point!):
prompt=yes
menu=Start prompt: prompt
menu=Boot NetBSD normally: dev;boot net0:netbsd -a root=10.1.1.1:/srv/vm/mail
menu=Boot NetBSD with module nfs.kmod: load /nfs.kmod;boot net0:netbsd
menu=Boot NetBSD with -a: boot net0:netbsd -a
menu=Boot single-user:boot net0:netbsd -s
menu=Go to command line: menu
default=1
timeout=5
I can't seem to get into the command line of the boot loader to
dissect more of what's going on though which is frustrating, so I'm
trying to debug from trace logs. We start up...
mem[0x0-0x9ffff 0x100000-0x805fff 0x807000-0x81ffff
0x820000-0x13fffff 0x1400000-0x73fbdfff 0x73fbe000-0x7bfbdfff
0x7bfbe000-0x7bfddfff 0x7bfde000-0x7e65efff 0x7e65f000-0x7e763fff
0x7e764000-0x7e7a1fff 0x7e7a4000-0x7e920fff 0x7eb1b000-
0x7eceefff 0x7ecef000-0x7ecf1fff 0x7ecf4000-0x7fa1afff
0x7fa1b000-0x7fb9afff 0x7fbef000-0x7fbf3fff 0x7fbff000-0x7fdfffff
0x7fe00000-0x7ff22fff 0x7ff23000-0x7ff42fff 0x7ff43000-0x7ff7bfff]
\\-__,------,___.
\\ __,---` NetBSD/x86 EFI Boot (x64)
\\ `---,_. Revision 1.2 (Mon Dec 16 13:08:11 UTC 2024)
\\-,_____,.---`
\\
\\
\\
1. Start prompt
2. Boot NetBSD normally
3. Boot NetBSD with module nfs.kmod
4. Boot NetBSD with -a
5. Boot single-user
6. Go to command line
Choose an option; RETURN for default; SPACE to stop countdown.
Option 1 will be chosen in 0 seconds.
21368856+784744+1312408 [944186+1401072+1026750]=0x1b37ee8
Loading net0:/stand/amd64/10.1/modules/nfs/nfs.kmod
and then it just hangs there. Tcpdump is showing some traffic across 67 & 69...
17:20:34.280162 IP (tos 0x10, ttl 128, id 0, offset 0, flags [DF],
proto UDP (17), length 343)
10.1.1.1.67 > 10.1.1.10.68: [udp sum ok] BOOTP/DHCP, Reply, length
315, xid 0x1, Flags [none] (0x0000)
Your-IP 10.1.1.10
Server-IP 10.1.1.1
Client-Ethernet-Address 02:19:d0:01:00:0a
sname "10.1.1.1"
file "bootx64.efi"
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message (53), length 1: Offer
Subnet-Mask (1), length 4: 255.255.255.0
Domain-Name-Server (6), length 4: 10.1.1.1
Hostname (12), length 17: "mail.ianbonham.uk"
RP (17), length 26: "nfs://10.1.1.1/srv/vm/mail"
Lease-Time (51), length 4: 7200
Server-ID (54), length 4: 10.1.1.1
17:20:34.280344 IP (tos 0x0, ttl 64, id 0, offset 0, flags [none],
proto UDP (17), length 576)
0.0.0.0.68 > 255.255.255.255.67: [no cksum] BOOTP/DHCP, Request
from 02:19:d0:01:00:0a, length 548, xid 0x1, secs 23, Flags [none]
(0x0000)
Client-Ethernet-Address 02:19:d0:01:00:0a
file "/stand/amd64/10.1/modules/nfs/nfs.kmod"
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message (53), length 1: Request
Requested-IP (50), length 4: 10.1.1.10
Server-ID (54), length 4: 10.1.1.1
Lease-Time (51), length 4: 300
Parameter-Request (55), length 6:
Subnet-Mask (1), Default-Gateway (3), Hostname (12),
Domain-Name (15)
RP (17), SS (16)
Vendor-Class (60), length 18: "NetBSD:amd64:libsa"
17:20:34.284738 IP (tos 0x10, ttl 128, id 0, offset 0, flags [DF],
proto UDP (17), length 343)
10.1.1.1.67 > 10.1.1.10.68: [udp sum ok] BOOTP/DHCP, Reply, length
315, xid 0x1, Flags [none] (0x0000)
Your-IP 10.1.1.10
Server-IP 10.1.1.1
Client-Ethernet-Address 02:19:d0:01:00:0a
sname "10.1.1.1"
file "bootx64.efi"
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message (53), length 1: ACK
Subnet-Mask (1), length 4: 255.255.255.0
Domain-Name-Server (6), length 4: 10.1.1.1
Hostname (12), length 17: "mail.ianbonham.uk"
RP (17), length 26: "nfs://10.1.1.1/srv/vm/mail"
Lease-Time (51), length 4: 7200
Server-ID (54), length 4: 10.1.1.1
17:20:34.285392 IP (tos 0x0, ttl 64, id 0, offset 0, flags [none],
proto UDP (17), length 75)
10.1.1.10.2225 > 10.1.1.1.69: [no cksum] TFTP, length 47, RRQ
"/stand/amd64/10.1/modules/nfs/nfs.kmod" octet
and in the host's messages I get this reported...
Sep 11 17:20:11 19d in.tftpd[2975]: tftp: client does not accept options
Sep 11 17:20:11 19d mountd[23312]: mount request from 10.1.1.10 for
non existent path /nfs:
Sep 11 17:20:11 19d mountd[23312]: mount request denied from 10.1.1.10 for /nfs:
Sep 11 17:20:11 19d mountd[23312]: mount request from 10.1.1.10 for
non existent path /nfs:
Sep 11 17:20:11 19d mountd[23312]: mount request denied from 10.1.1.10 for /nfs:
DHCP traffic looks to be valid?
2025-09-11 17:20:34.284 DEBUG [kea-dhcp4.dhcp4/55293.0x3dc17a677808]
DHCP4_CLASSES_ASSIGNED [hwtype=1 02:19:d0:01:00:0a], cid=[no info],
tid=0x1: client packet has been assigned on DHCPREQUEST message to the
following classes: ALL, VEND
OR_CLASS_NetBSD:amd64:libsa, KNOWN
2025-09-11 17:20:34.284 DEBUG [kea-dhcp4.options/55293.0x3dc17a677808]
DHCP4_PACKET_PACK [hwtype=1 02:19:d0:01:00:0a], cid=[no info],
tid=0x1: preparing on-wire format of the packet to be sent
2025-09-11 17:20:34.284 INFO [kea-dhcp4.packets/55293.0x3dc17a677808]
DHCP4_PACKET_SEND [hwtype=1 02:19:d0:01:00:0a], cid=[no info],
tid=0x1: trying to send packet DHCPACK (type 5) from 10.1.1.1:67 to
10.1.1.10:68 on interface bridge1
in the KEA database I have this in dhcp4_options:
| 47 | 17 | 0x31302E312E312E313A2F7372762F766D2F6D61696C |
nfs://10.1.1.1/srv/vm/mail | dhcp4 | 1 | NULL |
NULL | 42 | 0 | NULL | NULL
| NULL | 202
5-09-11 15:52:21 | 0 |
and the reservation as:
| 42 | 0x0219D001000A | 0 |
2 | NULL | 167837962 | mail.ianbonham.uk |
NULL | NULL | 167837953 |
10.1.1.1 | bootx
64.efi | NULL | NULL |
+---------+----------------------------------+----------------------+-----------------+-----------------+--------------+-------------------+----------------------+----------------------+-------------------+-----------------------+------
----------------+--------------+----------+
I'm launching with :
bhyve \
-c 2 -m 2048M \
-H -P \
-s 0:0,hostbridge \
-s 7:0,virtio-net,tap0,mac=02:19:d0:01:00:0a \
-s 31,lpc \
-l com1,/dev/nmdm_mailA \
-l bootrom,/srv/tftp/BHYVE_UEFI_CODE.fd,/srv/tftp/BHYVE_UEFI_10.fd \
mail
What stupid thing have I done? I know I'll facepalm when you tell me!
Thanks,
Ian
On Thu, 11 Sept 2025 at 17:09, Martin Husemann <martin%duskware.de@localhost> wrote:
>
> On Thu, Sep 11, 2025 at 04:58:51PM +0100, Ian Bonham wrote:
> > The kernel tries to mount the nfs share using the root location KEA is
> > providing, but the kernel or bootx86 seem to keep mangling the source
> > location for the root. I have tried all sorts of suggestions from
> > online guides, both what the DHCP server sends, and what boot.cfg
> > specifies. Whenever mountd receives the request it seems to be
> > prefixed with a random / and mountd denies the mount.
> >
> > mount request denied from 10.1.1.10 for /nfs:
>
> Are you using a GENERIC kernel? Can you provide your full boot.cfg?
>
> What are the last lines the kernel prints before it tries to mount
> the root NFS share?
>
> There should be a quite detailed output of what the DHCP server answered
> and this includes the root file system option that the kernel then will
> try to mount (and my guess is that something is wrong in the DHCP server
> configuration).
>
> Martin
--
Kindest Regards,
Ian Bonham
ian.bonham%gmail.com@localhost
Mobile : +44 (0)7396 103 957
Skype : ian.bonham
Home |
Main Index |
Thread Index |
Old Index