- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- recovery from loss of /usr/bin and /usr/sbin
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2002 09:28 AM
04-03-2002 09:28 AM
I've a HP-UX K-class server. We rebooted the server after a long time. There was problem while booting. I found the /etc/inittab entry was corrupt and respawning multiple times without stopping.
I went into single user mode and tried to edit /etc/inittab but to my dismay found /usr/bin and /usr/sbin missing. So i went on a plan to backup the existing data and rebuild the machine.
Since /usr/bin and /usr/sbin missing how should i be able to backup the data? Is there a way to copy the /usr/bin from another server HP-ux 11.00 to this server. Is that will work? Any help is highly appreciated.
Regds
Ramesh
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2002 09:31 AM
04-03-2002 09:31 AM
Re: recovery from loss of /usr/bin and /usr/sbin
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2002 09:34 AM
04-03-2002 09:34 AM
Re: recovery from loss of /usr/bin and /usr/sbin
Regds
Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2002 09:35 AM
04-03-2002 09:35 AM
Re: recovery from loss of /usr/bin and /usr/sbin
When you boot into single-user mode, NOTHING gets mounted. If you want access to /usr, /var, and other parts of VG00 then you have to mount them manually.
Do a:
# vgchange -a y vg00
# mount -a
This will make sure that vg00 is activated and the 'mount -a' will mount everything that it can with vg00 active. If you have other VGs and you get errors when you do the mount, don't worry. Mount can't mount anything unless the other volume groups are active. You probably don't need to worry about them right now.
Once you do the 'mount -a' you will have access to /usr and everything else in vg00. Now try modifying your inittab and go from there.
There is no good reason for a re-install yet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2002 09:39 AM
04-03-2002 09:39 AM
Re: recovery from loss of /usr/bin and /usr/sbin
by any means, have the instant information handy, most likely now mounted on a pc, so you *can* access the manual pages
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2002 09:42 AM
04-03-2002 09:42 AM
Re: recovery from loss of /usr/bin and /usr/sbin
mount /var
mount /usr
(you need both to run vi)
Don't try to restore any data to /usr as it is really the / driectory. It becomes the /usr volume after mount is performed.
Something I like to do in single user mode is to create a reminder in *every* mountpoint directory. The reminder lets me know why there are no files there. So in single user mode, I will type the commands:
umask 077
touch /usr/IamNOTmounted
touch /var/IamNOTmounted
...
and so on. Or in a loop:
for MYDIR in /usr /var /opt /home /tmp
do
touch $MYDIR/IamNOTmounted
done
Feel free to add other directories like /ora1 /ora2 or whatever additional mountpoints you have.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2002 09:51 AM
04-03-2002 09:51 AM
Re: recovery from loss of /usr/bin and /usr/sbin
Please go into single user mode , then
run fsck -y /dev/vg00/rvol*
then do a mount -a
and you are good to go.
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2002 10:45 AM
04-03-2002 10:45 AM
Re: recovery from loss of /usr/bin and /usr/sbin
All your help is hihgly appreciated
Regds
Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2002 05:40 PM
04-03-2002 05:40 PM
Re: recovery from loss of /usr/bin and /usr/sbin
If these files are definitely missing you will need to recover them. The simplest way is to get them off you latest ignite tape (assuming you have one) and change to the device that your using.
# cd /
# mt -t /dev/rmt/0mn rew
# mt -t /dev/rmt/0mn fsf 1
# tar xvf usr/bin
# mt -t /dev/rmt/0m rew
# mt -t /dev/rmt/0mn fsf 1
# tar xvf usr/sbin
If you don't have an ignite tape you will need
to recover from your local backup method. It
certainly seems that someone has run an 'rm -rf' on your system. Are there any other directories missing information in /usr ?? /usr/contrib
/usr/etc
-Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2002 10:25 PM
04-03-2002 10:25 PM
Re: recovery from loss of /usr/bin and /usr/sbin
I am afraid you need to rebuild your box !
Since you do not have any binaries in /usr/bin then you also do not have any of the restaure commands (ie. tar, frecover, cpio) !
So you are NOT able even to :
1. copy them from another system via tape.
2. Mount root disk from another server into your actual server and copy the /usr/bin and /usr/sbin since you do not have the "cp" command under /usr/bin !
So Sorry for that ... You need to rebuild.
Good luck.
Magdi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2002 10:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2002 11:01 PM
04-03-2002 11:01 PM
Re: recovery from loss of /usr/bin and /usr/sbin
You are right ... I forgot to check it in the /sbin ! And I hope in this case that the /sbin had not been removed also !
Magdi