7158052 Installation fails due to installboot returned unexpected exit status 4 s11u1_13 S11U1Build13
authorNiall Power <niall.power@oracle.com>
Sat, 31 Mar 2012 04:23:42 -0700
branchs11u1_13
changeset 1626 4b0147e2d415
parent 1620 f7367223f0c2
7158052 Installation fails due to installboot returned unexpected exit status 4
usr/src/lib/install_boot/boot.py
--- a/usr/src/lib/install_boot/boot.py	Mon Mar 26 12:39:03 2012 -0700
+++ b/usr/src/lib/install_boot/boot.py	Sat Mar 31 04:23:42 2012 -0700
@@ -530,7 +530,9 @@
         bootblk_src = os.path.join(self.boot_target[BOOT_ENV].mountpoint,
                                    'platform', platform.machine(),
                                    'lib', 'fs', 'zfs', 'bootblk')
-        sub_cmd = ["/usr/sbin/installboot", "-F", "zfs", bootblk_src]
+        # NOTE: the '-f' switch forces the installation of the bootblock 
+        # onto a disk that may have a versioned bootblock already installed.
+        sub_cmd = ["/usr/sbin/installboot", "-f", "-F", "zfs", bootblk_src]
 
         for dev in boot_devs:
             cmd = sub_cmd[:]
@@ -916,8 +918,11 @@
             # Danger Will Robinson!!
             self.logger.info("Installing boot loader to devices: %s" \
                              % str(boot_rdevs))
-            self.config.commit_boot_config(
-                boot_devices=boot_rdevs)
+            # NOTE: Use the force (haha) option to force installation of the
+            # boot loader onto a disk that may have a versioned boot loader
+            # already installed.
+            self.config.commit_boot_config(boot_devices=boot_rdevs,
+                                           force=True)
         # XXX Pybootmgmt ought to do this but doesn't currently so
         # set up the bootfs property on the boot pool.
         self._set_bootfs_pool_prop(dry_run)