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