Operating System - HP-UX
1836629 Members
2085 Online
110102 Solutions
New Discussion

Re: adb command under hp-ux 11.23

 
SOLVED
Go to solution
Daniel M. Gonzales
Frequent Advisor

adb command under hp-ux 11.23

We used to run the following command on hp-ux 11.11 to give us the boot device...

echo "bootdev/X" | adb /stand/vmunix /dev/kmem

Now when I run the command on 11.23 (PA-RISC), I don't get a device that matches anything under /dev/dsk and when I run the command on 11.23 (Itanium) I get the following error...

adb: warning: Unrecognized format character -'X'.

Any ideas? Thanks.
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: adb command under hp-ux 11.23

Hi Daniel:

For determining the disk that you booted from use:

# echo boot_string/S|adb /stand/vmunix /dev/mem

I don't have 11.23 to see if this still works there, though.

'adb' has undergone some extensive changes. There is a "compatability" mode option ('-o') that provides PA-RISC backward compatabiltity, too. See the 11.23 manpages for more information.

Regards!

...JRF...
Sandman!
Honored Contributor
Solution

Re: adb command under hp-ux 11.23

As stated above, the command you are using will work only on 10.x and 11.x systems. On Itanium as well as on PA-RISC systems use:

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

The "-o" is for compatibility between PA-RISC and IPF. The above syntax can be used on both platforms as the "-o" switch is the default on PA-RISC platforms

cheers!
Daniel M. Gonzales
Frequent Advisor

Re: adb command under hp-ux 11.23

Thanks Sandman. The "-o" option is just what I needed...now my old command works! Note: the boot device returned under 11.23 is now 10 characters, not 8. Had to adjust my script.

Re: adb command under hp-ux 11.23

There are two other alternatives:

Alternative 1
-------------
Use the new syntax.

echo "bootdev/x"|adb -n /stand/vmunix /dev/kmem

or to print a 64-bit value

echo "bootdev/jx"|adb -n /stand/vmunix /dev/kmem

On Itanium "-n" is the default.

Alternative 2
-------------
Add the following line in your $HOME/.adbrc file:

$a backcompat 1

This will ensure backward compatible behavior without using -o. Now you can use:

echo "bootdev/X" | adb /stand/vmunix /dev/kmem

To get the new behavior by default use:

$a backcompat 0
With God, all things are possible
Daniel M. Gonzales
Frequent Advisor

Re: adb command under hp-ux 11.23

That option works too. Thanks!