You are not logged in.

#1 2012-10-22 15:42:49

brbulic
Member
Registered: 2012-10-22
Posts: 1

PXE boot on NFS root shutdown issues

I've installed and configured Archlinux to run over PXE at a remote NFSv4 root using the PXE wiki page and it works. The wiki pages were not entirely correct, but I have experience with PXE boots and I will try to update the wiki page where needed so the process looks a little more straightforward and simple.

But I'm having issues with shutting down - the computer hangs, probably because it shuts down the network interface before it completes the shutdown.

It just might have something with the dhcpcd daemon, because I configured it using

systemctl start dhcpcd@eth0.service

And it probably gets stopped before it needs to be. But without this, DNS resolving doesn't work and I don't want to edit /etc/resolv.conf manually for the Internet to work. Any other way of fixing this? Other than that, everything works fine, and quite fast considering the 100 Mbps connection to my home server.

Thanks!

Offline

#2 2012-10-22 18:14:15

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,521

Re: PXE boot on NFS root shutdown issues

I was wondering whether I was the only one but I'm not sure that systemd dhcpcd is the problem exactly.  It could be if I go back and read the Diskless Wiki.
If I even hit the power switch it goes to console and freezes.  It worked with previous kernels.  In fact it wasn't initscripts/systemd problem, I tried a fresh diskless install the other day and both froze and soon as you reached for the power switch.  Rebooting hangs at one of the services and it won't clear out complaining about setting some timeout to something about 120 seconds.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#3 2012-10-31 22:02:46

ronnylov
Member
Registered: 2010-12-21
Posts: 65

Re: PXE boot on NFS root shutdown issues

brbulic wrote:

I've installed and configured Archlinux to run over PXE at a remote NFSv4 root using the PXE wiki page and it works. The wiki pages were not entirely correct, but I have experience with PXE boots and I will try to update the wiki page where needed so the process looks a little more straightforward and simple.

But I'm having issues with shutting down - the computer hangs, probably because it shuts down the network interface before it completes the shutdown.

It just might have something with the dhcpcd daemon, because I configured it using

systemctl start dhcpcd@eth0.service

And it probably gets stopped before it needs to be. But without this, DNS resolving doesn't work and I don't want to edit /etc/resolv.conf manually for the Internet to work. Any other way of fixing this? Other than that, everything works fine, and quite fast considering the 100 Mbps connection to my home server.

Thanks!

I had exactly the same issue with PXE booting and NFS root. Everything worked but internet access before enabling dhcpcd@eth0.service. Enabling this service made internet work but it hangs at shutdown. I have know disabled the dhcpcd@eth0.service again and now everything works including the internet acces (DNS resolving works now). What happened (I think) is that dhcpcd automatically added the DNS server in /etc/resolv.conf and it stayed there after disabling the service. My router that runs tomato firmware runs a DHCP server and this is now my /etc/resolv.conf:

nameserver 192.168.1.1

So what I should have done instead of enabling the dhcpcd@eth0.service I should have edited the /etc/reolv.conf file. I already have got an ip adress by the dhcp server during PXE-booting at it seems that it stays there. Actually I would like a static IP address but I will solve this by editing the settings in my router - tie an ip-address to the MAC address of my network card.

To me this issue is solved but maybe not for you because you do not want to edit /etc/resolv.conf.
But maybe all you have to do is disabling dhcpcd@eth0.service because it may already have added the DNS in your resolv.conf file.

Offline

#4 2012-10-31 22:25:44

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,521

Re: PXE boot on NFS root shutdown issues

ronnylov wrote:
brbulic wrote:

I've installed and configured Archlinux to run over PXE at a remote NFSv4 root using the PXE wiki page and it works. The wiki pages were not entirely correct, but I have experience with PXE boots and I will try to update the wiki page where needed so the process looks a little more straightforward and simple.

But I'm having issues with shutting down - the computer hangs, probably because it shuts down the network interface before it completes the shutdown.

It just might have something with the dhcpcd daemon, because I configured it using

systemctl start dhcpcd@eth0.service

And it probably gets stopped before it needs to be. But without this, DNS resolving doesn't work and I don't want to edit /etc/resolv.conf manually for the Internet to work. Any other way of fixing this? Other than that, everything works fine, and quite fast considering the 100 Mbps connection to my home server.

Thanks!

I had exactly the same issue with PXE booting and NFS root. Everything worked but internet access before enabling dhcpcd@eth0.service. Enabling this service made internet work but it hangs at shutdown. I have know disabled the dhcpcd@eth0.service again and now everything works including the internet acces (DNS resolving works now). What happened (I think) is that dhcpcd automatically added the DNS server in /etc/resolv.conf and it stayed there after disabling the service. My router that runs tomato firmware runs a DHCP server and this is now my /etc/resolv.conf:

nameserver 192.168.1.1

So what I should have done instead of enabling the dhcpcd@eth0.service I should have edited the /etc/reolv.conf file. I already have got an ip adress by the dhcp server during PXE-booting at it seems that it stays there. Actually I would like a static IP address but I will solve this by editing the settings in my router - tie an ip-address to the MAC address of my network card.

To me this issue is solved but maybe not for you because you do not want to edit /etc/resolv.conf.
But maybe all you have to do is disabling dhcpcd@eth0.service because it may already have added the DNS in your resolv.conf file.

In my experience, the pxe client gets an ip address to connect to the tftp server and fetch files.
Then when the kernel and initramfs are loaded into memory and are executed, the kernel starts and makes another request (seemingly as another client), for a dhcp address, which in turn means there is an address destroyed and a new one created, even though it is the same computer.  /etc/resolv.conf does get overwritten by dhcpcd.  There's a possibility to use dhclient instead.  But then you run into some possible problems when you start connecting several clients via PXE to the same server; there's not likely to be any change if a nameserver is acquired.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#5 2012-10-31 22:59:20

ronnylov
Member
Registered: 2010-12-21
Posts: 65

Re: PXE boot on NFS root shutdown issues

Maybe I have misunderstood why it works, but anyway it works when I have disabled dhcpcd and having the nameserver entry in /etc/resolv.conf. So this second dhcp request by the kernel stays in memory and the DNS nameserver is used when resolv.conf is read by the kernel?

Offline

#6 2012-10-31 23:14:52

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,521

Re: PXE boot on NFS root shutdown issues

ronnylov wrote:

Maybe I have misunderstood why it works, but anyway it works when I have disabled dhcpcd and having the nameserver entry in /etc/resolv.conf. So this second dhcp request by the kernel stays in memory and the DNS nameserver is used when resolv.conf is read by the kernel?

It's considered a different client than the pxe client, so as long as you're using the nfs client, it will keep reissuing to it the same ip. 
If you start attaching multiple diskless clients (without any change--same client regardless of how many), the dhcpcd on each diskless client will issue itself its' own address.  Since they will be using the same server there shouldn't be any reason for the /etc/resolv.conf to be changed from one diskless client to another.  I think your fix will work until the next time it rewrites /etc/resolv.conf.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

Board footer

Powered by FluxBB