• 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. Active FTP vs. Passive FTP
  2. How to Disable IPv6 in solaris 8,9,10
  3. How to enable XDMCP in GNOME Display Manager (gdm) for Solaris 10,11
  4. How to check zpool status in Solaris
  5. Solaris : How To Create and Mount NFS share that is Restricted to Certain Hosts
  6. Solaris 11.2 : Adding new resources to a running zone online
  7. Solaris 11 : How to Verify Kernel Zone Support on a Host
  8. Solaris : How to set limit on the maximum number of open files per process
  9. Most Commonly used RSC commands (Cheat sheet)
  10. How to collect XSCF snapshot on M-series servers (M3000 / M4000 / M5000 / M8000 / M9000)

You May Also Like

Primary Sidebar

Recent Posts

  • grpck command – Remove corrupt or duplicate entries in the /etc/group and /etc/gshadow files.
  • xxd command – Expressed in hexadecimal form
  • sesearch: command not found
  • macof: command not found

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright