Oeps! How to mount /etc/ from other rescue Linux? New network /etc/network/interfaces configuration?

 What If your server is crashing from one rack? You can still boot server with another rescue Linux and mount hard disk to analyze what actually happened in your OS.. And maybe set this hard drive in other hardware and restore your system back.


blkid -c /dev/null -o list



root@rescue ~ # mkdir /media/configs
root@rescue ~ # mount /dev/md2 /media/configs
root@rescue ~ # ls /media/configs


Old network configuration 

DHCP

auto eth0
allow-hotplug eth0
iface eth0 inet dhcp


# Or static device: eth0

auto  eth0

iface eth0 inet static

 address   88.99.238.89
broadcast 88.99.98.127
 netmask   255.255.255.200
 gateway   88.99.98.65
 default route to access subnet
 up route add -net 88.99.98.45 netmask 255.255.255.192 gw 88.99.98.56 eth0


Network interface name

 See NetworkInterfaceNames. Starting with Stretch, by default, the new system no longer uses the old-style interface names, such as eth0, eth1, wlan0, wlan1. The new system uses a name based on the hardware location, such as eno0, enp0s31f6, wlp1s7 (or in the case of using a USB dongle, the MAC address: enx2c56ac39ec0d).

 

vim /etc/netplan/01-netcfg.yaml



### Hetzner Online GmbH installimage
network:
  version: 2
  renderer: networkd
  ethernets:
    eno1:
      addresses:
        - 88.99.98.33/32
        - 2a01:4f8:221:e46::2/64
      routes:
        - on-link: true
          to: 0.0.0.0/0
          via: 88.99.98.56
      gateway6: fe80::1
      nameservers:
        addresses:
          - 213.133.99.99
          - 213.133.98.98
          - 213.133.100.100
          - 2a01:4f8:0:1::add:1010
          - 2a01:4f8:0:1::add:9999
          - 2a01:4f8:0:1::add:9898


 

 




Comments