Recovering directly attached disks

Read to learn how to recover directly attached disks.

When you install Linux in a logical partition with directly attached disk resources, the kernel is loaded to the A and B slots, not to *NWSSTG. When you recover a Linux partition in this configuration (for example, when you recover primary partition configuration data after you scratch the primary partition), you must change the network server description of the Linux partition in order to start from a kernel in the integrated file system (*STMF). After you start the partition, you can use Linux commands to rewrite the Linux kernel and enable the partition to be startable.
To start a Linux partition on a directly attached disk and then write the kernel so that you can start the system on subsequent re-starts, follow these steps:
  1. Load a kernel in your integrated file system.
  2. Run the Work with Configuration Status (WRKCFGSTS) command, and specify network server (*NWS) as the configuration type. A list of network server descriptions appears.
  3. Type 8 to display the description in the Option column next to the Linux partition you want to start. A description of that network server appears.
  4. Type 2 to edit in the Option column next to Start source, Start stream file, and Start parameters.
  5. Edit those fields so that they contain the following values:
    • IPL source = *STMF
    • IPL stream file = <IFS path to your kernel>, (for example, /home/kernels/vmlinux64)
    • IPL parameters = root=/dev/sdaX, where X is equal to the disk partition that your root file system is on. This is often sda1 or sda2.
  6. Save these changes.
  7. Connect to the virtual console. Enter telnet <your machine> 2301.
  8. Vary on the partition.
  9. Log in to the partition.
  10. If your server does not have a copy of the kernel that you want to install, FTP it on to your server. You could even NFS share it off of the i5/OS®.
  11. Write the kernel to your B slot by using the following command:
    dd if <path to your kernel name> = of=/proc/iSeries/mf/B/vmlinux bs=4096
    This command may take a while to complete.
  12. Set the command line to the same value you used for the Start parameters above. First, you may want to echo a large amount of space into the cmdline file to make sure that any previous parameters are cleared. To do so, use the following command:
    echo root=/dev/sdax > /proc/iSeries/mf/B/cmdline
  13. Echo your command line:
    echo root=/dev/sdaX > /proc/iSeries/mf/B/cmdline 
  14. Verify that the command line was successfully entered by using the following command:
    cat /proc/iSeries/mf/B/cmdline
    You should see the same thing you echoed in above.
  15. Shut down the partition by using the following command:
    shutdown -h now
  16. Edit your network server description by using the Work with Configuration Status (WRKCFGSTS) command as described in steps 2 and 3 above.
  17. Set the Start source = B and the Start stream file = *NONE.
  18. Now you can vary on your partition and use the kernel installed in the iSeries™ server slot B.