- 论坛徽章:
- 1
|
回复 3# ragecf
Reference http://www.unix.com/unix-dummies ... s-sun-hardware.html
1) Creating a boot alias using nvalias from the OpenBoot PROM command line.
Get the device path for the boot disk:
# ls -la /dev/dsk/cxtxdxsx
Write down the entire (physical) path to be used for the alias.
Shutdown the system to the ok prompt.
Create the alias:
ok nvalias <alias> <device-path>
Example:
ok nvalias newdisk /iommu@f,e0000000/sbus@f,e0001000/esp@f,800000/sd@3,0:a
or for PCI based systems:
ok nvalias newdisk /pci@1f,0/pci@1/scsi@3,1/disk@3,0
NOTE: Although format will show the pci device with a "sd" designation, a translation is made as the OBP's device tree is 'disk'. This is the only name that the firmware will understand.
Modify the NVRAM so that it boots from the new alias automatically:
ok setenv boot-device newdisk
ok reset
The above will be valid till you run set-defaults or nvunalias from the ok prompt..
******************************************************************************
2) Alternate method for creating a boot alias using nvedit.
Use the NVRAM editor to create a script that will create the boot alias at reset:
ok nvedit
0: devalias newdisk /iommu@f,e0000000/sbus@f,e0001000/esp@f,800000/sd@3,0:a
^c (control c)
ok nvstore
ok setenv use-nvramrc? true
ok reset
******************************************************************************
3) Alternate method for creating a boot alias using existing device aliases provided in the OpenBoot PROM.
Use the devalias command to identify the existing device aliases:
ok devalias
The device alias names are listed on the left side of the output. Any of the device alias names that point to disk drives can be used as boot aliases.
Use one of the device alias names to set a new boot device:
ok setenv boot-device <new device alias name>
Display the new boot device alias:
ok printenv boot-device
Test the new boot alias by resetting the machine;
ok reset
Note: The device path above is an example only; you will not necessarily have the same path.
Note: The "0:" in the nvedit example (method 2) is the line number; do not type it as part of your edit. |
|