SUMMARY:Determining boot device?

From: Mossey Fahey <mossey.fahey_at_eei.ericsson.se>
Date: Wed Oct 17 2001 - 12:19:24 EDT
Hi All,
      Many thanks to all who replied (too many to mention)
but all basically told me what I need to know. 

The current boot device path can be determined with 100% 
accuracy from the command

prtconf -vp | grep bootpath 

The output from this command can be easily used to determine
the boot disk name

find /dev/dsk -type l -ls | awk '{print $11,$13}' | \
     egrep "\.\.\/\.\.\/devices$boot_path$"

But a few other interesting points to consider were
mentioned.

Darren Dunham and Jon Andrews correctly pointed that 
option [B] below will not work if the boot-device
parameter from eeprom is aliased.

Darren also pointed out that it is probably safer to
parse the output of the mount command or the /etc/mnttab
rather than trust the /etc/vfstab. This may be corrupted
at the time of reading.

Jon raised a good point that has me wondering. If I am
to save information like the disk name&layout, vertias
info etc. to be used for a future restore, how can I
determine whether I am booted off the mirror or not. 
I think then that I will get a different boot disk
path and name. I will need to check this out some more.

Regards and thanks to all again

Mossey

-- 
Mossey Fahey
TCM Group				Ericsson Systems Expertise Limited
Phone  +353 902 31357			Cornamaddy
Mobile +353 87 2211251			Athlone 			 
Fax    +353 902 31304			Co. Westmeath			
email mossey.fahey@eei.ericsson.se	Ireland


Hi All,
      I wonder if any of you could help me. What I am
looking for is a command(s) that will tell me 
(100% accurate) what the current boot disk eg.
/dev/dsk/c1t0d0s0. There are a few things you should 
know about the sytems I will be querying.

[1] Solaris version 7 or 8

[2] Boot disk may or may not be encapsulated under
    Veritas VM. Therefore /etc/vfstab may or may not 
    tell me.

[3] I will have root authority

[4] The machine will be up to at least single-user mode.

[5] The server(s) may or may not have an A5200 storage array

[6] The servers will boot either off an internal scsi or
    a Netra st130.

My own possible solutions are

[A] If boot disk is not encapsulated, then /etc/vfstab will
    tell me.

[B] eeprom boot-device | nawk -F= '{print $2}' |               \
	find /dev/dsk -type l -ls | nawk '{print $11"@"$13}' | \ 
	sed -e 's| ||g' | egrep "$dev$" | nawk -F\@ '{print $1}'


[C] If the root disk is encapsulated, then the /etc/vfstab will
    always (is this true) have an entry 

    /dev/vx/dsk/rootvol /dev/vx/rdsk/rootvol / ufs 1 no -

    If this is the case, then I can determine the boot disk with
    the rather cumbersome command

    find /etc/vx/reconfig.d -exec grep rootvol {} /dev/null \; |    \
 	grep "#rename" | nawk -F: '{print $2}' | nawk '{print $2}'| \
	egrep 'c[0-9]+t[0-9]+d[0-9]+s[0-9]+'


Is there a simpler way of getting this information or which of (if any)
will always work.

The reason I ask is that I am currently designing a disaster recovery
procedure whereby I will need to be sure of the boot disk.

I will summarise!!!!!!

Regards and thanks

Mossey
Received on Wed Oct 17 17:19:24 2001

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 16:32:33 EDT