Using a rescue image from a network-server storage space

You can use a Linux® rescue image on a network-server storage space (NWSSTG) to repair a Linux logical partition that uses IBM® i resources. A rescue image is a disk image that contains the Linux kernel, a shell, and the diagnostic tools, drivers, and other utilities that would be useful for checking and repairing a faulty Linux installation.

About this task

To use the rescue image that you built on the NWSSTG, use the following steps:

Procedure

  1. Disconnect the virtual storage space for the failed logical partition (if applicable) by using the Work with NWS Storage Spaces (WRKNWSSTG) command.
  2. Connect your rescue storage space as the first drive to the network server description (NWSD), and reconnect the original storage space (where applicable) as the second drive.
  3. Edit the NWSD for the failed partition so that it starts from IPL source *NWSSTG. Also, edit the IPL Parameters field to reflect the root partition on the rescue storage space. For most distributions, this is a parameter such as root=/dev/sda3 or root=/dev/vda1. For assistance, see the documentation for your Linux distribution.
  4. Restart the partition.
  5. If the existing root partition is on a dedicated disk, you might need to insert the ibmsis driver using the insmod ibmsis command.
  6. Create a mount point to which you will mount the root partition of the network storage space that you are trying to rescue. You can use a command such as mkdir /mnt/rescue.
  7. Mount the root partition of the network storage space that you are trying to rescue. Mount a drive using the command mount -t partition-type partition-location mount-point, where the partition type is the format of the partition such as ext2 or reiserfs, the partition location is similar to /dev/sdb3 (for non-devfs disk partitions), /dev/sd/disc1/part3 (for devfs disk partitions), or /dev/sda2 (for a partition on a dedicated disk).
  8. The drive that you are trying to rescue, when using virtual disk, will be the second drive rather than the first drive. (That is, if the drive was /dev/sda3 when the partition was running normally, it will be /dev/sdb3 in the rescue server.)
  9. Use the documentation or the configuration files you created when you created the rescue NWSSTG to help you determine the device for the root of the partition you are trying to rescue. Your mount point will be similar to /mnt/rescue if you use the previous example.

What to do next

You can either use the rescue tools provided in your rescue storage space against the mount point you have created or you can work on the partition that you are rescuing from within its own storage space. If rescuing the image from its own storage space, change the root directory for that partition using the chroot mount-point command.