Read more
- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - HP-UX
- >
- System Administration
- >
- How to see the disk booted from. or the boot disk ...
-
-
Categories
- Topics
- Hybrid IT with Cloud
- Mobile & IoT
- IT for Data & Analytics
- Transformation
- Strategy and Technology
- Products
- Cloud
- Integrated Systems
- Networking
- Servers and Operating Systems
- Services
- Storage
- Company
- Events
- Partner Solutions and Certifications
- Welcome
- Welcome
- Announcements
- Tips and Tricks
- Feedback
-
Blogs
- Alliances
- Around the Storage Block
- Behind the scenes @ Labs
- Converged Data Center Infrastructure
- Digital Transformation
- Grounded in the Cloud
- HPE Careers
- HPE Storage Tech Insiders
- Infrastructure Insights
- Inspiring Progress
- Internet of Things (IoT)
- My Learning Certification
- Networking
- OEM Solutions
- Servers: The Right Compute
- Telecom IQ
- Transforming IT
-
Quick Links
- Community
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Contact
- Email us
- Tell us what you think
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Enterprise.nxt
- Marketplace
- Aruba Airheads Community
-
Categories
-
Forums
-
Blogs
-
InformationEnglish
How to see the disk booted from. or the boot disk is in use currently. ?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-02-2013 12:21 PM
05-02-2013 12:21 PM
How to see the disk booted from. or the boot disk is in use currently. ?
How to see the disk booted from. or the boot disk is in use currently. ?
EXperts,
How to check which boott disk is system booted from in a mirrored disk environment . in 11.31 hp-ux.
In 11.23 there is a command :
echo "boot_string/S" |adb /stand/vmunix /dev/mem
Is there anything in hp-ux 11.31 to figure this out, which boot_disk system currently booted from & using.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-02-2013 12:45 PM - edited 05-02-2013 01:02 PM
05-02-2013 12:45 PM - edited 05-02-2013 01:02 PM
Re: How to see the disk booted from. or the boot disk is in use currently. ?
Re: How to see the disk booted from. or the boot disk is in use currently. ?
From syslog:
$ grep -i "boot device" /var/adm/syslog/syslog.log
Feb 8 14:03:15 td193 vmunix: Boot device's HP-UX HW path is: 0.4.1.0.5000c500021780bd.0
$ /usr/sbin/setboot
Primary bootpath : 0/4/1/0.0x5000c500021780bd.0x0 (/dev/rdisk/disk5)
This tells you the boot device used: /dev/rdisk/disk5
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-02-2013 01:42 PM
05-02-2013 01:42 PM
Re: How to see the disk booted from. or the boot disk is in use currently. ?
Re: How to see the disk booted from. or the boot disk is in use currently. ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-02-2013 11:24 PM
05-02-2013 11:24 PM
Re: How to see the disk booted from. or the boot disk is in use currently. ?
Re: How to see the disk booted from. or the boot disk is in use currently. ?
Even if you rotate the logs, you still have them, right?
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-03-2013 04:31 AM - edited 05-05-2013 05:28 PM
05-03-2013 04:31 AM - edited 05-05-2013 05:28 PM
Re: How to see the disk booted from. or the boot disk is in use currently. ?
Re: How to see the disk booted from. or the boot disk is in use currently. ?
The classic methods are just not reliable...
-- dmesg (limited buffer, boot message rolls off the top)
-- syslog (log truncation may lose the info, syslog.conf may redirect to another file, etc)
-- setboot (shows what is desired but is not a log...the system may have been manually booted)
So the only dependable way is to ask the current kernel. Unfortunately, there have been several changes from the classic methods that worked back in 10.01 through 11.11. Here are the steps (snipped from the attached bootinfo.sh script):
MYREV=$(uname -r | cut -d. -f 2-3 | tr -d .) echo "bootstring using adb:" echo " Last booted using \c" # boot string not available for 11.23 and higher -- returns device minor number only # ie, 0x1f010000 (PARISC) or 0x3000003 (IA) # For 11.31, is the minor # for DSF device -- use ioscan to find CTD if [[ $MYREV -gt 1111 ]] ## new adb for 11.2x and higher then BOOTCODE=$(echo "bootdev/x" | adb -n /stand/vmunix /dev/kmem | tail -1 | tr -d " ") BOOTSTRING=$(echo $BOOTCODE | cut -dx -f2) LEN=${#BOOTSTRING} BOOTMINOR=$(echo "$BOOTSTRING" | cut -c $(($LEN-5))-) DISKDEVS=$(ll /dev/dsk | grep "0x$BOOTMINOR" | grep -v '.pt' | awk '{print $NF}') # for 11.31, minor is for the /dev/disk device file if [ $MYREV -ge 1131 ] then DISKDEVS=$(ll /dev/disk |
grep "0x$BOOTMINOR" |
head -1 |
awk '{print $NF}' |
cut -f1 -d_) DISKCTD=$(ioscan -m dsf /dev/disk/$DISKDEVS |
tail -1 | awk '{print $NF}') DISKDEVS="$DISKDEVS or $(ioscan -m dsf /dev/disk/$DISKDEVS | tail -1 | awk '{print $NF}' | awk -F / '{print $NF}' )" fi echo "$BOOTCODE ($DISKDEVS)" else # tabs supplied by adb echo "boot_string/S" | adb -k /stand/vmunix /dev/kmem | tail -1 | tr -d '[:blank:]' | cut -d: -f2- # drop "boot_string:" fi
The differences are:
-- adb options for 11.23 and higher
-- the bootstring is now an ID with the minor number for the /dev/disk devices
-- the matching minor number may show devname and devname.pt
Here's a sample output from the attached bootinfo script:
# bootinfo bootstring using adb: Last booted using 0x100001c (disk41 or c0t1d0) Boot disks and AUTO file boot command: /dev/disk/disk5_p2 BootCommand: "boot vmunix -lq" /dev/disk/disk41_p2 BootCommand: "boot vmunix -lq" boot PATHS: Primary bootpath = 0/1/1/0.0.0.1.0, /dev/rdsk/c0t1d0 = 0/1/1/0.0x5000c5000abec39d.0x0, /dev/rdisk/disk41 = (disk) 64000/0xfa00/0x13 Alternate bootpath = 0/1/1/0.0.0.2.0, /dev/rdsk/c0t2d0 = 0/1/1/0.0x5000c50007153089.0x0, /dev/rdisk/disk5 = (disk) 64000/0xfa00/0x12 HA Alt bootpath = 0/1/1/0.0.0.1.0, /dev/rdsk/c0t1d0 = 0/1/1/0.0x5000c5000abec39d.0x0, /dev/rdisk/disk41 = (disk) 64000/0xfa00/0x13 Automatic boot settings from setboot: Autoboot is ON (enabled) lvlnboot -v: Boot Definitions for Volume Group /dev/vg00: Physical Volumes belonging in Root Volume Group: /dev/disk/disk5_p2 -- Boot Disk /dev/disk/disk41_p2 -- Boot Disk Boot: lvol1 on: /dev/disk/disk5_p2 /dev/disk/disk41_p2 Root: lvol3 on: /dev/disk/disk5_p2 /dev/disk/disk41_p2 Swap: lvol2 on: /dev/disk/disk5_p2 /dev/disk/disk41_p2 Dump: lvol2 on: /dev/disk/disk5_p2, 0
This script runs on version 10 and all versions of 11 up to 11.31, PARISC or IA64.
Bill Hassell, sysadmin
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2018 Hewlett Packard Enterprise Development LP