This document describes how to recover after running the rm command in the root directory and applies to AIX Versions 4 and 5.
----------------------------------------------------------------------------------
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.
----------------------------------------------------------------------------------
Procedure
1. For booting the system into Service mode, please refer to Kernel fax, "Booting in Service Mode" for specific machine type.
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.
a. Choose Access a Root Volume Group (Option 1).
b. 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.
c. 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:
5. fsck -y /dev/hd4
NOTE: When running the preceding command with -y, yes will be answered automatically.
mount /dev/hd4 /mnt
6. Rebuild the missing links. Enter:
cd /mntln -s /usr/bin binln -s /usr/lib/boot/unix_up unix OR ln -s /usr/lib/boot/unix_mp unixln -s /usr/lib libln -s /home u
7. Enter:
cd /
umount /dev/hd4
exit
sync;sync;sync
reboot the server
8. 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.
My blog has moved,please visit the new site
IBM AIX/UNIX system storage administration ksh/perl scripting
Friday, March 14, 2008
Recovery from rm * from the Root (/) Directory in AIX 4 and 5
Subscribe to:
Post Comments (Atom)
Labels
- ACL (1)
- admin (2)
- AIX 5.3 (1)
- AIX 6.1 (3)
- Atape (1)
- backup (5)
- backupios (1)
- Best Practices (1)
- bosboot (1)
- cdrom (1)
- cfgmgr (1)
- commands (4)
- compatibility (1)
- console (1)
- device (2)
- dhcp (1)
- disk (1)
- DNS (2)
- Downloads (1)
- dump (1)
- Dynamic (1)
- error (1)
- errpt (1)
- ESS (1)
- etherchannel (1)
- Filesystem (7)
- firmware (2)
- Freeware (1)
- ftp (2)
- getty (1)
- GNU (1)
- HACMP (2)
- HEA (1)
- HMC (2)
- hostname (1)
- I/O (1)
- Installation (2)
- installp (2)
- IP alias (1)
- iptrace (1)
- iso (2)
- IVM.CLI (1)
- jfs (1)
- JFS to JFS2 conversion (1)
- jfs2 (2)
- kdb (1)
- kernel (1)
- LED (2)
- lifecycle (2)
- Live Partition Mobility (1)
- lofiadm (1)
- login (1)
- LPAR (1)
- lppchk (1)
- lsof (1)
- LV (1)
- lvm (3)
- memory (1)
- migration (4)
- mksysb (2)
- mkvdev (1)
- mkvgdata (1)
- mount (1)
- multibos (1)
- ndd (2)
- netstat (1)
- network (7)
- NFS (2)
- NIC (4)
- NIM (2)
- NPIV (1)
- ODM (2)
- openssh (1)
- oslevel (1)
- patching (1)
- Performance (4)
- Perl (2)
- Perl Module (2)
- permission (1)
- port (1)
- Power VM (1)
- Power5 (1)
- Power6 (1)
- printer (1)
- problem (17)
- process (4)
- RAID5 (1)
- Recovery (2)
- respawn (1)
- restore (1)
- routing (4)
- RSC (1)
- runq (1)
- savevg (1)
- scripts (4)
- SEA (1)
- security (5)
- sendmail (1)
- solaris (7)
- SSA (1)
- SSH (2)
- ssh-agent (1)
- storage (3)
- subnet (1)
- Sun Remote System Control (1)
- support (2)
- synchronize (1)
- TCPIP (5)
- telnet (2)
- time zone (1)
- topas (1)
- Total Storage (1)
- trace (2)
- tuning (1)
- uninstall (1)
- update (1)
- update boot (4)
- upgrade (3)
- users (2)
- Veritas Volume Manager (1)
- VG (1)
- VIOS (4)
- VMM (1)
- VxVM (1)
- wtmp (1)
Blog Archive
-
▼
2008
(28)
-
▼
March
(9)
- 0516-070 : LVM system call found an unaccountable ...
- The ps command enhancement (5300-05)
- Firmware upgrade on IBM p-series 9111-520 without HMC
- Tunable IPC/Shared Memory Kernel Parameters in AIX
- Recovery from rm * from the Root (/) Directory in ...
- How to mount ISO image file on AIX.
- Enhanced login privacy for AIX 5L Version 5.2.0 A...
- Why Numbers from "du -s" and "df" DisagreeThis doc...
- Disabling undesired TCP/IP services in AIXAbstract...
-
▼
March
(9)
No comments:
Post a Comment