ABSTRACT: Recovery from rm * from the Root (/) Directory in AIX 4.x Published date: 19981210 Recovery from rm * from the Root (/) Directory in AIX 4.x ---------------------------------------------------------------------------- Contents About This Document Summary of the Recovery Procedure Procedure ---------------------------------------------------------------------------- About This Document This document describes how to recover after running the rm command in the root directory and applies to AIX Versions 4.x. ---------------------------------------------------------------------------- Summary of the Recovery Procedure Deleting the files in the root directory will delete the following links: bin -> /usr/bin lib -> /usr/lib u -> /home unix -> /usr/lib/boot/unix_up ( or unix_mp ) In the root directory, removing the bin directory link disables the korn shell needed for login. The recovery will boot in service mode and rebuild the links. NOTE: The following procedure describes how to boot the machine into maintenance mode, access the rootvg volume group and start a shell prior to mounting the file systems. If the system does not have a key or if additional details are needed, please contact your AIX support center. ----------------------------------------------------------------------------- Procedure 1. Turn the key to the Service position. 2. With BOOTABLE MEDIA OF THE SAME VERSION AND LEVEL AS THE SYSTEM, boot the system. The bootable media can be ANY ONE of the following: o Bootable CD-ROM o NON_AUTOINSTALL mksysb o Bootable Install Tape Follow the prompts to the Welcome to Base OS menu. 3. Choose Start Maintenance Mode for System Recovery (Option 3). The next screen prompts the Maintenance menu. 1. Choose Access a Root Volume Group (Option 1). 2. Choose 0 continue and Select Volume group by number. At this stage the console should display information about rootvg and also display a menu with two options. 3. Choose Access this volume group and start a shell before mounting the file systems (Option 2). NOTE: If there are errors from the preceding option, do not continue with the rest of this procedure. Correct the problem causing the error. If you need assistance in correcting the problem causing the error, contact one of the following: o local branch office o your point of sale o your AIX support center If no errors occur, proceed with the following steps. 4. Mount the root file system. Enter: fsck -y /dev/hd4 mount /dev/hd4 /mnt 5. Rebuild the missing links. Enter: cd /mnt ln -s /usr/bin bin ln -s /usr/lib/boot/unix_up unix OR ln -s /usr/lib/boot/unix_mp unix ln -s /usr/lib lib ln -s /home u 6. Enter: cd / umount /dev/hd4 exit sync;sync;sync turn the key back to normal mode reboot 7. This should allow the machine to reboot in normal mode so logging in is possible. Depending on what else was in the root directory, files may have to be restored from a backup tape at this point. SPECIAL NOTICES Please use this information with care. IBM will not be responsible for damages of any kind resulting from its use. The use of this information is the sole responsibility of the customer and depends on the customer's ability to eval- uate and integrate this information into the customer's operational environment.