System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

alternate boot disk fails, /stand/vmunix: cannot open, or not executable

unx_wrks
Advisor

alternate boot disk fails, /stand/vmunix: cannot open, or not executable

Setting up alternate boot (non-mirrored) with a very basic script. Excerpts:

mkboot /dev/rdsk/$altboot
mkboot -a "hpux -lq" /dev/rdsk/$altboot
lvlnboot -b /dev/vgaltboot/lvstand
lvlnboot -r /dev/vgaltboot/lvroot
lvlnboot -s /dev/vgaltboot/lvswapA
lvlnboot -d /dev/vgaltboot/lvswapA

After this, volumes are newfs'd, and data cpio'd from the boot disk.

At the end, after umounting,


lvlnboot -R /dev/vgaltboot
lvlnboot -v /dev/vgaltboot
output from the -v:

Boot Definitions for Volume Group /dev/vgaltboot:
Physical Volumes belonging in Root Volume Group:
        /dev/dsk/c1t6d0 (0/0/2/0.6.0) -- Boot Disk
Boot: lvstand   on:     /dev/dsk/c1t6d0
Root: lvroot    on:     /dev/dsk/c1t6d0
Swap: lvswapA   on:     /dev/dsk/c1t6d0
Dump: lvswapA   on:     /dev/dsk/c1t6d0, 0

---------------------------------

During boot:

Boot
: disk(0/0/2/0.6.0.0.0.0.0;0)/stand/vmunix
disk(0/0/2/0.6.0.0.0.0.0;0)/stand/vmunix: cannot open, or not executable

 

 

P.S. this thread has been moved from Servers > HP 9000 to HP-UX > sysadmin - HP Forum Moderator

 

 

 

4 REPLIES
unx_wrks
Advisor

Re: alternate boot disk fails, /stand/vmunix: cannot open, or not executable

Add'l info:

Main Menu: Enter command or menu >SEA IPL

Searching for device(s) with bootable media
This may take several minutes.

To discontinue search, press any key (termination may not be immediate).


   Path#  Device Path (dec)  Device Path (mnem)  Device Type and Utilities
   -----  -----------------  ------------------  -------------------------
   P0     0/0/2/0.6          intscsia.6          Random access media
                                                   IPL
   P1     0/0/2/1.6          intscsib.6          Random access media
                                                   IPL



Robert_Jewell
Honored Contributor

Re: alternate boot disk fails, /stand/vmunix: cannot open, or not executable

As the error message indicates, the kernel, vmunix, cannot be found.  I also dont see where you configured the physical volume as a boot disk (by using pvcreate -B).

 

I would advise that you utilize LVM mirroring (a licensed product), HP's DRD functionality (11i v2 and up) or Ignite/UX (free and available for all OS's).

 

Using cpio is certainly possible if that is your wish.  See the following post for more details on how to get it done:

 

http://h30499.www3.hp.com/t5/General/Mirror-Without-Mirrorisk-UX/m-p/2774858

 

 

-Bob

 

----------------
Was this helpful? Like this post by giving me a thumbs up below!
unx_wrks
Advisor

Re: alternate boot disk fails, /stand/vmunix: cannot open, or not executable

re: the pvcreate command. this is at the beginning of the script:

pvcreate -fB /dev/rdsk/$altboot

$altboot is set to c1t6d0.

 

 

 

unx_wrks
Advisor

Re: alternate boot disk fails, /stand/vmunix: cannot open, or not executable

Actually, in order to save time, I've posted the full script I used to create the vg. below that is the one I use to dump.

There's a bit of duplicate work, since the 2nd one is used for weekly dumps.

#!/bin/ksh
export PATH=$PATH:/usr/bin:/usr/sbin:/sbin:/etc
ERCHECK()
{
if [ $? -ne 0 ]
then
 echo ""$1" failed"
 read nada < /dev/tty
fi
}

altboot=c1t6d0
vgdisplay vgaltboot
if [ $? -ne 0 ]
then
 if [ ! -d /dev/vgaltboot ]
 then
  mkdir -p /dev/vgaltboot
  ERCHECK "mkdir -p /dev/vgaltboot "
 fi
 if [ ! -c /dev/vgaltboot/group ]
 then
  mknod /dev/vgaltboot/group c 64 0x020000
  ERCHECK "mknod /dev/vgaltboot/group c 64 0x020000"
 fi
 pvcreate -fB /dev/rdsk/$altboot
 ERCHECK "pvcreate -fB /dev/rdsk/$altboot"
 mkboot /dev/rdsk/$altboot
 ERCHECK "mkboot /dev/rdsk/$altboot"
 mkboot -a "hpux -Lq" /dev/rdsk/$altboot
 ERCHECK "mkboot -a "hpux -Lq" /dev/rdsk/$altboot"
 vgcreate -p 8 -e 9600 -s 8 /dev/vgaltboot /dev/dsk/$altboot
