1835989 Members
4521 Online
110088 Solutions
New Discussion

Re: /etc/fstab

 
SOLVED
Go to solution
subhashni
Regular Advisor

/etc/fstab

Hi
I acceidently commented out some of the file system in /etc/fstab.Now i could not boot the system.As well as i could boot in to single user mode using CD.What should i do?I need to
Change the entries in /etc/fstab and boot the system.Please help.
unix4me
22 REPLIES 22
Bill McNAMARA_1
Honored Contributor

Re: /etc/fstab

mount your filesystems one by one

mount -p > /etc/fstab

mount -p > /fstab.backup

Later,
Bill
It works for me (tm)
Sanjay_6
Honored Contributor
Solution

Re: /etc/fstab

Hi,

If you can boot into single user mode using the system itself, you can edit the /etc/fstab file and uncomment the entries and then reboot. If you have booted using the Cd, you'll have to mount the lvol3 to a temporary directory and then edit etc/fstab in that directory, unmount the lvol3, and reboot.

Hope this helps.

Regds
subhashni
Regular Advisor

Re: /etc/fstab

No.I can not get in to single user mode.Even when booting from CD
unix4me
Bill McNAMARA_1
Honored Contributor

Re: /etc/fstab

oh, sorry being too quick

if you can't boot into lvmmaintenance/single user

hpux -is -lm

and uncomment your modifs then you'll need to activate all the vgs via

vgchange -a y vg00
mount /dev/vg00/lvol1 /stand
mount /dev/vg00/lvol9 /var
mount /dev/vg00/lvol7 /usr
mount /dev/vg00/lvol4 /tmp
mount /dev/vg00/lvol6 /opt
mount /dev/vg00/lvol5 /home

vgchange -a y vg01
vgdisplay -v vg01 | grep Name
mount ..
mount ..
mount ..
(you can get hte vgnames from strings /etc/lvmtab)

and mount the lv's /filsystems individually.

mount -p will return a format compatable with the /etc/fstab.


Later,
Bill
It works for me (tm)
Helen French
Honored Contributor

Re: /etc/fstab

Hi,

Boot in single user mode from the boot disk (why CD ?). At the ISL prompt:

ISL > hpux -is

OR, if you want LVM maintenance mode,

ISL> hpux -lq

Once booted from the bood disk, you will be able access /etc/fstab. Edit it and make the changes. If you kept a copy of the file, you can make use of that.

HTH,
Shiju
Life is a promise, fulfill it!
Bill McNAMARA_1
Honored Contributor

Re: /etc/fstab

If it's an A,L or N you can take a disk from a working system, boot from it,
vgimport your failed disk,
mount the lvols,
repair the fstab, vgexport, replace the hardware, reboot.

Other than that, you should be able to mount your / from the rescue memory based system.

The device file will be strang, but you've got some limited commands in /sbin/

after mounting it, you can repair the fstab.

Strange that
hpux -is -lm
doesn't work....

Later,
Bill
It works for me (tm)
Helen French
Honored Contributor

Re: /etc/fstab

Ooops ..sorry !

for lvm maintenance use 'hpux -lm'

'hpux -lq' for no quarum check

Shiju
Life is a promise, fulfill it!
Sanjay_6
Honored Contributor

Re: /etc/fstab

Sanjay_6
Honored Contributor

Re: /etc/fstab

Hi,

yopu can try the lvm maintainance mode suggested by bill and shiju first. If that doesn't help then try the link posted by me.

Hope this helps.

Regds
subhashni
Regular Advisor

Re: /etc/fstab

Guys,
I could not boot from disk even to single user mode.If I boot from cdrom like
boot P3
Interact with IPL>Y
IPL>hpux -lm

Is this right?or please tell me the further steps.I lost myself in the tension.
Thanks
unix4me
Sanjay_6
Honored Contributor

Re: /etc/fstab

Hi Subhashni,

try this,

boot the system, interrupt the boot process.

type "bo pri"

