diff options
author | mm <mm@FreeBSD.org> | 2010-12-08 13:51:25 +0000 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2010-12-08 13:51:25 +0000 |
commit | 6e855a313aac604a57c7b9d8561a9a4e5c2f6666 (patch) | |
tree | 5be40194eab002f31e239951158b48ae9c24890b | |
parent | 94551f8622197b7a0cbce550a9d6a732be223df7 (diff) | |
download | FreeBSD-src-6e855a313aac604a57c7b9d8561a9a4e5c2f6666.zip FreeBSD-src-6e855a313aac604a57c7b9d8561a9a4e5c2f6666.tar.gz |
Print message with information about updating the boot code if a new
vdev is attached to a root pool (e.g. when creating a mirrored boot pool).
Reviewed by: pav
Approved by: delphij (mentor)
MFC after: 3 days
-rw-r--r-- | cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c index fc64b0b..c7edd2e 100644 --- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c +++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c @@ -1890,18 +1890,17 @@ zpool_vdev_attach(zpool_handle_t *zhp, zcmd_free_nvlists(&zc); if (ret == 0) { -#ifdef sun 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); } -#endif /* sun */ return (0); } |