Configuring the Network Adapter in the Rescue Environment

To boot the partition into the Linux rescue environment, refer to Starting a Linux Partition Image in Rescue Mode.

After booting into the rescue environment, you can configure a network adapter that is connected to the machine or partition containing the backup file. The names of the network adapters are in the /sys/class/net directory and can be viewed using the following command:

ls /sys/class/net

The PCI adapters have names in the form ens<adapter number>f<port number>. For example, ens1f0.

If there is a DHCP server on the network, and you want it to configure the network adapter automatically, use the following command to start the DHCP client on the partition

dhclient

If you want to manually configure the adapter and routing, use the ipconfig and route commands:

ifconfig <adapter name> <IP address>/<network prefix length>
route add default gw <gateway address>

For example,

ifconfig ens1f0 122.59.240.21/24
route add default gw 122.59.240.250