diff --git a/sbin/fdisk/fdisk.c b/sbin/fdisk/fdisk.c index 6cfa2b510f22..d9514555ae34 100644 --- a/sbin/fdisk/fdisk.c +++ b/sbin/fdisk/fdisk.c @@ -380,7 +380,8 @@ main(int argc, char *argv[]) printf("******* Working on device %s *******\n",disk); if (I_flag) { - read_s0(); + if (read_s0()) + warnx("Ignoring bad existing MBR."); reset_boot(); partp = &mboot.parts[0]; partp->dp_typ = DOSPTYP_386BSD; @@ -410,8 +411,10 @@ main(int argc, char *argv[]) else print_params(); - if (read_s0()) + if (read_s0()) { + printf("Will replace existing bad MBR\n"); init_sector0(dos_sectors); + } printf("Media sector size is %d\n", secsize); printf("Warning: BIOS sector numbering starts with sector 1\n");