summaryrefslogtreecommitdiffstats
path: root/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
diff options
context:
space:
mode:
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c')
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
index d734f2c..c7edd2e 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
@@ -48,11 +48,13 @@
static int read_efi_label(nvlist_t *config, diskaddr_t *sb);
+#ifdef sun
#if defined(__i386) || defined(__amd64)
#define BOOTCMD "installgrub(1M)"
#else
#define BOOTCMD "installboot(1M)"
#endif
+#endif /* sun */
/*
* ====================================================================
@@ -1889,14 +1891,15 @@ zpool_vdev_attach(zpool_handle_t *zhp,
if (ret == 0) {
if (rootpool) {
- /*
- * XXX - This should be removed once we can
- * automatically install the bootblocks on the
- * newly attached disk.
- */
- (void) fprintf(stderr, dgettext(TEXT_DOMAIN, "Please "
- "be sure to invoke %s to make '%s' bootable.\n"),
- BOOTCMD, new_disk);
+ (void) fprintf(stderr, dgettext(TEXT_DOMAIN, "If "
+ "you boot from pool '%s', you may need to update\n"
+ "boot code on newly attached disk '%s'.\n\n"
+ "Assuming you use GPT partitioning and 'da0' is "
+ "your new boot disk\n"
+ "you may use the following command:\n\n"
+ "\tgpart bootcode -b /boot/pmbr -p "
+ "/boot/gptzfsboot -i 1 da0\n\n"),
+ zhp->zpool_name, new_disk);
}
return (0);
}
OpenPOWER on IntegriCloud