Solaris Troubleshooting : Setting boot-device with luxadm command from booted OS.

This procedure demonstrates how to easily use the “luxadm” command to set the “boot-device” Open Boot Prom (OBP) parameter from a system booted from cdrom or in single user mode.

The command will change the “boot-device” setting at the OS level and at the same time, change the “boot-device” setting at the OBP level.  This procedure enables the “boot-device” to easily be changed for systems with storage devices whose device paths are not one of the built-in OBP  boot aliases (disk, disk1, etc.).

This procedure is very beneficial because it accurately sets the boot device path without using the devalias command or typing the entire prom level hardware path to the root file system. This can be very difficult especially since users often do not have the World Wide Number (WWN) for the root disk.

Boot the system to a supported Solaris bootable cdrom

PROCEDURE:

ok boot cdrom -s

Mount the root slice to “/a”  (example is c0t0d0s0. Use the “format” command to view a list of disks)

# mount /dev/dsk/c0t0d0s0 /a

Find the link to the devices directory by long listing the root slice in /dev/dsk:

# ls -l /dev/dsk/c0t0d0s0

lrwxrwxrwx   1 root  root 51 Jan 27  1997 /dev/dsk/c0t0d0s0 -> ../../devices/sbus@1f,0/SUNW,fas@e,8800000/sd@0,0:a

Run the luxadm command to populate the “boot-device” entry in OBP:

# luxadm -v set_boot_dev /devices/sbus@1f,0/SUNW,fas@e,8800000/sd@0,0:a

Output that is seen upon execution of above command:

Current boot-device = /sbus@1f,0/SUNW,fas@e,8800000/sd@0,0:a
New boot-device = /sbus@1f,0/SUNW,fas@e,8800000/sd@0,0:a

NOTE: The logical path can be used also. Here is an example using slice 0 of the controller 0, target 0 disk 0.

# luxadm -v set_boot_dev -y /dev/dsk/c0t0d0s0

Verify the boot device is set correctly using eeprom command:

# eeprom boot-device

boot-device=/sbus@1f,0/SUNW,fas@e,8800000/sd@0,0:a

Unmount the root filesystem, shutdown the system and boot to test:

# umount /dev/dsk/c0t0d0s0

# halt

ok boot

The system will now boot using the new entry for “boot-device.”

Note: If this physical path entry is long (not always desirable for viewing  with setenv command, an alias to this path can be created at the OBP level with the devalias command and this alias can be used for “boot-device” entry.

Ramdev

Ramdev

I have started unixadminschool.com ( aka gurkulindia.com) in 2009 as my own personal reference blog, and later sometime i have realized that my leanings might be helpful for other unixadmins if I manage my knowledge-base in more user friendly format. And the result is today's' unixadminschool.com. You can connect me at - https://www.linkedin.com/in/unixadminschool/

2 Responses

  1. September 16, 2015

    […] Read – Setting Solaris boot-device with luxadm command from booted OS. […]

  2. September 16, 2015

    […] Read – Setting boot-device with luxadm command from booted OS. […]

What is in your mind, about this post ? Leave a Reply

Close
  Our next learning article is ready, subscribe it in your email

What is your Learning Goal for Next Six Months ? Talk to us