Operating System - HP-UX
1829378 Members
5112 Online
109991 Solutions
New Discussion

Re: How to get the boot string in HP-UX 11.23 ?

 
SOLVED
Go to solution
Jdamian
Respected Contributor

How to get the boot string in HP-UX 11.23 ?

Hi

For HP-UX 11.00 and 11.11 I used run the following command to locate the boot disk and kernel path:

echo "boot_string/S" | adb -k /stand/vmunix /dev/kmem

But "boot_string/S" doesn't seem to be a valid command for adb in HP-UX 11.23

Do you know the right way to get that ?

Thanx in advance
19 REPLIES 19
James R. Ferguson
Acclaimed Contributor
Solution

Re: How to get the boot string in HP-UX 11.23 ?

Hi:

'adb' has undergone some changes in 11.23. You can get backward compatability with '-o':

# echo 'boot_string/S' | adb -o /stand/vmunix /dev/mem

See the manpages for 'adb':

http://docs.hp.com/en/B2355-60105/adb.1.html

Regards!

...JRF...
Lolupee
Regular Advisor

Re: How to get the boot string in HP-UX 11.23 ?

# efi_cp -d /dev/rdsk/ -u /EFI/HPUX/AUTO /tmp/AUTO.boot

# cat /tmp/AUTO.boot

The command would extract the boot string from /EFI/HPUX/AUTO in readable format and apend it in /tmp/AUTO.boot file for you to browse.
Geoff Wild
Honored Contributor

Re: How to get the boot string in HP-UX 11.23 ?

How about:

lvlnboot -v

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Sandman!
Honored Contributor

Re: How to get the boot string in HP-UX 11.23 ?

Oscar,

Try the following...

# echo 'boot_string/S' | adb -o /stand/vmunix /dev/mem

cheers!
Jdamian
Respected Contributor

Re: How to get the boot string in HP-UX 11.23 ?

Hi

The following lines are the output of command line in HP-UX 11.11

# echo boot_string/S | adb /stand/vmunix /dev/kmem
boot_string:
boot_string: disk(0/0/1/1.2.0.0.0.0.0;0)/stand/vmunix

but in HP-UX 11.23, it displays:

boot_string:
(;)/stand/vmunix


No info about device type and hardware path is shown.

On the other hand, boot process logs the boot device in syslog:

vmunix: Boot device's HP-UX HW path is: 0/1/1/0.1.0


But this info can be removed (deliberately or inadvertently). Thus I need a sure method to get that info.

