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
Procedure
- Disconnect the virtual storage space for the failed logical partition (if applicable) by using the Work with NWS Storage Spaces (WRKNWSSTG) command.
- 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.
- 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/sda3orroot=/dev/vda1. For assistance, see the documentation for your Linux distribution. - Restart the partition.
- If the existing root partition is on a dedicated disk,
you might need to insert the
ibmsisdriver using theinsmod ibmsiscommand. - 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. - 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). - 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.)
- 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.