fi
ERCHECK "vgcreate -p 8 -e 9600 -s 8 /dev/vgaltboot /dev/dsk/$altboot"
lvcreate -L 259 -C y -r n -n lvstand /dev/vgaltboot
ERCHECK "lvcreate -L 259 -C y -r n -n lvstand /dev/vgaltboot"
newfs -F hfs /dev/vgaltboot/rlvstand
ERCHECK "newfs -F hfs /dev/vgaltboot/rlvstand "
lvcreate -L 4096 -C y -r n -n lvswapA /dev/vgaltboot
ERCHECK "lvcreate -L 4096 -C y -r n -n lvswapA /dev/vgaltboot"
lvcreate -L 200 -C y -r n -n lvroot /dev/vgaltboot
ERCHECK "lvcreate -L 200 -C y -r n -n lvroot /dev/vgaltboot"
newfs -F vxfs /dev/vgaltboot/rlvroot
ERCHECK "newfs -F vxfs /dev/vgaltboot/rlvroot "
lvcreate -L 20 -n lvhome /dev/vgaltboot
ERCHECK "lvcreate -L 24 -n lvhome /dev/vgaltboot"
newfs -F vxfs   /dev/vgaltboot/rlvhome
ERCHECK "newfs -F vxfs   /dev/vgaltboot/rlvhome "
lvcreate -L 1310 -n lvopt /dev/vgaltboot
ERCHECK "lvcreate -L 1310 -n lvopt /dev/vgaltboot"
newfs -F vxfs  /dev/vgaltboot/rlvopt
ERCHECK "newfs -F vxfs  /dev/vgaltboot/rlvopt"
lvcreate  -L 5883 -n lvvar /dev/vgaltboot
ERCHECK "lvcreate  -L 5420 -n lvvar /dev/vgaltboot"
newfs -F vxfs  /dev/vgaltboot/rlvvar
ERCHECK "newfs -F vxfs  /dev/vgaltboot/rlvvar "
lvcreate  -L 1213 -n lvusr /dev/vgaltboot
ERCHECK "lvcreate  -L 1213 -n lvusr /dev/vgaltboot"
newfs  -F vxfs  /dev/vgaltboot/rlvusr
ERCHECK "newfs  -F vxfs  /dev/vgaltboot/rlvusr"
lvcreate  -L 198 -n lvtmp /dev/vgaltboot
ERCHECK "lvcreate  -L 198 -n lvtmp /dev/vgaltboot"
newfs -F vxfs  /dev/vgaltboot/rlvtmp
ERCHECK "newfs -F vxfs  /dev/vgaltboot/rlvtmp"

--------------------------------------------------------------------------

--------------------------------------------------------------------------

#!/bin/ksh
export PATH=/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/upgrade/bin:/opt/fcms/bin:/opt/pd/bin:/opt/resmon/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/graphics/common/bin:/opt/gnome/bin:/opt/mozilla:/usr/sbin/diag/contrib:/sbin:/home/root
odir=/scripts
dt=`date +%b%d_%T`
ofile="${odir}"/abdump.$dt
vg=vgaltboot
altboot=c1t6d0
TLOG()
{
echo "${1}" | tee -a $ofile
}
vgdisplay -v $vg |grep -q /dev/dsk/$altboot
if [ $? -ne 0 ]
then
 TLOG "WARNING! This script has $altboot set as the altboot disk"
 TLOG "but vgdisplay doesn't show disk $altboot in the vg"
 TLOG "vgdisplay -v $vg |tail "
 vgdisplay -v $vg |tail |tee -a $ofile
 echo " "
 echo " Exiting."
 exit
fi
ERCHECK()
{
if [ $? -ne 0 ]
then
 echo "$1 FAILED"
 read nada < /dev/tty
fi
}
TLOG "Doing mkboot /dev/rdsk/$altboot"
mkboot /dev/rdsk/$altboot
ERCHECK "mkboot /dev/rdsk/$altboot"
TLOG "Doing mkboot -a \"hpux -lq\" /dev/rdsk/$altboot"
mkboot -a "hpux -lq" /dev/rdsk/$altboot
ERCHECK "mkboot -a "hpux -lq" /dev/rdsk/$altboot"
#TLOG "Doing  mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p LABEL /dev/dsk/$altboot"
#mkboot -b /usr/sbin/diag/lif/updatediaglif2 -p ISL -p AUTO -p HPUX -p LABEL /dev/dsk/$altboot
df -kP |grep vgaltboot
if [ $? -eq 0 ]
then
 TLOG "WARNING! vgaltboot fs already mounted. Exiting."
 exit
fi
TLOG "Doing newfs -F hfs -o largefiles /dev/vgaltboot/rlvstand"
newfs -F hfs -o largefiles /dev/vgaltboot/rlvstand
for i in root opt usr var tmp home
do
 TLOG "Doing newfs -F vxfs -o largefiles /dev/vgaltboot/rlv$i"
 newfs -F vxfs -o largefiles /dev/vgaltboot/rlv$i
 if [ $? -ne 0 ]
 then
  errnewfs=y
 fi
