Parcial Summary: INIT: Cannot create /var/adm/utmp or /var/adm/utmpx on Sol7 / Ultra10

From: Ivan Fetch <ifetch_at_du.edu>
Date: Thu Jan 05 2006 - 11:48:30 EST
Hello,


    We ended up solving this by borrowing an internal disk from another 
ultra10 (thanks Andrei), using ufsdump| ufsrestore to move the 
data from the external disk to a partition on this new internal one, 
installed the boot block and edited vstab, and 
the box comes up just fine.


    Thank you to the following folks who responded:
Anatoliy Lisovskiy <fox@genesyslab.com>
David Foster <foster@ncmir.ucsd.edu>
Bhaskar G <cmcbas@sunguru.com>
Brad_Morrison@capgroup.com
Darren Dunham <ddunham@taos.com>



    I'll quote Darren's message as he sums it up well 9as did Brad):

> > 99% of the time, this is a symptom of a larger problem, which is that
> the root filesystem was not mounted read/write (assuming that you do not
> have a separate /var filesystem).

    In this case, /var is part of /.

> Given the rest of your post, this can happen because the booting kernel
> mounts the filesystem read-only, then uses the device in /etc/vfstab
> (and the links in /dev and /devices) to mount read-write.  If those
> can't be used, then the remount fails.
> The drvconfig -r stuff should have cleaned that, though.  Another thing
> is if the /etc/vfstab is incorrect.

    It seemd booting from the external disk never got around to mounting / 
RW.   I wasn't able to get great feedback during boot -v to even see more 
about what was happening behind the sceens, or why it couldn't; wouldn't 
mount the filesystem RW..

    Possibly the devlinks, disks, tapes, Etc commands did not work properly 
(David Foster mentions that some times this is the case).


> You might be able to force 
> read-write with 'uadmin 4 0', but 
> that doesn't solve it in general unless you can find the root issue and
> resolve it.

> On this old system, /etc/mnttab is a static file.  When you ran 'mount',
> it was displaying the contents of that file which had not been rebuilt
> (because the filesystem was read-only).  Until root is remounted
> read-write and the file reset, the output of 'mount' is useless.
> (Starting with Solaris 8, /etc/mnttab is no longer a regular file that
> can do this...)




    SO ultimately I'm not sure what the issue was - we'll see next time I 
move root disks to different controllers.  Thanks again to everyone for 
their help,

Ivan Fetch.



----- my initial question -----


Date: Wed, 4 Jan 2006 13:52:16 -0700 (MST)
From: Ivan Fetch <ifetch@du.edu>
To: sunmanagers@sunmanagers.org
Subject: INIT: Cannot create /var/adm/utmp or /var/adm/utmpx on Sol7 / Ultra10

HI Sun Managers,

    Booting Solaris 7 from a new disk is giving us the following:

SunOS Release 5.7 Version Generic_106541-34 64-bit [UNIX(R) System V Release 
4.0]
Copyright (c) 1983-2002, Sun Microsystems, Inc.
|
INIT: Cannot create /var/adm/utmp or /var/adm/utmpx
INIT: failed write of utmpx entry:"  "
INIT: failed write of utmpx entry:"  "
INIT: SINGLE USER MODE
ENTER RUN LEVEL (0-6, s or S): s
will change to state s

INIT: SINGLE USER MODE



    Booting from CD, I can see that //var/adm permissions aren't an issue, and 
I've tried moving utmp and utmpx out of the way as well:
# ls -lad /a/var /a/var/adm /a/var/adm/utmp /a/var/adm/utmpx
drwxr-xr-x  28 root     sys          512 Dec 20 22:58 /a/var
drwxrwxr-x   7 root     sys          512 Jan  4 10:10 /a/var/adm
-rw-r--r--   1 root     bin            0 Jan  4 10:10 /a/var/adm/utmp
-rw-r--r--   1 root     bin            0 Jan  4 10:10 /a/var/adm/utmpx


(longer story...)
    We had a disk go bad on an ultra10 running Solaris 7, and to attempt to get 
things running quicly we connected an external SCSI disk and restored from 
tape. Instead of creating separate /var, /opt, and /export/home partitions, we 
restored all partitions into a single 7 Gb root filesystem.

    We changed vfstab to reflect the new partition (instead of multiple mounts 
from c0t0d0 we just have / on c1t3d0), and rebuilt devices (because the c1t3 
devices did not exist) with:
drvconfig -r /a/devices -p /a/etc/path_to_inst
devlinks -r /a
disks -r /a
tapes -r /a


    Installed the boot block with
# cd /usr/platform/`uname -i`/lib/fs/ufs
# installboot bootblk /dev/rdsk/c1t3d0s0


    A devalias was configured for the new boot device as follows:
ok probe-scsi-all
/pci@1f,0/pci@1/pci@1/SUNW,isptwo@4
Target 3
   Unit 0   Disk     FUJITSU MAB3091S SUN9.0G1705
Target 4
   Unit 0   Removable Tape  Qualifier  40     HP      C1557A          U007
   Unit 1   Removable Device type 8  Qualifier  40     HP      C1557A U0
07
Target 5
   Unit 0   Disk     FUJITSU MAA3182S SUN18G 2107

ok show-disks
a) /pci@1f,0/pci@1/pci@1/SUNW,isptwo@4/sd
b) /pci@1f,0/pci@1,1/ide@3/cdrom
c) /pci@1f,0/pci@1,1/ide@3/disk
d) /pci@1f,0/pci@1,1/ebus@1/fdthree@14,3023f0
q) NO SELECTION
Enter Selection, q to quit: a

ok nvalias disk4 /pci@1f,0/pci@1/pci@1/SUNW,isptwo@4/sd@3,0

ok boot disk4


    One other interesting thing, is that before I recreated /devices and /dev, 
booting from the disk complained about being unable to fsck because c1t3d0s0 
devices did not exist.  It did then let me get a single user shell, and mount 
showed all of the old c0t0 mounts even though I'd edit vfstab.



    Any assistance with this is greatly appreciated - what is it we've missed?

Thanks,

Ivan Fetch.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Thu Jan 5 14:36:57 2006

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:54 EST