From owner-freebsd-questions@FreeBSD.ORG Wed May 16 14:17:02 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF5691065674 for ; Wed, 16 May 2012 14:17:02 +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 6E3EE8FC0A for ; Wed, 16 May 2012 14:17:02 +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 248EE3DC37; Wed, 16 May 2012 16:17:01 +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 q4GEH0EB001891; Wed, 16 May 2012 16:17:00 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Wed, 16 May 2012 16:17:00 +0200 From: Polytropon To: "Thomas Mueller" Message-Id: <20120516161700.301fd26c.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: Polytropon , 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 14:17:03 -0000 On Wed, 16 May 2012 03:13:10 -0400, Thomas Mueller wrote: > > > Better to "make buildkernel" and "make installkernel" as two > > > separate steps, rather than "make kernel"? > > > Yes. You only need to "make buildkernel" once, then "make installkernel" > > for both $DESTDIRs. > > 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). > > > After rebooting single-user, do "mergemaster -p", > > > then "mergemaster -p -D /mnt", and then "make installworld" and > > > immediately following that, "make installworld DESTDIR=/mnt" ? > > > Refer to the commend header in /usr/src/Makefile for the > > correct procedure. Without having it tested, the following > > commands in SUM (after you have successfully installed the > > new kernels) should work as intended: > > > # merpemaster -p > > # make installworld > > # make delete-old > > # mergemaster > > > # merpemaster -p -D /mnt > > # make installworld DESTDIR=/mnt > > # make delete-old DESTDIR=/mnt > > # mergemaster -D /mnt > > > # reboot > > > Also see the comment regarding "make delete-old-libs" to be > > applied after reboot correspondingly. > > I assume your "merpemaster" is a typo for "mergemaster"? Ah yes, the well-known "P next to G typing error", procreated by copy & paste. :-) > I would have done each step for main installation and then for > USB stick (DESTDIR=/mnt) before going to the next step, or > maybe that doesn't really matter? The order of targets does not matter. However, the order of steps _per_ target does matter (e. g. "make installkernel" first, _then_ "installworld" - it matters as soon as you boot). > I think the second "mergemaster" was supposed to be done > before "make delete-old", or maybe that doesn't really matter > either? 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) That means: "mergemaster -p" before installing world, "mergemaster" (maybe with additional options) after installing world. I think the delete-old and delete-old-libs steps can also be performed at the end of the whole process. But doing what the instructions say has always been the most comfortable way of avoiding trouble. :-) > > > I installed to USB stick only after fully upgrading on main > > > installation, finally copied /boot/kernel directory, and that > > > USB stick is now bootable. So now I know how to make a USB > > > stick bootable with GPT. > > > Maybe kernel modules for GPT have been missing? Check /etc/src.conf > > for any strange settings, see "man 3 src.conf" for details. You > > can use this file to customize and "tweak" your builds. > > I think I must have all GPT modules there; I have no trouble > accessing hard-disk partitions, and USB stick when partitioned GPT. > > I might want to prevent building ulpt module because of hplip > and HP 1212nf MFP printer idiosyncrasies, though that may or > may not make any difference. > > I could also prevent building other modules that would not be used. There are several means you can use for this: a custom kernel configuration, settings in /etc/src.conf, settings in /boot/loader.conf. It should not _require_ you to deal with a custom kernel if you want to avoid that. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...