NetBSD Problem Report #45153

From spz@tucana.1st.de  Sun Jul 17 13:15:05 2011
Return-Path: <spz@tucana.1st.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id ABE6363CA8A
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 17 Jul 2011 13:15:04 +0000 (UTC)
Message-Id: <20110717131446.264AFFF68@tucana.1st.de>
Date: Sun, 17 Jul 2011 13:14:46 +0000 (UTC)
From: spz@tucana.1st.de
Reply-To: spz@tucana.1st.de
To: gnats-bugs@gnats.NetBSD.org
Subject: build.sh target live-image wanted
X-Send-Pr-Version: 3.95

>Number:         45153
>Category:       toolchain
>Synopsis:       there should be a build.sh target for building live images
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    tsutsui
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 17 13:20:00 +0000 2011
>Closed-Date:    Sun Mar 04 06:01:20 +0000 2012
>Last-Modified:  Sun Mar 04 06:01:20 +0000 2012
>Originator:     S.P.Zeidler
>Release:        NetBSD 5.99.54
>Organization:
	TNF
>Environment:
System: NetBSD tucana.1st.de 5.99.54 NetBSD 5.99.54 (TUCANA) #1: Mon Jul 4 17:17:03 CEST 2011 root@tucana.1st.de:/home/netbsd/amd64/kernobj/TUCANA amd64
Architecture: x86_64
Machine: amd64
>Description:
	./build.sh live-image
	should build a bootable live image suitable for putting on a
	USB stick or CD (or other bootable media) where the arch allows it
>How-To-Repeat:
>Fix:

>Release-Note:

>Audit-Trail:
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: toolchain/45153: build.sh target live-image wanted
Date: Sat, 6 Aug 2011 20:26:47 +0900

 > 	./build.sh live-image
 > 	should build a bootable live image suitable for putting on a
 > 	USB stick or CD (or other bootable media) where the arch allows it

 I'm not sure what's the definition of "live-image" but
 I've been using a dumb script which creates a bootable disk image
 from snapshot binary sets for various emulators:
 ftp://ftp.NetBSD.org/pub/NetBSD/misc/tsutsui/fsimage/mkbootimage-20110804.sh

 So I've just convert it to use build.sh framework:
 ftp://ftp.NetBSD.org/pub/NetBSD/misc/tsutsui/fsimage/liveimage-20110805.tar.gz
 "build.sh -m i386 -U release live-image" will creates bootable image
 for USB stick (root on sd0) and emulators (root on wd0).

 Overview:
  - main part is in src/distrib/common/liveimage/Makefile.liveimage:
   - extract binary sets in releasedir/${RELEASEMACHINE}/binary/sets
   - copy secondary boot into root (if necessary)
   - create root file system by makefs(8)
   - run installboot(8) (if necessary)
   - prepare sectors for MBR label (if necessary)
   - prepare swap
   - write MBR partition (if necessary)
   - write disklabel
   - write sunlabel (in necessary)
  - liveimage-20110805.diff includes diff against Makefiles and build.sh
    to handle "build.sh live-image" as iso-image does
  - Makefiles for following ${MACHINE}s are prepared
   - i386 (for 2GB USB stick on real machine, and for qemu)
   - amd64 (similar to i386, untested)
   - pmax (for gxemul)
   - sparc (for TME and qemu, untested)
   - sparc64 (for TME, untested)
   - sun2 (for TME, untested)
   - sun3 (for TME)
   - vax (for simh)

 Known problems:
  - can we really call images which just boot up to multiuser "live image"?
  - needs better image names (rather than sun3emu.img etc.)
  - too many dumb statements in Makefile.liveimage (needs sh and make gurus)
  - makefs during building images fails if release binaries are built without
    MKUNPRIVED=yes, (i.e. build.sh -U) because
    destdir/etc/mtree/set.* must have permission info for makefs(8)
  - images will be installed into releasedir, but they should not be included
    in iso-image (i.e. distrib/common/Makefile.bootcd needs to be updated)
  - race in ${MAKESUMS} in Makefile.liveimage if ${MACHINE} has multiple images
  - and needs more thoughts and cleanup...

 ---
 Izumi Tsutsui

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: toolchain/45153: build.sh target live-image wanted
Date: Sat, 24 Sep 2011 01:49:20 +0900

 I've put updated one:
 ftp://ftp.NetBSD.org/pub/NetBSD/misc/tsutsui/fsimage/liveimage-20110924.tar.gz

 The following two problems are workarounded:
 >  - images will be installed into releasedir, but they should not be included
 >    in iso-image (i.e. distrib/common/Makefile.bootcd needs to be updated)
 Now distrib/common/Makefile.bootcd explicitly excludes
 installation/liveimage dir from iso images.

 >  - race in ${MAKESUMS} in Makefile.liveimage if ${MACHINE} has multiple images
 Fixed by invoking distrib/Makefile via "${MAKEDIRTARGET} etc live-image"
 from src/Makefile and also call ${MAKESUMS} from etc/Makefile after
 all images are ready.

 Also fixed one bug, wrong NetBSD partition size in MBR partition.

 The following problems should still be discussed:
 >  - can we really call images which just boot up to multiuser "live image"?
 >  - needs better image names (rather than sun3emu.img etc.)
 >  - too many dumb statements in Makefile.liveimage (needs sh and make gurus)
 >  - makefs during building images fails if release binaries are built without
 >    MKUNPRIVED=yes, (i.e. build.sh -U) because
 >    destdir/etc/mtree/set.* must have permission info for makefs(8)
 >  - and needs more thoughts and cleanup...

 ---
 Izumi Tsutsui

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: toolchain/45153: build.sh target live-image wanted
Date: Thu, 8 Dec 2011 00:09:22 +0900

 I've put updated one again:
 http://ftp.NetBSD.org/pub/NetBSD/misc/tsutsui/fsimage/liveimage-20111207.tar.gz

 Now "build.sh install-image" target (for now i386 only) is also added,
 to make sysutils/mkmemstick obsolete ;-p

 > The following problems should still be discussed:
 > >  - can we really call images which just boot up to multiuser "live image"?
 > >  - needs better image names (rather than sun3emu.img etc.)
 > >  - too many dumb statements in Makefile.liveimage (needs sh and make gurus)
 > >  - makefs during building images fails if release binaries are built without
 > >    MKUNPRIVED=yes, (i.e. build.sh -U) because
 > >    destdir/etc/mtree/set.* must have permission info for makefs(8)
 > >  - and needs more thoughts and cleanup...
 These problems should still be discussed.

 ---
 Izumi Tsutsui

