mksysb restore fails with error 0301-165 bosboot failed
Summary: This article is based on a similar IBM article which has been modified here for a PowerPath context. When an mksysb image was created with PowerPath installed, the restoration of the image on a multipath'd disk may fail. This is because of multiple hdisks holding rootvg, preventing bosboot to succeed. This article provides all the steps requested to overcome the issue. ...
Symptoms
When trying to restore mksysb, when multiple paths are configured to the devices used to restore the image, an error similar to the following may occur:
0301-165 bosboot: WARNING! bosboot failed - do not attempt to boot device.
BOS Install: Could not create boot image.
ID# OPTION
1 Continue
2 Perform System Maintenance and Then Continue
Enter ID number:Cause
Resolution
Find the pseudodevice holding these hdisks.
Release the devices from PowerPath.
Remove the hdisks (all but one).
Run the bosboot command against the remaining hdisk.
Run the bosboot against the ipldevice.
Exit
Select option 2 when mksysb restore fails:
0301-165 bosboot: WARNING! bosboot failed - do not attempt to boot device.
BOS Install: Could not create boot image.
ID# OPTION
1 Continue
2 Perform System Maintenance and Then Continue
Enter ID number: 2
Check the rootvg disks:
# lspv |grep rootvg
hdisk0 00aabbccddeeffcc rootvg active
hdisk2 00aabbccddeeffcc rootvg active
hdisk4 00aabbccddeeffcc rootvg active
hdisk6 00aabbccddeeffcc rootvg active
hdisk8 00aabbccddeeffcc rootvg active
hdisk10 00aabbccddeeffcc rootvg active
hdisk12 00aabbccddeeffcc rootvg active
hdisk14 00aabbccddeeffcc rootvg active
Find the corresponding pseudo device using any hdisk device from this list :# powermt display dev=hdisk0
Pseudo name=hdiskpower0
Symmetrix ID=000297000000
Logical device ID=0000013C
Device WWN=60000970000297000000533030313343
state=alive; policy=SymmOpt; queued-IOs=0
==============================================================================
--------------- Host --------------- - Stor - -- I/O Path -- -- Stats ---
### HW Path I/O Paths Interf. Mode State Q-IOs Errors
==============================================================================
3 fscsi7 hdisk0 FA 3d:04 active alive 0 0
3 fscsi7 hdisk2 FA 1d:04 active alive 0 0
2 fscsi6 hdisk4 FA 4d:04 active alive 0 0
2 fscsi6 hdisk6 FA 6d:04 active alive 0 0
2 fscsi6 hdisk8 FA 2d:08 active alive 0 0
1 fscsi5 hdisk10 FA 3d:04 active alive 0 0
1 fscsi5 hdisk12 FA 1d:04 active alive 0 0
0 fscsi4 hdisk14 FA 4d:04 active alive 0 0
Remove the pseudo device to release the hdisks# powermt remove dev=hdiskpower0
Remove the duplicated rootvg disks:
# rmdev -dl hdisk0
# rmdev -dl hdisk2
# rmdev -dl hdisk4
# rmdev -dl hdisk6
# rmdev -dl hdisk8
# rmdev -dl hdisk10
# rmdev -dl hdisk12
# rmdev -dl hdisk14
One of the above rmdev commands fails as expected, and only one rootvg disk remains:
# lspv |grep rootvg
hdisk12 00aabbccddeeffcc rootvg active
Perform the bosboot commands manually:
# bosboot -ad /dev/hdisk12
# bosboot -ad /dev/ipldevice
(you may have to create the ipldevice for the "bosboot -ad /dev/ipldevice" command to succeed. In our case, you would do this with "ln /dev/rhdisk12 /dev/ipldevice)
If the bosboot commands work, then type "exit"
# exit
The mksysb restore continues to complete.
If the bosboot commands fail, work with your Storage admin to reduce the number of paths of the rootvg disk to one before the mksysb restore.
This solution is derived from the public IBM solution https://www.ibm.com/support/pages/mksysb-restore-fails-error-0301-165-bosboot-failed