summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-09-21 16:09:27 +0300
committerToomas Soome <tsoome@me.com>2019-09-23 21:49:25 +0300
commitd8d05a42df1fe06e901e8428edbbe802a6e3fc57 (patch)
treec764407184426033acaa47f8a301d5f421c7b390
parent29de914fcef174393d74135cd19f6920fac954bc (diff)
downloadillumos-joyent-d8d05a42df1fe06e901e8428edbbe802a6e3fc57.tar.gz
11742 installboot: PCFS needs mbr update even if there is X86BOOT partition
Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/cmd/boot/installboot/i386/installboot.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/usr/src/cmd/boot/installboot/i386/installboot.c b/usr/src/cmd/boot/installboot/i386/installboot.c
index fd5430fde6..a9a8c932a8 100644
--- a/usr/src/cmd/boot/installboot/i386/installboot.c
+++ b/usr/src/cmd/boot/installboot/i386/installboot.c
@@ -1032,6 +1032,9 @@ probe_fstyp(ib_data_t *data)
data->target.fstype = IB_FS_UFS;
} else if (strcmp(fident, MNTTYPE_PCFS) == 0) {
data->target.fstype = IB_FS_PCFS;
+ /* with pcfs we always write MBR */
+ force_mbr = true;
+ write_mbr = true;
} else {
(void) fprintf(stderr, gettext("File system %s is not "
"supported by loader\n"), fident);
@@ -1142,8 +1145,8 @@ probe_gpt(ib_data_t *data)
data->target.size = vtoc->efi_parts[slice].p_size;
/* Always update PMBR. */
- force_mbr = 1;
- write_mbr = 1;
+ force_mbr = true;
+ write_mbr = true;
/*
* With GPT we can have boot partition and ESP.
@@ -1556,12 +1559,6 @@ probe_mbr(ib_data_t *data)
* partition.
*/
if (i == FD_NUMPART) {
- /* with pcfs we always write MBR */
- if (data->target.fstype == IB_FS_PCFS) {
- force_mbr = true;
- write_mbr = true;
- }
-
pl->pl_devname = strdup(path);
if (pl->pl_devname == NULL) {
perror(gettext("Memory allocation failure"));