On some occasions, you have asked us how to disable networking at operating system startup, for example, to prevent repeated notifications from being sent when the server starts or to prevent the server from connecting to other configured services, which could cause problems. In this article, we will explain step by step how to disable networking by disabling the driver at system startup on Ubuntu, Debian, Centos, and Alma Linux.
Common steps
The first thing you need to do is access the Clouding client panel and go to your server's Ajustes. In this window, first click "Reinicio Forzado" and immediately afterward open the emergency console. It is important that once you click "Reinicio Forzado", you access the console quickly enough to complete the following steps in time. If the console is not available yet, reload the page until it is.
Once you have opened the emergency console, press the "ESC" key to see the boot options. You should see something similar to the following screenshot; on the first option, press the "e" key to edit the Kernel parameters when starting the VPS.
By default, you will see the following configuration:
While editing, after "nomodeset", you need to add:
modprobe.blacklist=virtio_net modprobe.blacklist=virtio-net rd.driver.blacklist=virtio-net,virtio_net
The result should be as follows:
Once inserted, press "Ctrl-x" to save the changes, and the server will start without networking.
When you want to start networking again, run:
# modprobe virtio-net
You can also restart the server and edit the Kernel parameters again to make sure these options are no longer present.
Once you have opened the emergency console, press the "ESC" key to see the boot options. You should see something similar to the following screenshot; on the first option, press the "e" key to edit the Kernel parameters when starting the VPS.
While editing, after "nomodeset", you need to add:
modprobe.blacklist=virtio_net modprobe.blacklist=virtio-net rd.driver.blacklist=virtio-net,virtio_net
The result should be as follows:
Once inserted, press "Ctrl-x" to save the changes, and the server will start without networking.
Once inside, you can run the command "ip a" to check that ethernet has not loaded.
When you want to start networking again, run:
# modprobe virtio-net
You can also restart the server and edit the Kernel parameters again to make sure these options are no longer present.
Once you have opened the emergency console, press the "ESC" key to see the boot options. You should see something similar to the following screenshot; on the first option, press the "e" key to edit the Kernel parameters when starting the VPS.
While editing, after "nomodeset", you need to add:
modprobe.blacklist=virtio_net modprobe.blacklist=virtio-net rd.driver.blacklist=virtio-net,virtio_net
The result should be as follows:
Once inserted, press "Ctrl-x" to save the changes, and the server will start without networking.
Once inside, you can run the command "ip a" to check that ethernet has not loaded.
When you want to start networking again, run:
# modprobe virtio-net
You can also restart the server and edit the Kernel parameters again to make sure these options are no longer present.
Once you have opened the emergency console, press the "ESC" key to see the boot options. You should see something similar to the following screenshot; on the first option, press the "e" key to edit the Kernel parameters when starting the VPS.
While editing, after "nomodeset", you need to add:
modprobe.blacklist=virtio_net modprobe.blacklist=virtio-net rd.driver.blacklist=virtio-net,virtio_net
The result should be as follows:
Once inserted, press "Ctrl-x" to save the changes, and the server will start without networking.
Once inside, you can run the command "ip a" to check that ethernet has not loaded.
When you want to start networking again, run:
# modprobe virtio-net
You can also restart the server and edit the Kernel parameters again to make sure these options are no longer present.
With these steps, you have learned how to disable networking on the VPS at operating system startup.