On the Sun server with Solaris OS inside, boot device defined on the nvramrc
which stored in the server’s nvram
. We can see boot device setting using eeprom
command like this :
bash-2.03# eeprom | grep boot-device boot-device=disk net bash-2.03#
At the example above, the server using disk (as 1st boot priority) and network boot as second priority. The “disk” itself is an alias for physical disk c1t0d0
(behave as default boot device). To create an alias for the physical disk we use the nvalias
command. To set the boot device we can do it by setenv
command on OBP environment.
OK nvalias disk /pci@1f,700000/scsi@2/disk@0,0 OK setenv boot-device disk
We can also set the boot device parameter from operating system environment (modified contents of nvram
from OS environment), to do that we can do by some command explained below.
First we need to set parameter use-nvramrc
as TRUE. This will let us configured boot device from the operating system :
bash-2.03# eeprom "use-nvramrc?=true" bash-2.03# eeprom | grep nvram use-nvramrc?=true nvramrc=devalias disk0 /pci@1f,700000/scsi@2/sd@0,0 devalias disk1 /pci@1f,700000/scsi@2/sd@1,0 bash-2.03# eeprom | grep boot-device boot-device=disk net bash-2.03#
Next, we want to know which physical disks available :
bash-2.03# format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c1t0d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848> /pci@1f,700000/scsi@2/sd@0,0 1. c1t1d0 <SUN146G cyl 14087 alt 2 hd 24 sec 848> /pci@1f,700000/scsi@2/sd@1,0 Specify disk (enter its number): ^D bash-2.03#
In the above example we have 2 disks and both of them mirrored. As mirror disks both disk can act as boot device. So to set the both disks as boot device we use the following command :
bash-2.03# eeprom "nvramrc=devalias disk0 /pci@1f,700000/scsi@2/disk@0,0 devalias disk1 /pci@1f,700000/scsi@2/disk@1,0" bash-2.03# bash-2.03# eeprom | grep alias nvramrc=devalias disk0 /pci@1f,700000/scsi@2/disk@0,0 devalias disk1 /pci@1f,700000/scsi@2/disk@1,0 bash-2.03# bash-2.03# eeprom | grep boot-device boot-device=disk net bash-2.03# bash-2.03# eeprom "nvramrc=devunalias disk" bash-2.03# eeprom | grep boot-device boot-device=disk net bash-2.03# eeprom boot-device="disk0 disk1" bash-2.03# eeprom | grep boot-device boot-device=disk0 disk1
After this step, server can boot up neither using disk1
or disk2
. This configuration is mandatory to be done after we configured mirroring of the boot disk. Because with the mirrored root disk, sometime it might be needed to boot using 2nd disk when 1st disk degraded.
Thanks for such a good info. I helps.
mas mau tanya klo di solaris misalkan ada disk yang failed, nah kita dah setingg mirror. tapi yang menjadi pertanyaan apakah klo di sun itu mengenal yang namanya grub? trus oke klo misalkan boot OBP tetapi apakah pada saat booting /boot tidak di baca?
klo boleh ada YM nya saya minta ya, banyak hal sih yang pengen saya diskusi kan dengan si mas
Terima Kasih :D