From ba5d4af0297256c2902013285f02829721296e89 Mon Sep 17 00:00:00 2001 From: tsutsui Date: Wed, 22 Apr 2009 17:21:47 +0000 Subject: [PATCH] Add UFS2 root and boot support. --- distrib/utils/sysinst/arch/landisk/md.c | 18 +++++++++++++----- distrib/utils/sysinst/arch/landisk/md.h | 11 ++++++++++- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/distrib/utils/sysinst/arch/landisk/md.c b/distrib/utils/sysinst/arch/landisk/md.c index e98a47efd0f9..714291a4e21e 100644 --- a/distrib/utils/sysinst/arch/landisk/md.c +++ b/distrib/utils/sysinst/arch/landisk/md.c @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.4 2009/04/22 16:53:15 tsutsui Exp $ */ +/* $NetBSD: md.c,v 1.5 2009/04/22 17:21:47 tsutsui Exp $ */ /* * Copyright 1997,2002 Piermont Information Systems Inc. @@ -104,14 +104,22 @@ md_post_disklabel(void) int md_post_newfs(void) { + char *bootxx; + int error; printf (msg_string(MSG_dobootblks), diskdev); cp_to_target("/usr/mdec/boot", "/boot"); - if (run_program(RUN_DISPLAY | RUN_NO_CLEAR, - "/usr/sbin/installboot -v -m landisk /dev/r%sa /usr/mdec/bootxx_ffsv1", - diskdev)) + bootxx = bootxx_name(); + if (bootxx != NULL) { + error = run_program(RUN_DISPLAY | RUN_NO_CLEAR, + "/usr/sbin/installboot -v /dev/r%sa %s", diskdev, bootxx); + free(bootxx); + } else + error = -1; + + if (error != 0) process_menu(MENU_ok, - deconst("Warning: disk is probably not bootable")); + deconst("Warning: disk is probably not bootable")); return 0; } diff --git a/distrib/utils/sysinst/arch/landisk/md.h b/distrib/utils/sysinst/arch/landisk/md.h index 31de917dadbc..380e5f2f1474 100644 --- a/distrib/utils/sysinst/arch/landisk/md.h +++ b/distrib/utils/sysinst/arch/landisk/md.h @@ -1,4 +1,4 @@ -/* $NetBSD: md.h,v 1.1 2008/04/14 17:24:56 skrll Exp $ */ +/* $NetBSD: md.h,v 1.2 2009/04/22 17:21:47 tsutsui Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -46,6 +46,15 @@ /* Megs required for a full X installation. */ #define XNEEDMB 340 +/* have support for booting from UFS2 */ +#define HAVE_UFS2_BOOT + +/* have file system specific primary boot loader */ +#define HAVE_BOOTXX_xFS +#define BOOTXXDIR "/usr/mdec" +#define BOOTXX_FFSV1 "bootxx_ffsv1" +#define BOOTXX_FFSV2 "bootxx_ffsv2" + /* * Default filesets to fetch and install during installation or upgrade. * The standard sets are: base etc comp games man misc text