NetBSD Problem Report #44226

From mm_lists@pulsar-zone.net  Sun Dec 12 21:37:22 2010
Return-Path: <mm_lists@pulsar-zone.net>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id D9C5663B87A
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 12 Dec 2010 21:37:22 +0000 (UTC)
Message-Id: <201012122137.oBCLbJ5P021774@ginseng.pulsar-zone.net>
Date: Sun, 12 Dec 2010 16:37:19 -0500
From: Matthew Mondor <mm_lists@pulsar-zone.net>
To: gnats-bugs@gnats.NetBSD.org
Subject: Vax bootloader doesn't support FFSv2

>Number:         44226
>Category:       install
>Synopsis:       Vax bootloader doesn't support FFSv2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 12 21:40:00 +0000 2010
>Last-Modified:  Sat Dec 18 13:00:04 +0000 2010
>Originator:     Matthew Mondor
>Release:        NetBSD 5.1
>Organization:
>Environment:
>Description:
	When installing a new system, sysinst allows the option to use
	FFSv2.  However, if FFSv2 is chosen, after the installation the
	system won't boot.  The bootloader appears to not support it.
>How-To-Repeat:
>Fix:
	We should either make sysinst warn that the boot loader doesn't
	support booting from FFSv2 file systems, or eventually fix the
	loader to support it...

>Audit-Trail:
From: Matthew Mondor <mm_lists@pulsar-zone.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: install/44226: Vax bootloader doesn't support FFSv2
Date: Sun, 12 Dec 2010 16:42:26 -0500

 On Sun, 12 Dec 2010 21:40:00 +0000 (UTC)
 gnats-admin@netbsd.org wrote:

 > >Category:       install

 The category should have been port-vax, sorry about that.
 -- 
 Matt

From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: install/44226: Vax bootloader doesn't support FFSv2
Date: Sun, 12 Dec 2010 23:26:14 +0100

 For the record: this has been fixed in -current already (HAVE_UFS2_BOOT
 define) by tsutsui-san:

 date: 2009/04/07 10:45:04;  author: tsutsui;  state: Exp;  lines: +42 -2
 Improve UFS2 root handling on sysinst:
 - add HAVE_UFS2_BOOT define on ports which have UFS2 capable loader
 - reject UFS2 for root file system on ports !HAVE_UFS2_BOOT
 - add a MI function to get bootxx name from root file system type
   per MD defines and remove md_bootxx_name() from arch/i386/md.c,
   so that alpha can use bootxx_ffsv2 for UFS2 as well as x86

 Tested on i386 and alpha with FFSv1 and FFSv2, and also
 tested on vax (on simh) for !HAVE_UFS2_BOOT case.
 de translation is provided by martin@.

 No objection on tech-install, and "move forward with it" from perry@.

 XXX1: not tested on all ports, more ports might/could have UFS2 root support
 XXX2: no es, fr, and pl translations, even en message should be improved
 XXX3: alpha has a fixed en message without MSG

 and:

 revision 1.50
 date: 2009/04/05 00:50:51;  author: tsutsui;  state: Exp;  lines: +6 -3
 - introduce machine dependent DEFAULT_UFS2 and HAVE_UFS2_BOOT flags in md.h
 - use those flags to change default ffs type, rather than adding
   __HAVE_UFS2_BOOT in <machine/types.h>

 Okay'ed by martin@, briefly tested on i386.


 Hunt for the missing translations and pullup?

 Martin

From: Matthew Mondor <mm_lists@pulsar-zone.net>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: install/44226: Vax bootloader doesn't support FFSv2
Date: Fri, 17 Dec 2010 23:12:25 -0500

 On Sun, 12 Dec 2010 22:30:04 +0000 (UTC)
 Martin Husemann <martin@duskware.de> wrote:

 >  For the record: this has been fixed in -current already (HAVE_UFS2_BOOT
 >  define) by tsutsui-san:

 I wasn't aware that this already was fixed; thanks for the notice.

 Should this really be worth a pullup to NetBSD-5 though?  Only having
 ran NetBSD/vax in SIMH so far, I didn't really need the advantages of
 FFS2, although I was bitten once by an install where I selected it.  It
 also would be fine for me if it only was clearly documented that the
 NetBSD-5/vax bootloader doesn't support booting from FFSv2 file systems.

 What do others think?

 Thanks,
 -- 
 Matt

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: install-manager@NetBSD.org, gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org,
        mm_lists@pulsar-zone.net, tsutsui@ceres.dti.ne.jp