My interest of this issue is due that I had to recover my system from a pre-patched image (splitted mirror volumes) because kernel recompilation failed in a patch installation.
That failed kernel recompilation was due that kernel image resided in the splitted LVOL1, i.e., system booted from alternate path (I didn't know this detail) then splitted mirrors (kernel image was) and tried to install patches (--> recompile kernel).
Geoff Wild
Honored Contributor

Re: How to get the boot string in HP-UX 11.23 ?

Just want to clear one thing - are you running 11.23 on ia64 or parisc?

On parisc with 11.23 I get:

# echo boot_string/S | adb /stand/vmunix /dev/kmem
boot_string:
boot_string:
disk(0/1/1/0.0.0.0.0.0.0;0)/stand/vmunix


On ia64:

# echo boot_string/S | adb -o /stand/vmunix /dev/kmem
boot_string:
boot_string:
(;)/stand/vmunix


# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c3t2d0s2 (0/1/1/1.2.0) -- Boot Disk
/dev/dsk/c2t1d0s2 (0/1/1/0.1.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c3t2d0s2
/dev/dsk/c2t1d0s2
Root: lvol3 on: /dev/dsk/c3t2d0s2
/dev/dsk/c2t1d0s2
Swap: lvol2 on: /dev/dsk/c3t2d0s2
/dev/dsk/c2t1d0s2
Dump: lvol2 on: /dev/dsk/c3t2d0s2, 0


So, with (;)/stand/vmunix coming after the 2nd boot_string: in the adb command, I'd say my ia64 system booted off of /dev/dsk/c2t1d0s2 (0/1/1/0.1.0)

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Muthukumar_5
Honored Contributor

Re: How to get the boot string in HP-UX 11.23 ?

May be you can try as,

awk '{ print $2 }' /stand/bootconf | xargs ioscan | tail -1 | awk '{ print $1 }'

It will give that disk string.

--
Muthu
Easy to suggest when don't know about the problem!
Geoff Wild
Honored Contributor

Re: How to get the boot string in HP-UX 11.23 ?

Muthu - nope - as bootconf contains both disks:

# cat /stand/bootconf
l /dev/dsk/c3t2d0s2
2 /dev/dsk/c2t1d0s2


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Muthukumar_5
Honored Contributor

Re: How to get the boot string in HP-UX 11.23 ?

File /stand/bootconf is having boot disk information. You can use that to get boot string information with ioscan H/W Path.

Try to change the format of adb. May give informations. 11.23 and 11.11 will differ on adb usage.

--
Muthu

Easy to suggest when don't know about the problem!
Arunvijai_4
Honored Contributor

Re: How to get the boot string in HP-UX 11.23 ?

# echo boot_string/S | adb /stand/vmunix /dev/kmem
boot_string:
adb: warning: Unrecognized format character - 'S'

What could be the Option ?

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Geoff Wild
Honored Contributor

Re: How to get the boot string in HP-UX 11.23 ?

Ah...seems on ia64 - use lowercase:

# echo 'boot_string/s' | adb /stand/vmunix /dev/kmem
boot_string:
(;)/stand/vmunix


Which means we still don't know for sure which disk booted the kernel....

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Arunvijai_4
Honored Contributor

Re: How to get the boot string in HP-UX 11.23 ?

# echo 'boot_string/s' | adb /stand/vmunix /dev/kmem
boot_string:
(;)/stand/vmunix

It still some empy, where as 11.11,

HP11.11:>echo boot_string/S | adb /stand/vmunix /dev/kmem
boot_string:
boot_string: disk(0/1/1/0.0.0.0.0.0.0;0)/stand/vmunix
HP11.11:>

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Jdamian
Respected Contributor

Re: How to get the boot string in HP-UX 11.23 ?

My box is HP-UX 11.23 IA64, not PA-RISC.

/stand/bootconf is not useful.

# cat /stand/bootconf
l /dev/dsk/c2t1d0s2
l /dev/dsk/c2t0d0s2

It contains devices suitable for boot the system, not the device used for last boot.
Devender Khatana
Honored Contributor

Re: How to get the boot string in HP-UX 11.23 ?

Hi,
On HPUx 11.23
# echo "bootdev/x"|adb -n /stand/vmunix /dev/kmem
bootdev:
0x1f020002
# ll /dev/dsk
total 0
brw-r----- 1 bin sys 31 0x020000 Oct 8 2004 c2t0d0
brw-r----- 1 bin sys 31 0x020001 Oct 8 2004 c2t0d0s1
brw-r----- 1 bin sys 31 0x020002 Oct 8 2004 c2t0d0s2------------->>
brw-r----- 1 bin sys 31 0x020003 Oct 8 2004 c2t0d0s3
brw-r----- 1 bin sys 31 0x031000 Oct 13 2004 c3t1d0
brw-r----- 1 bin sys 31 0x034000 Oct 13 2004 c3t4d0
#

And the thread is here
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=993945

HTH,
Devender
Impossible itself mentions "I m possible"
Simon Wickham_6
Regular Advisor

Re: How to get the boot string in HP-UX 11.23 ?

Hi,
As stated you can see this information with the commands stated but confirm boot areas in the BDRA are mirrored correctly by examining output from:

lvlnboot â v

Regards,
Simon
Simon Wickham_6
Regular Advisor

Re: How to get the boot string in HP-UX 11.23 ?

Hi,

Should read lvlnboot â v.

Regards,
Simon
Darrel Louis
Honored Contributor

Re: How to get the boot string in HP-UX 11.23 ?

Oscar,

What does lifcp say, is this still valid for 11.23:
lifcp /dev/dsk/c2t1d0s2:AUTO -

Darrel
Geoff Wild
Honored Contributor

Re: How to get the boot string in HP-UX 11.23 ?

Devender has it!

root@sha1 [ /home/gwild ]
# echo "bootdev/x"|adb -n /stand/vmunix /dev/kmem
bootdev:
0x1f032002

root@sha1 [ /home/gwild ]
# ll /dev/dsk |grep 32002
brw-r----- 1 bin sys 31 0x032002 Dec 30 13:35 c3t2d0s2



root@sha1 [ /home/gwild ]
# lvlnboot -v
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c3t2d0s2 (0/1/1/1.2.0) -- Boot Disk
/dev/dsk/c2t1d0s2 (0/1/1/0.1.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c3t2d0s2
/dev/dsk/c2t1d0s2
Root: lvol3 on: /dev/dsk/c3t2d0s2
/dev/dsk/c2t1d0s2
Swap: lvol2 on: /dev/dsk/c3t2d0s2
/dev/dsk/c2t1d0s2
Dump: lvol2 on: /dev/dsk/c3t2d0s2, 0


Now I wonder if the first disk in the lvlnboot -v display is always the one booted from?

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Jdamian
Respected Contributor

Re: How to get the boot string in HP-UX 11.23 ?

thanx