rageek

A place for Unix Thoughts and Ideas

Script to update eeprom boot_devices to boot from mirrors

Here is a script I wrote for automatically updating the eeprom settings on Sun servers to configure
it to boot from the configured zfs or disk suite mirror.

update_eeprom.sh

I recently updated the logic and it should now work on T3/T4 based systems.

Here is the output:

root@testserver # ./Update_eeprom.sh
***Old contents of nvramrc***
devalias net /pci@500/pci@0/pci@8/network@0
.” ChassisSerialNumber BEL0823M4G ” cr
***Old boot-device settings***
/pci@400/pci@0/pci@8/scsi@0/disk@0,0:a disk net

***New contents of nvramrc***
devalias net /pci@500/pci@0/pci@8/network@0
.” ChassisSerialNumber BEL0823M4G ” cr
devalias disk0 /pci@400/pci@0/pci@8/scsi@0/disk@0
devalias disk1 /pci@400/pci@0/pci@8/scsi@0/disk@1
***New boot-device settings***
disk0 disk1 net

Update EEPROM? Y
saving eeprom config to /etc/eeprom_orig.012412_1021
updating eeprom
updating default boot-device

root@testserver #

You can optionally use the -f argument to have it run without prompt, which is useful for running in a script during the jumpstart process.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: