You are not logged in.

#1 2022-08-03 16:22:22

Registered: 2004-05-20
Posts: 98

[SOLVED] Shutdown/reboot hangs with root on network filesystem

If you're running a diskless system with a network filesystem as root what needs to be configured so that shutdown/reboot works?

Currently I'm using networkd and it stops when the shutdown process starts which then causes everything to hang. I removed the shutdown.service dependency for networkd but shutdown still hangs because the network is turned off while journald is still running.

I had been running a system I configured many years ago and I solved this problem but now I can't remember what I did and I can't find anything online.

My solution

Get rid of networkd, it's just not suitable for this type of configuration.

Install and configure bare-metal dhcpcd or using manual network configuration as needed (eg. ifconfig/ip, etc). Now you control when the network goes down. In this case never.

Last edited by oz (2022-08-03 19:36:40)


#2 2022-08-04 22:11:51

Registered: 2015-08-28
Posts: 107

Re: [SOLVED] Shutdown/reboot hangs with root on network filesystem

Instead of having root mounted directly over the network, load the root partition into a RAM disk, and work solely off of that.  When the network begins to shut down, anything the system needs will still be in RAM, rather than lost because networking is off. 

You'll notice things being much faster on this diskless machine, as basic things don't need to go over the network during operation.  This does assume you have ample system memory, though.

EDIT:  You'll need a way to transfer any files written to the RAM disk back to your network share, if you write anything that you want to keep.

Last edited by ectospasm (2022-08-04 22:13:01)


Board footer

Powered by FluxBB