Operating System - HP-UX
1846606 Members
1872 Online
110256 Solutions
New Discussion

Re: changing boot disk while within current OS

 
SOLVED
Go to solution

changing boot disk while within current OS

Is there a way I can tell the HP OS to boot a different disk the next time it is booted....without having to change the boot prom??



All i want to do is tell the HP OS that is booted on the PRIMARY path to boot to the SECONDARY path the next time it is booted.


Thanx for the help.
Hey
5 REPLIES 5
John Palmer
Honored Contributor
Solution

Re: changing boot disk while within current OS

setboot

Regards,
John
S.K. Chan
Honored Contributor

Re: changing boot disk while within current OS

# setboot
===> displays the current boot path

To change ..

# setboot -p

# setboot -a
hpuxrox
Respected Contributor

Re: changing boot disk while within current OS

setboot -p primary -a alternate
Deshpande Prashant
Honored Contributor

Re: changing boot disk while within current OS

Hi
Following is small script I use to change boot sequence on next boot.
##------------------------------
#
# Use this script to change the boot sequence # using setboot command.
#
HP=`hostname`
BOOT_PATH_LOG=/home/system/Logs/${HP}_set_bootlog

exec 2>&1 >>${BOOT_PATH_LOG}
echo "##--------------------------##"
date
echo "#-------- Check boot Paths before change"
setboot

##check pri/alt paths
PRI_PATH=`setboot |grep Pri |awk '{print $4}'`
ALT_PATH=`setboot |grep Alt |awk '{print $4}'`

echo "\nCurrent Primary Path is ${PRI_PATH} "
echo "Current Alternate Path is ${ALT_PATH} "

## Change Primary and Alternate Paths
#set primary path
setboot -p ${ALT_PATH}

#set alternate path
setboot -a ${PRI_PATH}

echo "\n#-- Check boot Paths after change"
setboot
date
echo "##-------------------------##"

##-----

Thanks.
Prashant Deshpande.
Take it as it comes.

Re: changing boot disk while within current OS

Thank you all.


I settled for the script.


Thanx again.
Hey