• 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 set boot-device with luxadm command in Solaris

by admin

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.

Setting boot-device with luxadm

1. Boot the system to a supported Solaris bootable cdrom.

ok> boot cdrom -s

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

# mount /dev/dsk/c0t0d0s0 /a

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

 # 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

4. 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

5. 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

6. 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.

Filed Under: Hardware, Solaris, Solaris 11

Some more articles you might also be interested in …

  1. Beginners guide to Oracle Solaris Live Upgrade
  2. How to Kill Zombie (Defunct) Process in Solaris
  3. How to Check and Analyze Memory Usage in Solaris
  4. How to configure link aggregation in Solaris 11
  5. Solaris : How to find number of open files by a process
  6. Oracle Solaris 11 Package Naming scheme ( version format )
  7. Howto Verify If a Bootblk is Installed on the Boot Disk (SPARC)
  8. Solaris 10 boot process : SPARC
  9. Unix file basics : Inode, Soft Vs Hard link, Device files, Named pipes
  10. What is SUID, SGID and Sticky bit ?

You May Also Like

Primary Sidebar

Recent Posts

  • pw-cat Command Examples in Linux
  • pvs: command not found
  • pulseaudio: command not found
  • pulseaudio Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright