SUMMARY: Help system in a unusable state!

From: Jim Craven (craven@cg.NRCan.gc.ca)
Date: Mon Sep 13 1999 - 08:56:34 CDT


Manually running the postpatch script fixed my problem. The postpatch
script rebuilds a few key pseudo devices and what not that are obviously
very important if not correctly updated after a major system change.

Note that I had to boot single user off my cdrom first. Then I
fsck'd my root partition. Then I mounted the root partition on /a.
   %ok boot cdrom -s
   #fsck /dev/rdsk/c0t0d0s0
   (here I mounted up another disk with the postpatch script and copied
   it to /tmp.
   #mount /dev/dsk/c0t0d0s0 /a
   #/tmp/postpatch

Thanks to HenSiong Tan who nailed the problem on the head.

Jim

myprompt> more postpatch
#! /bin/sh
#
#
# This is for the remote console. It checks for existence
# of the new device nodes, and creates them if necessary. This
# code emulates what would otherwise occur in SUNWcsd/postinstall,
# it is a requirement that this code run before the reconfiguration
# reboot.
#
# this is where you specify the temporary root disk mount point
ROOTDIR=/a
# ensures an entry is in /etc/name_to_major
if [ -f $ROOTDIR/kernel/drv/sysmsg ]; then
        /usr/sbin/add_drv -n -b $ROOTDIR sysmsg
else
        exit 0
fi

devnode=$ROOTDIR/devices/pseudo/sysmsg@0:sysmsg

grep sysmsg $ROOTDIR/etc/name_to_major >/dev/null 2>&1
if [ "$?" = "0" ]; then
        major_sysmsg=`grep sysmsg \
                $ROOTDIR/etc/name_to_major | nawk '{ print $2 }'`
else
        exit -1
fi
rm -f $devnode
mknod $devnode c $major_sysmsg 0
chmod 0600 $devnode
chown root:sys $devnode

devnode=../devices/pseudo/sysmsg@0:sysmsg

devlink=sysmsg
( cd $ROOTDIR/dev ; \
        rm -f $devlink ; ln -s $devnode $devlink )

devnode=$ROOTDIR/devices/pseudo/sysmsg@0:msglog
grep sysmsg $ROOTDIR/etc/name_to_major >/dev/null 2>&1
if [ "$?" = "0" ]; then
        major_sysmsg=`grep sysmsg \
                $ROOTDIR/etc/name_to_major | nawk '{ print $2 }'`
else
        exit -1
fi
rm -f $devnode
mknod $devnode c $major_sysmsg 1
chmod 0600 $devnode
chown root:sys $devnode

devnode=../devices/pseudo/sysmsg@0:msglog

devlink=msglog
( cd $ROOTDIR/dev ; \
        rm -f $devlink ; ln -s $devnode $devlink )
exit 0
 

Jim Craven wrote:
>
> On our E450 I just added the latest jumbo kernel patch for sol2.7,
> namely 106541-07, however the reboot is failing with the message:
>
> 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):
>
> If one replies with an 's' then the message is
> will change to state s
> however the 'ENTER RUN LEVEL' prompt is repeated!
>
> If I select another run level the system goes back to the first
> INIT error message and the loop of messages is repeated. Any attempt
> to get out of this is foiled!
>
> Note /var is a subdirectory of / on our system and all appears
> fine if I boot to single user from the cdrom and poke around.
>
> Help!
>
> Jim

-- 
Love is like the ozone layer,         |Jim Craven craven@cg.NRCan.gc.ca|
   You don't miss it until it's gone. | Geological Survey of Canada    |
        ---Frank Drebbin, Police Squad| 615 Booth St., Rm 211, Ottawa  |
--------------------------------------| K1A 0E9 (613) 996-9935---------|



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:25 CDT