done
if [ "{$errnewfs}" = y ]
then
 TLOG "WARNING! ERROR in newfs"
 exit
fi
TLOG "Doing lvlnboot -b /dev/vgaltboot/lvstand"
lvlnboot -b /dev/vgaltboot/lvstand
ERCHECK "lvlnboot -b /dev/vgaltboot/lvstand"
TLOG "Doing lvlnboot -r /dev/vgaltboot/lvroot"
lvlnboot -r /dev/vgaltboot/lvroot
ERCHECK "lvlnboot -r /dev/vgaltboot/lvroot"
TLOG "Doing lvlnboot -s /dev/vgaltboot/lvswapA"
lvlnboot -s /dev/vgaltboot/lvswapA
ERCHECK "lvlnboot -s /dev/vgaltboot/lvswapA"
TLOG "Doing lvlnboot -d /dev/vgaltboot/lvswapA"
lvlnboot -d /dev/vgaltboot/lvswapA
ERCHECK "lvlnboot -d /dev/vgaltboot/lvswapA"
TLOG "Doing mount /dev/vgaltboot/lvroot /broot"
mount /dev/vgaltboot/lvroot /broot
[ $? -ne 0 ] && err=y
TLOG "Doing mount /dev/vgaltboot/lvstand /bstand"
mount /dev/vgaltboot/lvstand /bstand
[ $? -ne 0 ] && err=y
TLOG "Doing mount /dev/vgaltboot/lvhome /bhome"
mount /dev/vgaltboot/lvhome /bhome
[ $? -ne 0 ] && err=y
TLOG "Doing mount /dev/vgaltboot/lvopt /bopt"
mount /dev/vgaltboot/lvopt /bopt
[ $? -ne 0 ] && err=y
TLOG "Doing mount /dev/vgaltboot/lvtmp /btmp"
mount /dev/vgaltboot/lvtmp /btmp
[ $? -ne 0 ] && err=y
TLOG "Doing mount /dev/vgaltboot/lvusr /busr"
mount /dev/vgaltboot/lvusr /busr
[ $? -ne 0 ] && err=y
TLOG "Doing mount /dev/vgaltboot/lvvar /bvar"
mount /dev/vgaltboot/lvvar /bvar
[ $? -ne 0 ] && err=y
if [ "${err}" = y ]
then
 TLOG "WARNING! ERROR mounting"
 TLOG "Press return to continue"
 read nada < /dev/tty
fi
backup()
{
cd $1
TLOG "Doing $1 find . -xdev -print |cpio -pdmx $2 2> /dev/null"
find . -xdev -print |cpio -pdmx $2 2> /dev/null
cd /
}
backup / /broot
backup /stand /bstand
backup /home /bhome
backup /opt /bopt
backup /tmp /btmp
backup /usr /busr
backup /var /bvar
TLOG "Copying fstab into place"
cp /etc/fstab.broot /broot/etc/fstab
if [ -f /bstand/bootconf.broot ]
then
 grep /dev/dsk/$altboot /bstand/bootconf.broot
 if [ $? -eq 0 ]
 then
  TLOG "Copying /bstand/bootconf.broot to /bstand/bootconf"
  cp /bstand/bootconf.broot /bstand/bootconf
 else
  makeit=y
 fi
else
 makeit=y
fi
if [ "${makeit}" = y ]
then
 TLOG "/bstand/bootconf.broot not found. creating it with $altboot entry"
 echo "1  /dev/dsk/$altboot" > /stand/bootconf.boot
 cp /stand/bootconf.broot /bstand/bootconf
 cp /stand/bootconf.broot /bstand
fi
if [ -f /broot/sbin/ioinitrc.broot ]
then
 grep  lvlnboot /broot/sbin/ioinitrc.broot |grep $vg
 if [ $? -eq 0 ]
 then
  TLOG "Copying /broot/sbin/ioinitrc.broot to /broot/sbin/ioinitrc"
  cp /broot/sbin/ioinitrc.broot /broot/sbin/ioinitrc
  chmod 555 /broot/sbin/ioinitrc.*
 else
  makeit2=y
 fi
else
 makeit2=y
fi
if [ "${makeit2}" = y ]
then
 TLOG "/broot/sbin/ioinitrc.broot not found. creating it with $vg entry"
sed 's/lvlnboot -c/lvlnboot -c \/dev\/vgaltboot/' /sbin/ioinitrc > /sbin/ioinitrc.broot
 cp /stand/ioinitrc.broot /broot/sbin/ioinitrc
 chmod 555 /broot/sbin/ioinitrc.*
fi


TLOG "Umounting filesystems"
umount /broot
umount /bstand
umount /bhome
umount /bopt
umount /btmp
umount /busr
umount /bvar


TLOG "Doing lvlnboot -R /dev/vgaltboot"
lvlnboot -R /dev/vgaltboot
lvlnboot -v /dev/vgaltboot