Subject: Re: install/44226: Vax bootloader doesn't support FFSv2
Date: Sat, 18 Dec 2010 14:43:04 +0900

 >  Should this really be worth a pullup to NetBSD-5 though?

 It's possbile, but there are too many changes and
 we have to check which revisions are actually required
 and whether they cause conflicts...

 >  ran NetBSD/vax in SIMH so far, I didn't really need the advantages of
 >  FFS2, although I was bitten once by an install where I selected it.  It
 >  also would be fine for me if it only was clearly documented that the
 >  NetBSD-5/vax bootloader doesn't support booting from FFSv2 file systems.

 Adding FFSv2 support to vax bootloader is fairly easy
 though the primary xxboot grows almost ~7.5KB size restriction...
 (prepare optional xxboot_ffsv2 like i386?)


 Index: boot/conf.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/vax/boot/boot/conf.c,v
 retrieving revision 1.15
 diff -u -p -r1.15 conf.c
 --- boot/conf.c	18 Mar 2009 16:00:15 -0000	1.15
 +++ boot/conf.c	18 Dec 2010 05:32:41 -0000
 @@ -88,7 +88,8 @@ int	cnvtab[] = {
  int     ndevs = (sizeof(devsw)/sizeof(devsw[0]));

  struct fs_ops file_system[] = {
 -	FS_OPS(ufs),
 +	FS_OPS(ffsv1),
 +	FS_OPS(ffsv2),
  	FS_OPS(nfs),
  	FS_OPS(cd9660),
  	FS_OPS(ustarfs),
 Index: xxboot/Makefile
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/vax/boot/xxboot/Makefile,v
 retrieving revision 1.21
 diff -u -p -r1.21 Makefile
 --- xxboot/Makefile	11 Dec 2005 12:19:34 -0000	1.21
 +++ xxboot/Makefile	18 Dec 2010 05:32:42 -0000
 @@ -19,6 +19,7 @@ CPPFLAGS+=-D_STANDALONE -DLIBSA_NO_FD_CH
  	-DLIBSA_NO_FS_SYMLINK -DLIBSA_NO_FS_CLOSE \
  	-DLIBSA_NO_FS_WRITE -DLIBSA_NO_FS_SEEK \
  	-DNEED_UFS -DNEED_CD9660
 +CPPFLAGS+=-DNEED_FFSv2
  # Use small daddr_t to avoid code bloat
  CPPFLAGS+=-D__daddr_t=int32_t
  BINDIR=	/usr/mdec
 Index: xxboot/bootxx.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/vax/boot/xxboot/bootxx.c,v
 retrieving revision 1.36
 diff -u -p -r1.36 bootxx.c
 --- xxboot/bootxx.c	18 Sep 2009 21:40:09 -0000	1.36
 +++ xxboot/bootxx.c	18 Dec 2010 05:32:42 -0000
 @@ -186,7 +186,10 @@ die:
   */
  struct fs_ops file_system[] = {
  #ifdef NEED_UFS
 -	{ ufs_open, 0, ufs_read, 0, 0, ufs_stat },
 +	{ ffsv1_open, 0, ffsv1_read, 0, 0, ffsv1_stat },
 +#endif
 +#ifdef NEED_FFSv2
 +	{ ffsv2_open, 0, ffsv2_read, 0, 0, ffsv2_stat },
  #endif
  #ifdef NEED_CD9660
  	{ cd9660_open, 0, cd9660_read, 0, 0, cd9660_stat },

 ---

 % ls -l xxboot/obj.vax/xxboot
 -rwxr-xr-x  1 tsutsui  wheel  7600 Dec 18 14:29 xxboot/obj.vax/xxboot

 ---
 Izumi Tsutsui

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: install-manager@NetBSD.org, gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org,
        tsutsui@ceres.dti.ne.jp
Subject: Re: install/44226: Vax bootloader doesn't support FFSv2
Date: Sat, 18 Dec 2010 21:59:12 +0900

 > >  Should this really be worth a pullup to NetBSD-5 though?
 > 
 > It's possbile, but there are too many changes and
 > we have to check which revisions are actually required
 > and whether they cause conflicts...

 With a quick test, the following revisions in src/distrib
 can be applied without conflicts, but they also changes
 two default settings:
  - sysinst uses FFSv2 by default on amd64 and i386
  - sysinst enables log (wapbl) by default

 I have no idea if we should pull all of them or revert part of them.

 Futhermore, not all msg translations are prepared as noted in the log.

 ---
 cvs update -kk -j1.45 -j1.46 utils/sysinst/bsddisklabel.c
  - Default to UFS2 if the platform can boot from it.
  - Default logging on.

 ---
 cvs update -kk -j1.28 -j1.29 alpha/instkernel/ramdisk/list 
  Also put bootxx_ffsv2 into installation ramdisk.

 ---
 cvs update -kk -j1.49 -j1.50 utils/sysinst/bsddisklabel.c 
 cvs update -kk -j1.23 -j1.24 utils/sysinst/arch/amd64/md.h 
 cvs update -kk -j1.64 -j1.65 utils/sysinst/arch/i386/md.h
  - introduce machine dependent DEFAULT_UFS2 and HAVE_UFS2_BOOT flags in md.h
  - use those flags to change default ffs type, rather than adding
    __HAVE_UFS2_BOOT in <machine/types.h>

 ---
 cvs update -kk -j1.140 -j1.141 utils/sysinst/defs.h 
 cvs update -kk -j1.3 -j1.4 utils/sysinst/sizemultname.c 
  Remove unused check_partitions().
  The similar check is done in check_one_root() in label.c.

 ---
 cvs update -kk -j1.7 -j1.8 utils/sysinst/arch/hp700/md.c 
 cvs update -kk -j1.23 -j1.24 utils/sysinst/arch/sparc64/md.c 
  Remove redundant call of check_partitions().

 ---
 cvs update -kk -j1.50 -j1.51 utils/sysinst/bsddisklabel.c
 cvs update -kk -j1.141 -j1.142 src/distrib/utils/sysinst/defs.h
 cvs update -kk -j1.141 -j1.142 utils/sysinst/defs.h
 cvs update -kk -j1.103 -j1.104 utils/sysinst/disks.c
 cvs update -kk -j1.47 -j1.48 utils/sysinst/msg.mi.de
 cvs update -kk -j1.152 -j1.153 utils/sysinst/msg.mi.en
 cvs update -kk -j1.24 -j1.25 utils/sysinst/msg.mi.es
 cvs update -kk -j1.104 -j1.105 utils/sysinst/msg.mi.fr
 cvs update -kk -j1.63 -j1.64 utils/sysinst/msg.mi.pl
 cvs update -kk -j1.18 -j1.19 utils/sysinst/arch/acorn32/md.h
 cvs update -kk -j1.45 -j1.46 utils/sysinst/arch/alpha/md.c
 cvs update -kk -j1.21 -j1.22 utils/sysinst/arch/alpha/md.h
 cvs update -kk -j1.24 -j1.25 utils/sysinst/arch/amd64/md.h
 cvs update -kk -j1.14 -j1.15 utils/sysinst/arch/arc/md.h
 cvs update -kk -j1.1 -j1.2 utils/sysinst/arch/cobalt/md.h
 cvs update -kk -j1.120 -j1.121 utils/sysinst/arch/i386/md.c
 cvs update -kk -j1.65 -j1.66 utils/sysinst/arch/i386/md.h
 cvs update -kk -j1.15 -j1.16 utils/sysinst/arch/i386/msg.md.de
 cvs update -kk -j1.57 -j1.58 utils/sysinst/arch/i386/msg.md.en
 cvs update -kk -j1.10 -j1.11 utils/sysinst/arch/i386/msg.md.es
 cvs update -kk -j1.47 -j1.48 utils/sysinst/arch/i386/msg.md.fr
 cvs update -kk -j1.30 -j1.31 utils/sysinst/arch/i386/msg.md.pl
 cvs update -kk -j1.16 -j1.17 utils/sysinst/arch/macppc/md.h
 cvs update -kk -j1.23 -j1.24 utils/sysinst/arch/sgimips/md.h
 cvs update -kk -j1.23 -j1.24 utils/sysinst/arch/sparc/md.h
  Improve UFS2 root handling on sysinst:
  - add HAVE_UFS2_BOOT define on ports which have UFS2 capable loader
  - reject UFS2 for root file system on ports !HAVE_UFS2_BOOT
  - add a MI function to get bootxx name from root file system type
    per MD defines and remove md_bootxx_name() from arch/i386/md.c,
    so that alpha can use bootxx_ffsv2 for UFS2 as well as x86

 ---
 cvs update -kk -j1.46 -j1.47 utils/sysinst/arch/alpha/md.c 
  Make sure to free(3) memory allocated by asprintf(3) in bootxx_name().

 ---
 cvs update -kk -j1.153 -j1.154 utils/sysinst/msg.mi.en 
  Make No_Bootcode message a bit more verbose.

 ---
 Izumi Tsutsui

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.