Need help trying to get PXE boot to use NBD for rootfs
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Fedora, OpenSuse, DENX Embedded Linux
Posts: 184
Rep:
Need help trying to get PXE boot to use NBD for rootfs
So I am not sure where I am going wrong. I have all my stuff setup on my server and am able to PXE boot using both an NFS file system and using a file system image with http, but I can't seem to get it to work using a file system image with NBD.
[ 7.330300] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.4.0-k
[ 7.337341] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 7.400354] igb 0000:0a:00.0: added PHC on eth0
[ 7.404975] igb 0000:0a:00.0: Intel(R) Gigabit Ethernet Network Connection
[ 7.411931] igb 0000:0a:00.0: eth0: (PCIe:5.0Gb/s:Width x4) 00:1b:ac:00:42:27
[ 7.419151] igb 0000:0a:00.0: eth0: PBA No: Unknown
[ 7.424114] igb 0000:0a:00.0: Using MSI-X interrupts. 8 rx queue(s), 8 tx queue(s)
[ 7.441632] 8021q: 802.1Q VLAN Support v1.8
[ 7.487602] igb 0000:0a:00.1: added PHC on eth1
[ 7.492228] igb 0000:0a:00.1: Intel(R) Gigabit Ethernet Network Connection
[ 7.499193] igb 0000:0a:00.1: eth1: (PCIe:5.0Gb/s:Width x4) 00:1b:ac:00:42:28
[ 7.506415] igb 0000:0a:00.1: eth1: PBA No: Unknown
[ 7.511381] igb 0000:0a:00.1: Using MSI-X interrupts. 8 rx queue(s), 8 tx queue(s)
[ 7.520442] igb 0000:0a:00.1 enp10s0f1: renamed from eth1
[ 7.534336] igb 0000:0a:00.0 enp10s0f0: renamed from eth0
[ OK ] Started udev Wait for Complete Device Initialization.
[ 7.623234] audit: type=1130 audit(1532747553.622:11): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=systemd-udev-settle comm="systemd
" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Starting Device-Mapper Multipath Device Controller...
[ OK ] Started Device-Mapper Multipath Device Controller.
[ OK ] Reached target Local File Systems (Pre).
[ OK ] Reached target Local File Systems.
Starting Create Volatile Files and Directories...
[ OK ] Started Create Volatile Files and Directories.
[ OK ] Reached target System Initialization.
[ OK ] Reached target Basic System.
[ 7.773625] IPv6: ADDRCONF(NETDEV_UP): enp10s0f1: link is not ready
[ 7.780010] 8021q: adding VLAN 0 to HW filter on device enp10s0f1
[ 11.351492] igb 0000:0a:00.1 enp10s0f1: igb: enp10s0f1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX/TX
[ 11.362031] IPv6: ADDRCONF(NETDEV_CHANGE): enp10s0f1: link becomes ready
[ 15.196203] dracut-initqueue[545]: Warning: No dhcp root-path received for '' trying other interfaces if available
[ 91.744264] random: crng init done
[ 147.296972] dracut-initqueue[545]: Warning: dracut-initqueue timeout - starting timeout scripts
[ 147.868973] dracut-initqueue[545]: Warning: dracut-initqueue timeout - starting timeout scripts
[ 148.418432] dracut-initqueue[545]: Warning: dracut-initqueue timeout - starting timeout scripts
[ 148.970222] dracut-initqueue[545]: Warning: dracut-initqueue timeout - starting timeout scripts
[ 149.523491] dracut-initqueue[545]: Warning: dracut-initqueue timeout - starting timeout scripts
[ 150.074389] dracut-initqueue[545]: Warning: dracut-initqueue timeout - starting timeout scripts
[ 150.623440] dracut-initqueue[545]: Warning: dracut-initqueue timeout - starting timeout scripts
[ 151.173637] dracut-initqueue[545]: Warning: dracut-initqueue timeout - starting timeout scripts
[ 151.719875] dracut-initqueue[545]: Warning: dracut-initqueue timeout - starting timeout scripts
No matter what I do I always seem to get the error
Code:
dracut-initqueue[545]: Warning: No dhcp root-path received for '' trying other interfaces if available
as if I am not providing the root-path option (which I am). As a test I was able to use nbd-client to connect to NBD export locally on the server, so as far as I can tell the nbd-server configure is ok and working. Any ideas what I might be doing wrong? Is it possible that the kernel/initrd I'm using doesn't support NBD?
For reference I'm using the kernel and initrd shipped with the Fedora 28 LiveCD image.
Distribution: Fedora, OpenSuse, DENX Embedded Linux
Posts: 184
Original Poster
Rep:
Quote:
Originally Posted by jefro
Does this require a port entry? nbd:192.168.1.2:
I'm able to mount it find just using the export name both locally and on a remote system (after boot). I just can't get it to work when trying to use the NBD as a rootfs.
Distribution: Fedora, OpenSuse, DENX Embedded Linux
Posts: 184
Original Poster
Rep:
So it turns out my initial issue was that my initrd.img didn't contain the nbd module. After rebuilding my initrd.img I seem to be getting a little closer, although still having some issues.
Here is the output from the client after rebuilding initrd.img to include nbd.
Code:
[ 7.886365] Sending DHCP requests ., OK
[ 9.400428] IP-Config: Got DHCP answer from 0.0.0.0, my address is 192.168.1.27
[ 9.449365] IP-Config: Complete:
[ 9.452674] device=eth1, addr=192.168.1.27, mask=255.255.255.0, gw=255.255.255.255,
[ 9.460751] host=192.168.1.27, domain=, nis-domain=(none),
[ 9.466797] bootserver=0.0.0.0, rootserver=0.0.0.0, rootpath=nbd:192.168.1.2:export
[ 9.478358] Freeing unused kernel memory: 1328k freed
[ 9.483649] Write protecting the kernel read-only data: 10240k
[ 9.493229] Freeing unused kernel memory: 992k freed
[ 9.503818] Freeing unused kernel memory: 1560k freed
[ 9.543556] dracut: dracut-009-12.fc15
[ 9.572103] udev[168]: starting version 167
[ 9.625897] NET: Registered protocol family 10
[ 9.723094] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 12.668081] nbd: registered device at major 43
RTNETLINK answers: File exists
too many non-option arguments sp[ 12.698231] dracut Warning: Mounting root via 'eth1' failed
ecifiedUsage: nbd-client host port nbd_device [-block-size|-b block size] [-timeout|-t timeout] [-swap|-s] [-sdp|-S] [-persist|-p] [-nofork|-n] [-name|-N na
me]
Or : nbd-client -d nbd_device
Or : nbd-client -c nbd_device
Or : nbd-client -h|--help
Default value for blocksize is 1024 (recommended for ethernet)
Allowed values for blocksize are 512,1024,2048,4096
Note, that kernel 2.4.2 and older ones do not work correctly with
blocksizes other than 1024 without patches
[ 93.726991] dracut Warning: No root device "dhcp" found
Dropping to debug shell.
When I boot the client off of its local HD, nbd-client can connect to the NBD fine after boot. However if I PXE Boot the client and try to use the NBD as the root file system I get the above error. It looks like for whatever reason nbd-client does not like the format of the command being issued by the boot script/application.
Distribution: Fedora, OpenSuse, DENX Embedded Linux
Posts: 184
Original Poster
Rep:
I'm starting to wonder if my older client system is incompatible with my newer server. It seems like the client is trying to use a port number instead of the export name.
Whenever I try to connect to the NBD using just a port number I get this error.
But if I use the command "nbd-client -N export 192.168.1.2 /dev/nbd0" it works fine.
I've even tried experiments such as setting the root-path to "nbd:192.168.1.2:-N export" with no luck. Is there anyway to figure out what nbd-client command my client is trying to use at boot to mount the NBD?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.