Select y to interact with ipl. at the ipl prompt type

ipl> hpux -lm (;0)/stand/vmunix

this will boot the system into lvm maintainance mode. Edit /etc/fstab. save the file and reboot. don't do a shutdown over here.

If this does not work. Boot the system using the core os cd, at the install menu, choose to interact with the recovery cell and then follow the pocedure outline in the link i had posted earlier. If you are unable to open the link, i can post it as a text attachement. Let me know if you want us to post it as a text attachement and if you are unable to open the link.

Hope this helps.

regds

Helen French
Honored Contributor

Re: /etc/fstab

Hi,

boot from the disk itself. You don't need to use the Recovery CD now. Boot from the root disk - interact with ISL - hpux -lm.

As a next step, you can try booting from the OLD kernel, if you suspect that as a problem. /stand/vmunix.prev

HTH,
Shiju
Life is a promise, fulfill it!
subhashni
Regular Advisor

Re: /etc/fstab

Yes.sanjay.You are right.I could not open the link.CAn pls send the text.Thanks for the help.
unix4me
Sanjay_6
Honored Contributor

Re: /etc/fstab

Hi Subhashni,

Here is the doc in text format

hope this helps.

Regds


subhashni
Regular Advisor

Re: /etc/fstab

Hi sanjay
I could not open the text message also.Can you please cut and paste in reply itself.That will
be very helpful for me.
Thanks
unix4me
Sanjay_6
Honored Contributor

Re: /etc/fstab

Hi Subhashni,

Here is the doc, I've edited it to make it a little smaller

//Quote//
How do I boot my system from Support Media on 11.00 ?
DocId: OZBEKBRC00000582
Updated: 1/28/00 11:06:37 AM

PROBLEM : My system won't boot due to problems with the LIF area, a missing kernel, or other missing files on my system.

RESOLUTION

FOR HPUX 11.XX ---------

Activate an LVM Root Volume Group from the Install/Support Media on a 11.00 system with 24MB of memory or more

This document details how to access your LVM Root Volume Group from the Install/Support Media at 11.00.

NOTE
1. Boot from the Install/Support Media.
Boot from the path of the CD media and do NOT interact with ISL.
You will get a menu with the following options:

Install HP-UX
Run a recovery shell
Advanced Options

2. Select "Run a Recovery Shell" from the menu.

3. Enter x from the SUPPORT MEDIA MAIN MENU, to exit to the shell.

4. Type chroot_lvmdisk. Something similar to the following will be displayed:

Enter the hardware path associated with the '/'(ROOT) file system (example: 7.6.9.37 )

5. Type to accept the example (default) as your root file system hardware path; otherwise, enter the hardware path for the root file system hardware you wish to specify in its place.

6. If you type , the following will be displayed:

Is 7.6.9.37 the hardware path of the root/boot disk?[y|n|q]-

7. Enter y, and something similar to the following will be displayed:
If your disk IS an LVM disk, you will see the following:

/sbin/fs/hfs/fsck -c 0 -y /dev/rdsk/c2t1d0s2lvm

** /dev/rdsk/c2t1d0s2lvm
** Last Mounted as /
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
6256 files, 0 icont, 1494 used, 1563824 free (928 frags, 195362 blocks)

/sbin/fs/hfs/mount /dev/dsk/c2t1d0s2lvm /ROOT
/sbin/fs/hfs/mount /dev/dsk/c2t1d0s1lvm /ROOT/stand

loading /usr/sbin/chroot
x ./usr/sbin/chroot 123456 bytes 96 blocks

Enter 'cd /ROOT; chroot /ROOT /sbin/sh' at the shell prompt to chroot to the customer's /(root) disk.

(NOTE: If this command fails with a "bad superblock.." message, your boot disk may not be an LVM disk.
If so, try: fsck /dev/rdsk/c2t1d0 (use your special file!)
If you see fsck messages akin to those above, you are making progress and your disk is NOT an LVM disk.)

8. Enter cd ROOT; chroot /ROOT /sbin/sh at the shell prompt.

