Wednesday, January 30, 2019

configure network in rescue mode and recover data

Configure network in rescue mode and recover data

Boot from Live CD and Choose to go to Rescue System.

By default /mnt/sysimage would be mounted and will get shell to work on.

Or

Log in as root.  You should now be at a rescue prompt.

Mount the filesystem you wish to copy data from:

  mount <device> <mountpoint>
If you run into problems with this, it's likely a driver issue or corrupt filesystem.  Check to see if there is another TID that addresses the issue you are seeing.

View the available network devices with ifconfig -a.

Use ifconfig to configure the network devices as follows:

  ifconfig <network device> netmask <netmask> <ip address>

Example:
 ifconfig eth0 netmask 255.255.255.0 192.168.1.1

NOTE: If you get an error that it can't assign the address, and you're sure the address is available, try it again.
If multi-subnet communication is needed, you'll need to configure the default route with route:

  route add default gw <gateway>You should now be able to use TCP/IP communication. 

You can verify the configuration with:

  ipconfig  netstat -r

The next step is to mount an NFS network share.  Because you are root, your remote filesystem will have to allow root to mount it.  The NFS server will need to use options no_root_sqash and rw for root to be able to copy the data to it.

Note: Try to mount the share with in the same network IP address. 

mount -t nfs <serverip>:<sharepoint> <mountpoint>Example:

 mount -t nfs 192.168.1.50:/var/nfsshare /mnt

NFS Server's /etc/exports example:

 /var/nfsshare *(rw,no_root_squash,sync)

You should now be able to copy the data across the network from rescue mode.

No comments:

Post a Comment