Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

How to find boot disk from HP-UX

Q: I need to document which disk was used to boot the currently running system.

A: This is a bit tricky depending on the version of HP-UX, and whether it is using LVM or the less common choice, VxVM
for disk volume management. Here are the steps:

For LVM disks:

For 11.11 and earlier, use the command:

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


boot_string:
boot_string: disk(0/0/2/0.6.0.0.0.0.0;0)/stand/vmunix

For 11.23, there are different ways for PARISC versus IA64:

PARISC:

# echo "boot_string/S" | adb –o /stand/vmunix /dev/kmem


boot_string:
boot_string: disk(1/0/0/3/0.6.0.0.0.0.0;0)/stand/vmunix

IA64 (Itanium/Integrity):

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


bootdev:
0x100001c

Now to find the actual path, you’ll have to match the 0x100001c value to a minor number in the /dev/disk
directory. Compare only the last 6 digits of the number (00001c) to find the device file. Then by using lssf, you
can decode the hardware path:

# DSK=$(ll /dev/disk | awk '/00001c/{print $NF}')


# echo $DSK
disk11_p2
# HWPATH=$(lssf /dev/disk/$DSK | awk '{print $(NF-1)}')
# echo "$DSK path = $HWPATH"
disk11_p2 path = 64000/0xfa00/0xa

You can use ioscan –m dsf to map agile device file names to legacy (CTD) style.

For VxVM disks

# echo "raw_root/X" | adb -o /stand/vmunix /dev/kmem


raw_root:
raw_root: 0x3000002

This value is the minor number for the disk that was used to boot the current system. The minor number is found
in the /dev/vx/dmp directory. Match just the last 6 digits to find the disk. It will be in legacy format.

# DSK=$(ll /dev/vx/dmp | awk '/000002/{print $NF}')


# echo $DSK
c2t1d0s2
# HWPATH=$(lssf /dev/dsk/$DSK | awk '{print $(NF-1)}')
# echo "$DSK path = $HWPATH"
c2t1d0s2 path = 0/1/1/0.1.0
For completeness, I should mention that 11.31 will report the boot disk path in syslog.log like this:

vmunix: Boot device's HP-UX HW path is: 0/1/1/0.0x1.0x0

However, syslog.log is a catch-all for a lot of items and often needs to be truncated when it grows too large.
As a result, it can’t be relied on to always contain the current boot disk.

You might also like