Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/sysinst/arch/landisk PR install/57025: revert bogus...



details:   https://anonhg.NetBSD.org/src/rev/634fb022eb8e
branches:  trunk
changeset: 371262:634fb022eb8e
user:      martin <martin%NetBSD.org@localhost>
date:      Sun Oct 02 10:21:36 2022 +0000

description:
PR install/57025: revert bogus rev 1.9 which was only papering over
a bug in the adoption of the MBR handling code and fix the original
conversion bug instead:
 - run fdisk to install the MBR bootcode on the raw disk partition
 - run installboot against the NetBSD root partition (not the raw partition).

diffstat:

 usr.sbin/sysinst/arch/landisk/md.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 7ebdc532caa6 -r 634fb022eb8e usr.sbin/sysinst/arch/landisk/md.c
--- a/usr.sbin/sysinst/arch/landisk/md.c        Sun Oct 02 09:48:39 2022 +0000
+++ b/usr.sbin/sysinst/arch/landisk/md.c        Sun Oct 02 10:21:36 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: md.c,v 1.15 2022/01/29 16:01:19 martin Exp $   */
+/*     $NetBSD: md.c,v 1.16 2022/10/02 10:21:36 martin Exp $   */
 
 /*
  * Copyright 1997,2002 Piermont Information Systems Inc.
@@ -130,7 +130,9 @@
            msg_string(parts->pscheme->short_name));
 
        /* write edited "MBR" onto disk. */
-       if (!parts->pscheme->write_to_disk(parts)) {
+       if (!parts->pscheme->write_to_disk(parts) ||
+           run_program(RUN_SILENT | RUN_ERROR_OK,
+           "/sbin/fdisk -f -i -c /usr/mdec/mbr %s", parts->disk)) {
                msg_display(MSG_wmbrfail);
                process_menu(MENU_ok, NULL);
                return false;
@@ -166,7 +168,7 @@
        bootxx = bootxx_name(install);
        if (bootxx != NULL) {
                error = run_program(RUN_DISPLAY,
-                   "/usr/sbin/installboot -v /dev/r%sd %s", pm->diskdev, bootxx);
+                   "/usr/sbin/installboot -v /dev/r%sa %s", pm->diskdev, bootxx);
                free(bootxx);
        } else
                error = -1;



Home | Main Index | Thread Index | Old Index