nfs boot hangs after systemd-networkd starts
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I am trying to nfs-boot a linux managed with systemd, via tftp kernel + nfs rootfs, my bootargs:
root=/dev/nfs rw nfsroot=192.168.0.10:/nfsroot/rootfs,nolock ip=192.168.0.60:192.168.0.10:192.168.0.10:255.255.255.0
Both kernel and rootfs loads successfully and the system is running, until systemd-networkd
starts. After that, I can not ping the machine and NFS mount hangs (obviously).
I tried to add network config for systemd-networkd
to initialize the network, but it does not work.
The serial console log:
Starting Network Service...
...
[ OK ] Started Network Service.
[ OK ] Reached target Network.
...
[ * 39.330000] nfs: server 192.168.0.10 not responding, still trying
The network config:
[Match]
Name=eth0
[Network]
Address=192.168.0.60/24
Gateway=192.168.0.10
[Route]
Gateway=192.168.0.10
Destination=192.168.0.0
I wonder why systemd-networkd.service
breaks the network when the system is started via nfs?
I guess when networkd
starts, it withdraws the ip address, and then tries to read the config file. At this time the nfs mount already breaks, and it does not have a chance to read the config file.
If my guess is true, how to "fix" or "workaround" this issue?
boot nfs systemd-networkd
add a comment |Â
up vote
1
down vote
favorite
I am trying to nfs-boot a linux managed with systemd, via tftp kernel + nfs rootfs, my bootargs:
root=/dev/nfs rw nfsroot=192.168.0.10:/nfsroot/rootfs,nolock ip=192.168.0.60:192.168.0.10:192.168.0.10:255.255.255.0
Both kernel and rootfs loads successfully and the system is running, until systemd-networkd
starts. After that, I can not ping the machine and NFS mount hangs (obviously).
I tried to add network config for systemd-networkd
to initialize the network, but it does not work.
The serial console log:
Starting Network Service...
...
[ OK ] Started Network Service.
[ OK ] Reached target Network.
...
[ * 39.330000] nfs: server 192.168.0.10 not responding, still trying
The network config:
[Match]
Name=eth0
[Network]
Address=192.168.0.60/24
Gateway=192.168.0.10
[Route]
Gateway=192.168.0.10
Destination=192.168.0.0
I wonder why systemd-networkd.service
breaks the network when the system is started via nfs?
I guess when networkd
starts, it withdraws the ip address, and then tries to read the config file. At this time the nfs mount already breaks, and it does not have a chance to read the config file.
If my guess is true, how to "fix" or "workaround" this issue?
boot nfs systemd-networkd
I guess whennetworkd
starts, it withdraws the ip address, and then tries to read the config file. At this time the nfs mount already breaks, and it does not have a chance to read the config file.
â Mine
Dec 22 '17 at 8:42
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I am trying to nfs-boot a linux managed with systemd, via tftp kernel + nfs rootfs, my bootargs:
root=/dev/nfs rw nfsroot=192.168.0.10:/nfsroot/rootfs,nolock ip=192.168.0.60:192.168.0.10:192.168.0.10:255.255.255.0
Both kernel and rootfs loads successfully and the system is running, until systemd-networkd
starts. After that, I can not ping the machine and NFS mount hangs (obviously).
I tried to add network config for systemd-networkd
to initialize the network, but it does not work.
The serial console log:
Starting Network Service...
...
[ OK ] Started Network Service.
[ OK ] Reached target Network.
...
[ * 39.330000] nfs: server 192.168.0.10 not responding, still trying
The network config:
[Match]
Name=eth0
[Network]
Address=192.168.0.60/24
Gateway=192.168.0.10
[Route]
Gateway=192.168.0.10
Destination=192.168.0.0
I wonder why systemd-networkd.service
breaks the network when the system is started via nfs?
I guess when networkd
starts, it withdraws the ip address, and then tries to read the config file. At this time the nfs mount already breaks, and it does not have a chance to read the config file.
If my guess is true, how to "fix" or "workaround" this issue?
boot nfs systemd-networkd
I am trying to nfs-boot a linux managed with systemd, via tftp kernel + nfs rootfs, my bootargs:
root=/dev/nfs rw nfsroot=192.168.0.10:/nfsroot/rootfs,nolock ip=192.168.0.60:192.168.0.10:192.168.0.10:255.255.255.0
Both kernel and rootfs loads successfully and the system is running, until systemd-networkd
starts. After that, I can not ping the machine and NFS mount hangs (obviously).
I tried to add network config for systemd-networkd
to initialize the network, but it does not work.
The serial console log:
Starting Network Service...
...
[ OK ] Started Network Service.
[ OK ] Reached target Network.
...
[ * 39.330000] nfs: server 192.168.0.10 not responding, still trying
The network config:
[Match]
Name=eth0
[Network]
Address=192.168.0.60/24
Gateway=192.168.0.10
[Route]
Gateway=192.168.0.10
Destination=192.168.0.0
I wonder why systemd-networkd.service
breaks the network when the system is started via nfs?
I guess when networkd
starts, it withdraws the ip address, and then tries to read the config file. At this time the nfs mount already breaks, and it does not have a chance to read the config file.
If my guess is true, how to "fix" or "workaround" this issue?
boot nfs systemd-networkd
edited Dec 22 '17 at 9:53
GAD3R
22.5k154894
22.5k154894
asked Dec 22 '17 at 8:27
Mine
1415
1415
I guess whennetworkd
starts, it withdraws the ip address, and then tries to read the config file. At this time the nfs mount already breaks, and it does not have a chance to read the config file.
â Mine
Dec 22 '17 at 8:42
add a comment |Â
I guess whennetworkd
starts, it withdraws the ip address, and then tries to read the config file. At this time the nfs mount already breaks, and it does not have a chance to read the config file.
â Mine
Dec 22 '17 at 8:42
I guess when
networkd
starts, it withdraws the ip address, and then tries to read the config file. At this time the nfs mount already breaks, and it does not have a chance to read the config file.â Mine
Dec 22 '17 at 8:42
I guess when
networkd
starts, it withdraws the ip address, and then tries to read the config file. At this time the nfs mount already breaks, and it does not have a chance to read the config file.â Mine
Dec 22 '17 at 8:42
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
It turns out that systemd-networkd
provides an option to not releasing the IP.
Adding below in the config
[DHCP]
CriticalConnection=true
Then the IP will not be released and NFS will not hang.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
It turns out that systemd-networkd
provides an option to not releasing the IP.
Adding below in the config
[DHCP]
CriticalConnection=true
Then the IP will not be released and NFS will not hang.
add a comment |Â
up vote
2
down vote
accepted
It turns out that systemd-networkd
provides an option to not releasing the IP.
Adding below in the config
[DHCP]
CriticalConnection=true
Then the IP will not be released and NFS will not hang.
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
It turns out that systemd-networkd
provides an option to not releasing the IP.
Adding below in the config
[DHCP]
CriticalConnection=true
Then the IP will not be released and NFS will not hang.
It turns out that systemd-networkd
provides an option to not releasing the IP.
Adding below in the config
[DHCP]
CriticalConnection=true
Then the IP will not be released and NFS will not hang.
answered Dec 26 '17 at 9:28
Mine
1415
1415
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f412449%2fnfs-boot-hangs-after-systemd-networkd-starts%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
I guess when
networkd
starts, it withdraws the ip address, and then tries to read the config file. At this time the nfs mount already breaks, and it does not have a chance to read the config file.â Mine
Dec 22 '17 at 8:42