9. Enter vgchange -a y /dev/vg00.

This will "activate" vg00, so that you can get to your swap area, /usr, etc.

Mount /usr.

10. Enter vgdisplay -v at the prompt.

The logical volumes within the disk corresponding to the various components (/stand, swap, /, /home, /opt, /tmp, /usr, /var) are listed.

You must know which lvol is for swap (usually lvol2), which lvol is for /usr (usually lvol6), etc.

11. Enter the swapon command; for example, swapon /dev/vg00/lvol2.

Usually, install makes lvol2 your swap area with a default value of 48mb, but you must know which lvol is actually your swap area.

Executing this command will yield the error no room in system tables to add paging to lvol2, but this just means that it couldn't configure all the swap in lvol2; however, enough swap is configured to prevent possible memory faults caused by lack of swap.

12. Enter fsck /dev/vg00/rlvol6; that is, use the lvol number where /usr resides. (You may have to umount /dev/vg00/lvol6)

13. Enter the mount command; e.g., mount /dev/vg00/lvol6 /usr.

14. Repeat steps 12 and 13 for /var and /tmp.

You can now repair any file damage that has occurred.

//Endquote//

Hope this helps.

Regds

subhashni
Regular Advisor

Re: /etc/fstab

Thanks.It will work i hope.But Iwas asked to run fsck on device which carries root file system.If i do ,It says that run with -b option.To run -b
option I need alternate superblock.What should i do?Thanks.
unix4me
Sanjay_6
Honored Contributor

Re: /etc/fstab

Hi Subhashni,

your root should be vxfs, so instead of using

/sbin/fs/hfs/fsck -c 0 -y /dev/rdsk/c2t1d0s2lvm

Use,
/sbin/fs/vxfs/fsck -c 0 -y /dev/rdsk/c2t1d0s2lvm

while mounting the root, use the vxfs mount to mount /

Hope this helps.

Regds
subhashni
Regular Advisor

Re: /etc/fstab

Hi
I have attached the messages below

#/sbin/fs/vxfs/fsck /dev/rdsk/c0t5d0
invalid super-block
vxfs fsck: cannot initialize aggregate
file system check failure, aborting ...


# fsck -y /dev/rdsk/c0t5d0
** /dev/rdsk/c0t5d0
BAD SUPER BLOCK: MAGIC NUMBER WRONG
USE -b OPTION TO FSCK TO SPECIFY LOCATION OF AN ALTERNATE
SUPER-BLOCK TO SUPPLY NEEDED INFORMATION; SEE fsck(1M).

If time permits please reply me.I appreciate you like anything.
Thanks.
unix4me
Sanjay_6
Honored Contributor

Re: /etc/fstab

Hi Subhashni,

You have to use /dev/rdsk/c0t5d0s2lvm and not /dev/rdsk/c0t5d0

Hope this helps.

Regds
Amruth
Regular Advisor

Re: /etc/fstab

hi,

A value addition ....and a thought....

The next superblock available by default is at the 16th block....
I forgot the sage of the command....

AR
If i am doing the same way you are doing to me then what is the difference between us.
Luc Bussieres
Frequent Advisor

Re: /etc/fstab

Hi Subhashni,

I come in late in this discussion but I'm trying to understand what exactly you are trying to do.

Why are you trying an fsck on a full disk?

I don't know your configuration so that could be correct but usually with LVM the device that will be mounted or used are in the form: /dev/vg??/lvol? .

So the error message you get from fsck may be normal since the complete disk is not a filesystem. In fact it start with some headers information about the LVM structures.

By default if you have a problem with the root filesystem the device should be /dev/vg00/lvol3.

Now depending on the format of your root filesystem there is 2 different way to run a full fsck:

If it's HFS:
fsck -F hfs /dev/vg00/rlvol3
if it's VXFS:
fsck -F vxfs -o full /dev/vg00/rlvol3

If this fail what is the error message you get?

Luc
La réponse est le malheur de la question