From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
To: gnats-bugs@NetBSD.org
Cc: tsutsui@ceres.dti.ne.jp
Subject: Re: toolchain/45153: build.sh target live-image wanted
Date: Fri, 9 Dec 2011 00:41:26 +0900

 I've put updated one again:
 http://ftp.NetBSD.org/pub/NetBSD/misc/tsutsui/fsimage/liveimage-20111208.tar.gz

 - add amd64 install-image target
 - add install-image specific boot.cfg (from installcd)
 - fix bug makefs overflow (add -m size option)

 Installation NetBSD/amd64 from the install-image works fine.

 ---
 Izumi Tsutsui

From: Jeff Rizzo <riz@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: toolchain/45153
Date: Mon, 09 Jan 2012 19:32:15 -0800

 Is this ready to commit?  It sure would be nice to have for the 6.0 
 release...

From: "Izumi Tsutsui" <tsutsui@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/45153 CVS commit: src
Date: Sun, 22 Jan 2012 03:53:34 +0000

 Module Name:	src
 Committed By:	tsutsui
 Date:		Sun Jan 22 03:53:33 UTC 2012

 Modified Files:
 	src: BUILDING Makefile build.sh
 	src/distrib: Makefile Makefile.inc
 	src/distrib/amd64: Makefile
 	src/distrib/common: Makefile.bootcd
 	src/distrib/i386: Makefile
 	src/distrib/pmax: Makefile
 	src/distrib/sparc: Makefile
 	src/distrib/sparc64: Makefile
 	src/distrib/sun2: Makefile
 	src/distrib/sun3: Makefile
 	src/distrib/vax: Makefile
 	src/etc: Makefile
 Added Files:
 	src/distrib/amd64/installimage: Makefile boot.cfg.in etc.rc etc.ttys
 	    install.sh spec.inst
 	src/distrib/amd64/liveimage: Makefile Makefile.liveimage
 	src/distrib/amd64/liveimage/emuimage: Makefile
 	src/distrib/amd64/liveimage/usbimage: Makefile
 	src/distrib/common/bootimage: Makefile.bootimage Makefile.installimage
 	    Makefile.liveimage diskproto.in diskproto.mbr.in
 	    diskproto.noswap.in diskproto.noswap.mbr.in fstab.in
 	    fstab.install.in spec.in
 	src/distrib/i386/installimage: Makefile boot.cfg.in etc.rc etc.ttys
 	    install.sh spec.inst
 	src/distrib/i386/liveimage: Makefile Makefile.liveimage
 	src/distrib/i386/liveimage/emuimage: Makefile
 	src/distrib/i386/liveimage/usbimage: Makefile
 	src/distrib/pmax/liveimage: Makefile
 	src/distrib/pmax/liveimage/emuimage: Makefile
 	src/distrib/sparc/liveimage: Makefile
 	src/distrib/sparc/liveimage/emuimage: Makefile
 	src/distrib/sparc64/liveimage: Makefile
 	src/distrib/sparc64/liveimage/emuimage: Makefile
 	src/distrib/sun2/liveimage: Makefile
 	src/distrib/sun2/liveimage/emuimage: Makefile
 	src/distrib/sun3/liveimage: Makefile
 	src/distrib/sun3/liveimage/emuimage: Makefile
 	src/distrib/vax/liveimage: Makefile
 	src/distrib/vax/liveimage/emuimage: Makefile

 Log Message:
 Add "live-image" and "install-image" target support to build.sh.

 "live-image" target builds pre-installed disk images that can be used on
 emulators or boot from USB memory sticks to try NetBSD without installation.
 Currently amd64, i386, pmax, sparc, sparc64, sun2, sun3, and vax
 (which have working emulators and don't require extra tools like preparing
  msdosfs or partitioning MD label structures) support this target.

 "install-image" target builds an bootable installation disk image that can
 be used as an install CD but burned into USB memory sticks etc.
 Current only amd64 and i386 (which would support USB boot) have this target.

 For more details (and known issue) see following posts on netbsd-bugs@:
 http://mail-index.NetBSD.org/netbsd-bugs/2011/08/06/msg023639.html
 http://mail-index.NetBSD.org/netbsd-bugs/2011/09/23/msg024207.html
 http://mail-index.NetBSD.org/netbsd-bugs/2011/12/07/msg025166.html
 http://mail-index.NetBSD.org/netbsd-bugs/2011/12/08/msg025178.html

 No particular comments about implementation, and
 "go ahead" comments from mrg@, riz@ and christos@.

 Closes PR toolchain/45153 and PR misc/45155.


 To generate a diff of this commit:
 cvs rdiff -u -r1.96 -r1.97 src/BUILDING
 cvs rdiff -u -r1.289 -r1.290 src/Makefile
 cvs rdiff -u -r1.252 -r1.253 src/build.sh
 cvs rdiff -u -r1.17 -r1.18 src/distrib/Makefile
 cvs rdiff -u -r1.9 -r1.10 src/distrib/Makefile.inc
 cvs rdiff -u -r1.5 -r1.6 src/distrib/amd64/Makefile
 cvs rdiff -u -r0 -r1.1 src/distrib/amd64/installimage/Makefile \
     src/distrib/amd64/installimage/boot.cfg.in \
     src/distrib/amd64/installimage/etc.rc \
     src/distrib/amd64/installimage/etc.ttys \
     src/distrib/amd64/installimage/install.sh \
     src/distrib/amd64/installimage/spec.inst
 cvs rdiff -u -r0 -r1.1 src/distrib/amd64/liveimage/Makefile \
     src/distrib/amd64/liveimage/Makefile.liveimage
 cvs rdiff -u -r0 -r1.1 src/distrib/amd64/liveimage/emuimage/Makefile
 cvs rdiff -u -r0 -r1.1 src/distrib/amd64/liveimage/usbimage/Makefile
 cvs rdiff -u -r1.18 -r1.19 src/distrib/common/Makefile.bootcd
 cvs rdiff -u -r0 -r1.1 src/distrib/common/bootimage/Makefile.bootimage \
     src/distrib/common/bootimage/Makefile.installimage \
     src/distrib/common/bootimage/Makefile.liveimage \
     src/distrib/common/bootimage/diskproto.in \
     src/distrib/common/bootimage/diskproto.mbr.in \
     src/distrib/common/bootimage/diskproto.noswap.in \
     src/distrib/common/bootimage/diskproto.noswap.mbr.in \
     src/distrib/common/bootimage/fstab.in \
     src/distrib/common/bootimage/fstab.install.in \
     src/distrib/common/bootimage/spec.in
 cvs rdiff -u -r1.8 -r1.9 src/distrib/i386/Makefile
 cvs rdiff -u -r0 -r1.1 src/distrib/i386/installimage/Makefile \
     src/distrib/i386/installimage/boot.cfg.in \
     src/distrib/i386/installimage/etc.rc \
     src/distrib/i386/installimage/etc.ttys \
     src/distrib/i386/installimage/install.sh \
     src/distrib/i386/installimage/spec.inst
 cvs rdiff -u -r0 -r1.1 src/distrib/i386/liveimage/Makefile \
     src/distrib/i386/liveimage/Makefile.liveimage
 cvs rdiff -u -r0 -r1.1 src/distrib/i386/liveimage/emuimage/Makefile
 cvs rdiff -u -r0 -r1.1 src/distrib/i386/liveimage/usbimage/Makefile
 cvs rdiff -u -r1.4 -r1.5 src/distrib/pmax/Makefile
 cvs rdiff -u -r0 -r1.1 src/distrib/pmax/liveimage/Makefile
 cvs rdiff -u -r0 -r1.1 src/distrib/pmax/liveimage/emuimage/Makefile
 cvs rdiff -u -r1.7 -r1.8 src/distrib/sparc/Makefile
 cvs rdiff -u -r0 -r1.1 src/distrib/sparc/liveimage/Makefile
 cvs rdiff -u -r0 -r1.1 src/distrib/sparc/liveimage/emuimage/Makefile
 cvs rdiff -u -r1.7 -r1.8 src/distrib/sparc64/Makefile
 cvs rdiff -u -r0 -r1.1 src/distrib/sparc64/liveimage/Makefile
 cvs rdiff -u -r0 -r1.1 src/distrib/sparc64/liveimage/emuimage/Makefile
 cvs rdiff -u -r1.9 -r1.10 src/distrib/sun2/Makefile
 cvs rdiff -u -r0 -r1.1 src/distrib/sun2/liveimage/Makefile
 cvs rdiff -u -r0 -r1.1 src/distrib/sun2/liveimage/emuimage/Makefile
 cvs rdiff -u -r1.10 -r1.11 src/distrib/sun3/Makefile
 cvs rdiff -u -r0 -r1.1 src/distrib/sun3/liveimage/Makefile
 cvs rdiff -u -r0 -r1.1 src/distrib/sun3/liveimage/emuimage/Makefile
 cvs rdiff -u -r1.18 -r1.19 src/distrib/vax/Makefile
 cvs rdiff -u -r0 -r1.1 src/distrib/vax/liveimage/Makefile
 cvs rdiff -u -r0 -r1.1 src/distrib/vax/liveimage/emuimage/Makefile
 cvs rdiff -u -r1.395 -r1.396 src/etc/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

