Tux on VM

Last updated on:
Sunday, July 06, 2008

Software

Information

Community

News

Fun

Credits




Valid HTML 4.01!
Linux for Big Iron

Repairing Linux Using the Install System

This information was contributed by Peter Webb.


I recently applied service to my Redhat 7.2 Linux/390 system, and I neglected to run zipl afterward to point to the new kernel. The kernel would not boot, I didn't have a backup, and my other Linux machines were older SUSE versions with incompatible disk layouts.

I did, however, still have my initial installation files, the initrd, kernel and parm files. This describes how I used those files to repair my Linux system.

My broken Linux used the following disk layout:

200 (dasda) - /
201 (dasdb) - swap
202 (dasdc) - /usr
203 (dasdd) - /home

  1. Boot the Linux install system. For me this was running REDHAT EXEC on my Linux userid under VM.
    redhat
    For a system running in an LPAR, this could be done by IPLing from a tape drive.
  2. Follow the install instructions and SSH in, but do not run 'loader'.
  3. At this point, you have a functioning Linux, but the disks for the broken version are not accessible. To make them accessible, you have to make device nodes for each disk you need to access. Enter:
    mknod -m 660 /dev/dasda b 94 0
    mknod -m 660 /dev/dasda1 b 94 1
    mknod -m 660 /dev/dasdc b 94 8
    mknod -m 660 /dev/dasdc1 b 94 9
  4. You will probably have to load the DASD drivers for your disks
    insmod dasd_mod dasd=200,202
    insmod dasd_eckd_mod
  5. Now the file systems can be mounted.
    mount /dev/dasda1 /mnt
    mount /dev/dasdc1 /mnt/usr
  6. Change the active root directory from the install system to the broken system.
    /mnt/usr/sbin/chroot /mnt /bin/bash
    cd /boot
  7. Edit the zipl configuration file to point to the correct kernel version using your favourite editor.
    the /etc/zipl.conf
  8. Run zipl to rewrite the boot files to the boot disk.
    /sbin/zipl
  9. Get out of the chroot environment
    exit
  10. Unmount your file systems so that they will be "clean" when you reboot
    cd /
    umount /mnt/usr /mnt
  11. The install system will not shutdown, so just get a CP prompt on your 3270 session, and boot your fixed Linux. It should now come up normally.
    For a system running in an LPAR, this would be done by re-IPLing from the HMC.

A big thanks to Neale Ferguson, Mark Post, Guillaume Morin and, last but not least, Vic Cross for their help in fixing my Linux and refining this procedure.

 

Site hosting courtesy of Velocity Software