Operating System - HP-UX
1820390 Members
3598 Online
109623 Solutions
New Discussion юеВ

mounting filesystems within the recovery shell

 
David Lewis_1
Advisor

mounting filesystems within the recovery shell

Hi,
I have managed to remove /stand from my system and my boot recovery tape does not work. I would like to restore /stand from the recovery tape but from within the recovery shell I am unable to load in the mount command? any ideas why this particular command will not add in or is there anyway I can mount up the root filesystem
4 REPLIES 4
Steve Steel
Honored Contributor

Re: mounting filesystems within the recovery shell

Hi


read
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x8374972194d6d5118ff40090279cd0f9,00.html

I am sorry you may not like the answer.

Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Uday_S_Ankolekar
Honored Contributor

Re: mounting filesystems within the recovery shell

My suggetion to you is just boot from Recovery tape. This will anyway restore /stand.

Just curious why did you remove /stand anyway???

Good luck,

-USA..
Good Luck..
Stefan Stechemesser
Honored Contributor

Re: mounting filesystems within the recovery shell

Hi, try this:

1.) Load needed commands from make_recovery tape after you have entered the recoveryshell:
loadfile ioscan pax tar mt

2.) make the ioscan:
ioscan -fnkC disk
This should show something like this:
Class I H/W Path Driver S/W State H/W Type Description
=====================================================================
disk 0 0/0/1/0.1.0 sdisk CLAIMED DEVICE HP DVD-ROM 6x/32x
/dev/dsk/c0t1d0 /dev/rdsk/c0t1d0
/dev/dsk/c0t1d0s1lvm /dev/rdsk/c0t1d0s1lvm
/dev/dsk/c0t1d0s2lvm /dev/rdsk/c0t1d0s2lvm
disk 1 0/0/2/0.6.0 sdisk CLAIMED DEVICE SEAGATE ST39102LC
/dev/dsk/c1t6d0 /dev/rdsk/c1t6d0
/dev/dsk/c1t6d0s1lvm /dev/rdsk/c1t6d0s1lvm
/dev/dsk/c1t6d0s2lvm /dev/rdsk/c1t6d0s2lvm
disk 2 0/0/2/1.6.0 sdisk CLAIMED DEVICE SEAGATE ST39102LC
/dev/dsk/c2t6d0 /dev/rdsk/c2t6d0
/dev/dsk/c2t6d0s1lvm /dev/rdsk/c2t6d0s1lvm
/dev/dsk/c2t6d0s2lvm /dev/rdsk/c2t6d0s2lvm

Because most people use LVM, you see two addtional devicefiles for each disk. Normally, the s1lvm is / and the s2lvm is /stand. Identify the correct root disk. For example it may be 0/0/2/1.6.0. Then you can mount /stand with the following commands (mount commands must be loaded seperatly for each fs type (HFS or vxfs):

3.)# loadfile mkdir /sbin/fs/hfs/mount /sbin/fs/hfs/fsck
# mkdir /ROOT
# mkdir /ROOT/stand
# /sbin/fs/hfs/fsck /dev/dsk/c2t6d0s2lvm
# /sbin/fs/hfs/mount /dev/dsk/c2t6d0s2lvm /ROOT/stand

Then your original /stand is hopefully mounted under /ROOT/stand and you can use tar (linked to pax) to restore files from the make_recovery tape:

4.) mt fsf 1 (if tape is /dev/rmt/0m)
5.) cd /ROOT
6.) tar -xv /stand

Hopefully this works. If you use the install CD, you have a script called "chroot_lvmdisk" that automatically mounts / and /ROOT and gives instructions how chroot to the original disk. Another lesson would be how to activate /dev/vg00 to enable single user mode ...

Best regards

Stefan
David Lewis_1
Advisor

Re: mounting filesystems within the recovery shell

Thanks everbody, Stefan sorted it. By the way the reason why I removed /stand was check that the boot recovery tape worked?