Operating System - HP-UX
1844208 Members
2737 Online
110229 Solutions
New Discussion

which disk i booted from?

 
SOLVED
Go to solution
Sunil Kumar K.U.
Frequent Advisor

which disk i booted from?

Hello all,

I had a practical situation where I booted an HP9000 server which has got mirrored root disk. Both the disks are fine an I can boot from either of the disks. Now the question is how do I know from which disk I booted from, at a later time? Is the address of the disk from which the server booted last time is stored somewhere? Or is there a way to find out this disk address once the machine is up?
Thanks in advance for the replies...

Thanks/Regards
Sunil Kumar K.U.
9 REPLIES 9
Tom Geudens
Honored Contributor

Re: which disk i booted from?

Hi,
#setboot
should give you that information.

Hope this helps,
Tom Geudens
A life ? Cool ! Where can I download one of those from ?
Sunil Kumar K.U.
Frequent Advisor

Re: which disk i booted from?

Hi Tom,

Your suggestion is fine. setboot gives me the boot paths. But I may not be booting from the primary path.
For eg: I booted the machine from the alternate path by interrupting the autoboot process and later on (say after some months) I wanted to know where did I boot the server last time.

Is there any way to find out this?

Thankds/Regards
Sunil Kumar K.U.
Steven Sim Kok Leong
Honored Contributor

Re: which disk i booted from?

Hi,

I don't think there is a way for read-only media. If you boot from a read-only media (such as a CD-ROM), there is no way this information can be stored except perhaps at the hardware level in the OBP. However, I have not seen a logging option at the OBP menu (perhaps service menu).

If you boot from a writeable media, the timestamp of your bootup will be imprinted in /var/adm/syslog/syslog.log. If your choices of booting up the system lie with only harddisks, then one way you can identify the disk you boot from is to boot up each ov every alternate disk path, and subsequently check the timestamp imprinted in the first line of /var/adm/syslog/OLDsyslog.log.

Hope this helps. Regards.

Steven Sim Kok Leong
Robin Wakefield
Honored Contributor
Solution

Re: which disk i booted from?

Hi,

Try this:

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

This should return, for example:

boot_string:
boot_string: disc(10/0.6.0;0)/stand/vmunix

Rgds, Robin.
Animesh Chakraborty
Honored Contributor

Re: which disk i booted from?

Hi,
Setboot only shows what the boot path is set to, it doest not show you what you actually botted from. Eg. setboot shows the primary disk (usually 10/0.6) but you may have booted from the recovery CD or an ignite tape. This command shows you what you booted from;

echo boot_string/S|adb /stand/vmunix /dev/kmem
Did you take a backup?
Sunil Kumar K.U.
Frequent Advisor

Re: which disk i booted from?

Hello all,

Thanks for the quick response. I found the solution in the replies from Robin and Animesh.
I thank everybody who replied to my query.

Thanks/regards
Sunil Kumar K.U.
Steven Sim Kok Leong
Honored Contributor

Re: which disk i booted from?

Hi,

If you boot from disk A and the next time you boot from disk B, and since disk A contains its own kernel (say kernelA in its own /stand/vmunix in disk A) and disk B contains its own kernel (say kernelB in its own /stand/vmunix in disk B), it doesn't help by extracting the bootstring from /stand/vmunix because it belongs to your currently live OS (say on disk A). It will not indicate to you that you have booted from disk B the last time before you booted from disk A into your currently live OS this time.

Hope this helps. Regards.

Steven Sim Kok Leong
Donald Kok
Respected Contributor

Re: which disk i booted from?

Hi Steven,

A bit late, but....

The disks are mirrored, so the kernel of disk A and disk B should be the same IMHO.

Greetzz
Donald
My systems are 100% Murphy Compliant. Guaranteed!!!
Varghese Mathew
Trusted Contributor

Re: which disk i booted from?

Steven,

HP's Mirroring software keeps both DISK A and DISK B synch'd at all time, and there won't be any inconsistencies in that, including no chances for two different kernels or so.

Cheers !!!
Mathew.
Cheers !!!