From owner-freebsd-questions@FreeBSD.ORG Wed May 16 22:57:24 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B77FA106566C for ; Wed, 16 May 2012 22:57:24 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 48E088FC0A for ; Wed, 16 May 2012 22:57:24 +0000 (UTC) Received: from r56.edvax.de (port-92-195-20-192.dynamic.qsc.de [92.195.20.192]) by mx01.qsc.de (Postfix) with ESMTP id 1305C3D6C3; Thu, 17 May 2012 00:57:21 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id q4GMvLAJ007199; Thu, 17 May 2012 00:57:21 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Thu, 17 May 2012 00:57:21 +0200 From: Polytropon To: "Thomas Mueller" Message-Id: <20120517005721.f971407e.freebsd@edvax.de> In-Reply-To: References: Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Building FreeBSD to install or update in two DESTDIRs X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 May 2012 22:57:24 -0000 On Wed, 16 May 2012 18:46:28 -0400, Thomas Mueller wrote: > > > The idea was to "make buildkernel" once and "make buildworld" once > > > and install to two different DESTDIRs. > > > I'm not sure I understand: The two install* targets ("make installkernel" > > and "make installworld") are only able to install to _one_ location, > > which is the _default_ location *or* the location pointed to by > > DESTDIR. It is not possible to perform _one_ install step which > > will cause results in _two_ locations (without any means of > > "hidden duplication", e. g. by using a mirroring technique). > > The idea was to "make buildkernel" once and "make buildworld" once, > but "make installkernel" and "make installworld" would each have > to be done once for each DESTDIR, meaning twice each. Building > takes much more computer resources than installing, so I try to > avoid building the same thing twice. Yes, _that_ is the correct approach. In case you need to do more than one additional installation, you should consider creating a tar archive of the fully installed system and then use tar --unlink to the mounted target. If you need to create many bootable systems from scratch, a script performing the disklabel, newfs, mount and tar steps should be easy to write. > > I'm refering to the instructions presented in /usr/src/Makefile: > > > # For individuals wanting to upgrade their sources (even if only a > > # delta of a few days): > > # > > # 1. `cd /usr/src' (or to the directory containing your source tree). > > # 2. `make buildworld' > > # 3. `make buildkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC). > > # 4. `make installkernel KERNCONF=YOUR_KERNEL_HERE' (default is GENERIC). > > # [steps 3. & 4. can be combined by using the "kernel" target] > > # 5. `reboot' (in single user mode: boot -s from the loader prompt). > > # 6. `mergemaster -p' > > # 7. `make installworld' > > # 8. `make delete-old' > > # 9. `mergemaster' (you may wish to use -i, along with -U or -F). > > # 10. `reboot' > > # 11. `make delete-old-libs' (in case no 3rd party program uses them anymore) > > I checked /usr/src/UPDATING, and the sequence was > > ... > > mergemaster -p > make installworld > mergemaster -i (one may wish also -U) > make delete-old > > > I checked /usr/src/Makefile , and found you quoted correctly, > see 'make delete-old' and the second 'mergemaster' are transposed > relative to what I saw in /usr/src/UPDATING > > Sort of confusing; make either way works? It should not be much difference if you consider what the "steps in permutation" do: mergemaster modifies files, make delete-old removes stuff that isn't needed anymore. Both steps don't seem to affect each other. a + b = b + a. :-) > Subsequently I would also want to build for i386, but this > would be after the amd64 build and installation/update. In case you're creating different TARGET= architectures, the fun doubles. :-) > It would be nice if bsdinstall had an option for update as > well as fresh install. This step can easily be performed manually using freebsd-update right after installation. If you understand update == overwrite, just don't format the partitions that are already present on the target media. > For i386, I would follow advice on http://wiki.freebsd.org/Wine > but would want a full installation capable of running > independently of amd64, would need the kernel, would install > on 16 GB USB stick which could be mounted on /compat/i386. > I would want to use hard-drive PORTSDIR, would need to so > adjust /etc/make.conf . I don't really want to think of > building big ports on a USB stick, especially on the older > computer with 256 MB RAM and USB 1.1 on motherboard. Also note that USB sticks are "not real R/W media", they suffer more from using than hard disks do, and they're slower of course. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...