From owner-freebsd-questions@FreeBSD.ORG Tue May 15 08:28:42 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 9AE1F106566B for ; Tue, 15 May 2012 08:28:42 +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 59E538FC0C for ; Tue, 15 May 2012 08:28:42 +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 D89F63CFDD; Tue, 15 May 2012 10:28:39 +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 q4F8SdSm002023; Tue, 15 May 2012 10:28:39 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Tue, 15 May 2012 10:28:38 +0200 From: Polytropon To: "Thomas Mueller" Message-Id: <20120515102838.de3a2a40.freebsd@edvax.de> In-Reply-To: <83.5C.10195.F37A1BF4@smtp02.insight.synacor.com> References: <83.5C.10195.F37A1BF4@smtp02.insight.synacor.com> 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: Tue, 15 May 2012 08:28:42 -0000 On Mon, 14 May 2012 20:45:51 -0400, Thomas Mueller wrote: > I guess after the first installkernel, to default location, > I should immediately make installkernel again, this time with > DESTDIR=/mnt? That should be possible, you only have to make sure that both "install targets" are fine with the kernel you just built (e. g. both i386 _or_ amd64). > 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. > 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. > After that, I would do "mergemaster -i" followed by > "mergemaster -i -D /mnt"? And then make delete-old followed > by "DESTDIR=/mnt make delete-old"? It should be possible to pass DESTDIR= to make instead of "prefixing" make with it. The parameter seems to be applied for _any_ of the targets (as long as it would affect that target). You can add additional parameters to the mergemaster examples above (such as -i). > Would I need to do "make distribution"? I don't think so, unless you want to create a distribution media. > First time, "make installkernel DESTDIR=/mnt" only installed part. What parts (of the kernel set) have been installed? To observe differences, it might be helpful to save a `ls` or `ls -lR` output before and after the installation and compare them. > 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. > Maybe some of the files were cleaned out? I'm not sure in how far the install* targets to remove files. I suppose they will overwrite files if required... > It is surely useful to have a rescue backup, considering the > possibility of an update going awry on the main installation. That's right. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...