password restoration, NOTICE: /: unexpected free inode

From: Alexander (cloun203@mail.ru)
Date: Tue Jun 07 2005 - 07:17:22 EDT


Hi people,

 

I'm using sun v100 with DiskSuite. I forgot the root password and needed to
restore them by booting from cdrom in single mode. After that I edited the
/a/etc/shadow file I rebooted the system.

 

During boot I got the next errors

 

"NOTICE: /: unexpected free inode 448024, run fsck(1M)"

And some partitions were not mounted.

 

What should be done to have system working? Below are my exact steps. What
is missing?

 

Best Regards

Alexander

 

 

 

1)press Stop-A from the console or send a break from a remote terminal

  This will bring the console to the OK (open boot) prompt

  

2)Insert a Solaris Install disk into the CDROM

 

3)Boot from the CD into single user mode

  At the OK prompt, enter boot cdrom -s

  

4)When the system comes up, run disk check

#fsck -o p /dev/rdsk/c0t0d0s0

 

5)mount the root partition to the temporary mount point

#mount /dev/dsk/c0t0d0s0 /a

 

6)Comment out rootdev entry from the /a/etc/system file:

#vi /a/etc/system

 

For example:

change the line:

rootdev:/pseudo/md@0:0,0,blk

 

to

*rootdev:/pseudo/md@0:0,0,blk

 

7)edit /a/etc/vfstab file so that the root partition references disk slices
instead

of disksuite metadevices.

 

For example:

 

#device device mount FS fsck mount
mount

#to mount to fsck point type pass at boot
options

#

#/dev/md/dsk/c1d0s2 /dev/rmd/dsk/c1d0s2 /usr ufs 1 yes

-

fd - /dev/fd fd - no -

/proc - /proc proc - no -

/dev/md/dsk/d1 - - swap - no -

/dev/md/dsk/d0 /dev/md/rdsk/d0 / ufs 1 no logging

/dev/md/dsk/d4 /dev/md/rdsk/d4 /opt ufs 2 yes logging

/dev/md/dsk/d5 /dev/md/rdsk/d5 /var ufs 1 no logging,nosuid

/dev/md/dsk/d6 /dev/md/rdsk/d6 /billing ufs 2 yes logging,noatime,nosuid

/dev/md/dsk/d7 /dev/md/rdsk/d7 /IMS ufs 2 yes logging,nosuid

swap - /tmp tmpfs - yes -

 

to

 

#device device mount FS fsck mount
mount

#to mount to fsck point type pass at boot
options

#

#/dev/md/dsk/c1d0s2 /dev/rmd/dsk/c1d0s2 /usr ufs 1 yes

-

fd - /dev/fd fd - no -

/proc - /proc proc - no -

/dev/md/dsk/d1 - - swap - no -

/dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no
logging

/dev/md/dsk/d4 /dev/md/rdsk/d4 /opt ufs 2 yes logging

/dev/md/dsk/d5 /dev/md/rdsk/d5 /var ufs 1 no logging,nosuid

/dev/md/dsk/d6 /dev/md/rdsk/d6 /billing ufs 2 yes logging,noatime,nosuid

/dev/md/dsk/d7 /dev/md/rdsk/d7 /IMS ufs 2 yes logging,nosuid

swap - /tmp tmpfs - yes -

 

 

8)edit the /etc/shadow file to remove encrypted passwd

#vi /a/etc/shadow

 

For example:

edit this line from:

root:Hgx8fzz2uRJaw:12205:7:84:84:::

 

to:

root::12205:7:84:84:::

 

9)#umount /a

 

10) reboot the system

#reboot

 

This will reboot from disk

Here I had the errors : Unexpected free inodes

 

 

11)Login as root. It will not prompt you for a password...just hit "enter"

 

12)Reset the password

#passwd root

 

Type in the new password twice

 

13) clear the current mirror setup for d0

#metaclear d0

 

14)setup d0 to be c0t0d0s0 submirror as primary

#metainit d0 -m d10

 

15)fix up the /etc/system and vfstab files

#metaroot d0

 

16) reboot the system

#reboot

 

17)resync the root mirror

#metattach d0 d20

 

You can check the status of the synchronization by invoking

#metastat d0

 

18)eject the cd

#eject cdrom
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:30:51 EDT