Identify boot device

Thanks in advance.How can I identify a boot device after the system is up and running? Such as /dev/dsk/c0t0d0s0. Any command, system conf file? What is the most reliable way doing this? Thanks again
[220 byte] By [baldwin] at [2007-11-25 23:36:46]
# 1
Actually, which device the system is boot from? Thanks
baldwin at 2007-7-5 18:20:59 > top of Java-index,General,Talk to the Sysop...
# 2
Peruse the output of the eeprom command.man eeprom for more info.Or look at your /etf/vfstab file and read whichever line mounts the / directory
alan_pae at 2007-7-5 18:20:59 > top of Java-index,General,Talk to the Sysop...
# 3

Thanks, Alan:

EEprom only gives the device type for boot-device, boot-from or diag-device params. I try to find the device name in /dev/dsk/ctds format.

/etc/vfstab have a entry for "/" but the colume for "mount on boot" is usually "no".

So can I use "mount" command? Is it possible the mnttab will be different from vfstab? Thanks

baldwin at 2007-7-5 18:20:59 > top of Java-index,General,Talk to the Sysop...
# 4
I was checking to make you a little script to identify easily your bootdisk, and I found one already done. You can get it at : http://www.brandonhutchinson.com/Miscellaneous_Solaris_notes.html(it's the "prtconf -pv | grep bootpath" section)Enjoy!
y_p at 2007-7-5 18:20:59 > top of Java-index,General,Talk to the Sysop...
# 5

Hi, y_p:

Thanks for this. The problem for this is that prtconf gives the first one in the list and it is not neccessarily the CURRENT boot device. Certainly it is vulnerable for non-activated reconfiguration.

Is it safe to use the device mounted to "/" currently?

Also I found a utility called "lubootdev" from Sun's Live Upgrade product. It seems does the trick. Ho w do u think? THanks

baldwin at 2007-7-5 18:20:59 > top of Java-index,General,Talk to the Sysop...
# 6
U can also do the eeprom and look for the boot-deviceFromPranav Thaker
pvthaker at 2007-7-5 18:20:59 > top of Java-index,General,Talk to the Sysop...
# 7

> Hi, y_p:

>

> Thanks for this. The problem for this is that prtconf

> gives the first one in the list and it is not

> neccessarily the CURRENT boot device.

Which list are you talking about?

I'm not sure what you mean by a *current* boot device. The system may have booted from a particular disk, and root may be currently mounted from one or more disks. They may not be the same.

Do you want the device that did the initial boot, or do you want a device that is currently backing root?

> Certainly it is

> vulnerable for non-activated reconfiguration.

Can you explain that more? I've often used the bootpath value and would like to know how it might be incorrect.

> Is it safe to use the device mounted to "/"

> currently?

Safe for what purpose?

--

Darren

Darren_Dunham at 2007-7-5 18:20:59 > top of Java-index,General,Talk to the Sysop...
# 8

if you use normal block device then just a df -k will do

if you use disk suite, then first do a df -k, then followed by a metastat -p to look at how your os disk is configured

#df -k

Filesystemkbytesusedavail capacity Mounted on

/dev/md/dsk/d020174761 6186559 1378645531%/

/proc 0000%/proc

mnttab 0000%/etc/mnttab

fd 0000%/dev/fd

swap22573008168 225728401%/var/run

swap22573168328 225728401%/tmp

# metastat -p

d4 -m d14 d24 1

d14 1 1 c1t0d0s4

d24 1 1 c1t1d0s4

d3 -m d13 d23 1

d13 1 1 c1t0d0s3

d23 1 1 c1t1d0s3

d1 -m d11 d21 1

d11 1 1 c1t0d0s1

d21 1 1 c1t1d0s1

d0 -m d10 d20 1

d10 1 1 c1t0d0s0

d20 1 1 c1t1d0s0

if you use volume manager < ver 4 run the vxdisk list command to see which disks configured as your rootdg

c1t0d0s2slicedrootdiskrootdgonline

c1t1d0s2slicedrootdisk01rootdgonline

c2t3d0s2sliceddatadg03datadgonline

c2t8d0s2sliceddatadg04datadgonline

hope it helps

illegal_operation at 2007-7-5 18:20:59 > top of Java-index,General,Talk to the Sysop...
# 9

I am required to find out the same thing. How do you identify what boot device is prior to boot. What will showup. Or will the system comeup (just check script prior reboot). I think lubootdev does some tricks. I am still trying to get information how it works.

So my goal is -- execute some commands that to ensure the system will boot. If you have 30-40 admins and 3000 servers and people make changes bad/good. You are required to do simple /etc/system change and that requires reboot (you give the ops and say I changed the /etc/system) reboot the server. Now the server does not come up.

iguvenil at 2007-7-5 18:20:59 > top of Java-index,General,Talk to the Sysop...
# 10

> I am required to find out the same thing. How do you

> identify what boot device is prior to boot.

Do you want to know the device that the system last booted from or the one that it will try to boot from in the future?

> What will

> showup. Or will the system comeup (just check script

> prior reboot). I think lubootdev does some tricks. I

> am still trying to get information how it works.

> So my goal is -- execute some commands that to ensure

> the system will boot. If you have 30-40 admins and

> 3000 servers and people make changes bad/good. You

> are required to do simple /etc/system change and that

> requires reboot (you give the ops and say I changed

> the /etc/system) reboot the server. Now the server

> does not come up.

Things like lubootdev and other utilities may change these values between the time that you check and the time that you reboot. So you have to account for that.

You can use 'prtconf -vp' to see the device aliases and you can use 'eeprom' to see the boot settings.

The physical keyswitch or the 'diag-switch?' setting may put the machine into diag mode. If so, it will try to boot from the devices in 'diag-device' in order.

If the machine is not in diag mode, it will try to boot from the devices listed in 'boot-device' in order.

The devices may be listed as either a hardware path or an nvalias. Hardware defined aliases are listed in the 'prtconf -vp' output. Other aliases may be defined at power-on in the 'nvramrc' section.

--

Darren

Darren_Dunham at 2007-7-5 18:20:59 > top of Java-index,General,Talk to the Sysop...