Sunday, April 27, 2008

Change boot device target number (Rev: 1.1)



Situation

I refered to the "Copy Solaris boot disk to another disk with different partitions layout" in my previous blog. After copying the data from disk 1 to disk 2, and installing the bootblocks in disk 2, we swapped disk 2 from slot 1 to slot 0 position.

After powered on the Sun Fire 280R server, the below boot error messages were encountered:
Boot device: disk file and args:
Evaluating: boot
Can't open boot device

At the OpenBoot PROM (OBP) command prompt,
ok devalias
disk1 /pci@8,600000/SUNW,qlc@4/fp@0,0/disk@2,0
disk0 /pci@8,600000/SUNW,qlc@4/fp@0,0/disk@1,0
disk /pci@8,600000/SUNW,qlc@4/fp@0,0/disk@1,0

ok printenv boot-device
boot-device disk disk

From the devalias command, the default boot device (disk) was previously set to boot from disk target 1 slice 0 (disk@1,0) when disk 2 was originally placed in slot 1 position.

After we had swapped disk 2 from slot 1 to slot 0 position, the server can't open the boot device because it was looking for disk 2 at target 0 but disk 2 was previously configured to boot at target 1.


Solution

I created a new devalias called disk2 and set it to boot from disk target 0:
ok nvalias disk2 /pci@8,600000/SUNW,qlc@4/fp@0,0/disk@0,0

Then, I set the default boot device to boot from disk2:
ok setenv boot-device disk2

Finally, wrote the new boot-device value to the PROM:
ok reset-all

The system will immediately reboot to boot from disk 2 at target 0 in the new slot 0 position.


Reference

[1] Sun Microsystems Documentation

No comments:

Post a Comment