Responsible-Changed-From-To: toolchain-manager->tsutsui
Responsible-Changed-By: tsutsui@NetBSD.org
Responsible-Changed-When: Sun, 22 Jan 2012 13:03:12 +0900
Responsible-Changed-Why:
as committer


State-Changed-From-To: open->feedback
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Sun, 22 Jan 2012 13:03:12 +0900
State-Changed-Why:
still needs review


From: "Alan Barrett" <apb@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/45153 CVS commit: src/doc
Date: Tue, 14 Feb 2012 21:19:19 +0000

 Module Name:	src
 Committed By:	apb
 Date:		Tue Feb 14 21:19:19 UTC 2012

 Modified Files:
 	src/doc: BUILDING.mdoc

 Log Message:
 Document build.sh "live-image" and "install-image" targets.

 These were documented in revision 1.97 of src/BUILDING, but were
 not documented in src/doc/BUILDING.sh.  The original log message
 was:

 revision 1.97
 date: 2012/01/22 03:53:32;  author: tsutsui;  state: Exp;  lines: +39 -0
 Add "live-image" and "install-image" target support to build.sh.

 "live-image" target builds pre-installed disk images that can be used on
 emulators or boot from USB memory sticks to try NetBSD without installation.
 Currently amd64, i386, pmax, sparc, sparc64, sun2, sun3, and vax
 (which have working emulators and don't require extra tools like preparing
  msdosfs or partitioning MD label structures) support this target.

 "install-image" target builds an bootable installation disk image that can
 be used as an install CD but burned into USB memory sticks etc.
 Current only amd64 and i386 (which would support USB boot) have this target.

 For more details (and known issue) see following posts on netbsd-bugs@:
 http://mail-index.NetBSD.org/netbsd-bugs/2011/08/06/msg023639.html
 http://mail-index.NetBSD.org/netbsd-bugs/2011/09/23/msg024207.html
 http://mail-index.NetBSD.org/netbsd-bugs/2011/12/07/msg025166.html
 http://mail-index.NetBSD.org/netbsd-bugs/2011/12/08/msg025178.html

 No particular comments about implementation, and
 "go ahead" comments from mrg@, riz@ and christos@.

 Closes PR toolchain/45153 and PR misc/45155.


 To generate a diff of this commit:
 cvs rdiff -u -r1.85 -r1.86 src/doc/BUILDING.mdoc

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: feedback->closed
State-Changed-By: tsutsui@NetBSD.org
State-Changed-When: Sun, 04 Mar 2012 15:01:20 +0900
State-Changed-Why:
No feedback more than a month. Design or implementation issue will be tracked
in new PRs.


>Unformatted:

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.