• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to identify the boot device (primary and alternate) in Solaris

by admin

In a general production environment you’ll find the OS root disk is mirrored to avoid any single point of failures. Its is important to know how to find the primary and alternate boot device to troubleshoot in some cases. You can either identify the boot device from the OK prompt (in case of a SPARC machine) or when the OS is booted up.


SPARC

Identifying boot device at OK prompt

To identify the boot device at OK prompt :

ok> printenv boot-device

boot-device = rootdisk mirrordisk

Here the primary boot device is set to a device alias, “rootdisk”. The alternate boot device is specified using the devalias mirrordisk. So the system first looks for the disk with alias rootdisk and if its not bootable it goes for the 2nd disk i.e. the mirrordisk. Use the devalias command to see the physical device path for the boot-device:

ok> devalias screen /pci@1f,0/SUNW,m64B@13
net /pci@1f,0/network@c,1
cdrom2 /pci@1f,0/ide@d/cdrom@2,0:f
cdrom1 /pci@1f,0/ide@d/cdrom@1,0:f
cdrom /pci@1f,0/ide@d/cdrom@1,0:f
rootdisk /pci@1f,0/ide@d/disk@0,0                 -- the physical path to the 'rootdisk' alias
mirrordisk /pci@1f,0/ide@d/disk@3,0               -- the physical path to the 'mirrordisk' alias
disk2 /pci@1f,0/ide@d/disk@2,0
disk1 /pci@1f,0/ide@d/disk@1,0
disk0 /pci@1f,0/ide@d/disk@0,0
ide /pci@1f,0/ide@d
floppy /pci@1f,0/isa@7/dma/floppy
ttyb /pci@1f,0/isa@7/serial@0,2e8
ttya /pci@1f,0/isa@7/serial@0,3f8
name aliases

Note : Here the physical device is rootdisk /pci@1f,0/ide@d/disk@0,0. In case if boot-device is set wrong, we can either boot from CDROM or in single user mode to identify the correct boot device from the OS command line.

Identifying boot device using OS command line

Using the eeprom command
We can also find out the boot device using the operating system commands. Use the eeprom command to find the boot device :

# eeprom | grep boot-device
boot-device=rootdisk mirror-disk

Here, again the primary boot-device is a devalias “rootdisk”, So in order to find out the physical path of the primary boot disk use :

# prtconf -vp | grep 'rootdisk':
         rootdisk:  '/pci@1f,0/ide@d/disk@0,0'

To find the logical device name of the rootdisk, we can use the format command :

# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0 [ST320414A cyl 39533 alt 2 hd 16 sec 63]
/pci@1f,0/ide@d/dad@0,0                                 -- the logical device c0t0d0 is the same physical device as the 'rootdisk' alias from prtconf -vp
1. c0t2d0 [DEFAULT cyl 39533 alt 2 hd 16 sec 63]
/pci@1f,0/ide@d/dad@2,0

Similarly you can find the mirrordisk physical path.

x86 / x64

x86 machines uses BIOS instead of the OBP so to duplicate the functionality of eeprom in SPARC machine, x86 systems uses a file /boot/solaris/bootenv.rc at boot time. To find out the primary and alternate boot disk from eeprom :

# eeprom |grep boot
bootpath=/pci@0,0/pci15ad,1976@10/sd@0,0:a
altbootpath=/pci@0,0/pci15ad,1976@10/sd@1,0:a

Also when the system is booted up you can see the 2 different boot options to select from. Below is a screen shot of mirrored boot disk under veritas volume manager.

boot menu in BIOS x86 solaris

Filed Under: Solaris 11

Some more articles you might also be interested in …

  1. Beginners Guide to Configuring network virtualization features in Solaris 11
  2. Solaris 11 IPS hand-on LAB – Boot environments
  3. How To Use ‘zpool split’ to Split rpool in solaris 11 (x86/x64)
  4. What are Oracle Solaris 11 Installation Methods
  5. Solaris 11 : Setting user and group quota for ZFS datasets
  6. Solaris : Non-root user can’t run prtdiag command
  7. A beginners guide to Solaris performance monitoring and troubleshooting
  8. Solaris : How to start syslogd in debug mode
  9. Managing network resources in Solaris 11 using “dlstat” and “flowstat”
  10. Solaris 11 IPS pkg Command Examples

You May Also Like

Primary Sidebar

Recent Posts

  • nixos-rebuild Command Examples in Linux
  • nixos-option: Command Examples in Linux
  • nixos-container : Command Examples in Linux
  • nitrogen Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright