From owner-freebsd-current@FreeBSD.ORG Thu Jan 1 11:48:42 2015 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B764A567 for ; Thu, 1 Jan 2015 11:48:42 +0000 (UTC) Received: from ms-10.1blu.de (ms-10.1blu.de [178.254.4.101]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73F4F660C3 for ; Thu, 1 Jan 2015 11:48:42 +0000 (UTC) Received: from [93.104.13.226] (helo=unixarea.DDR.dd) by ms-10.1blu.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1Y6eEz-0001mr-MD for freebsd-current@freebsd.org; Thu, 01 Jan 2015 12:48:33 +0100 Received: from unixarea.DDR.dd (localhost [127.0.0.1]) by unixarea.DDR.dd (8.14.9/8.14.3) with ESMTP id t01BmVtY003224 for ; Thu, 1 Jan 2015 12:48:31 +0100 (CET) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by unixarea.DDR.dd (8.14.9/8.14.3/Submit) id t01BmUwE003223 for freebsd-current@freebsd.org; Thu, 1 Jan 2015 12:48:30 +0100 (CET) (envelope-from guru@unixarea.de) X-Authentication-Warning: unixarea.DDR.dd: guru set sender to guru@unixarea.de using -f Date: Thu, 1 Jan 2015 12:48:30 +0100 From: Matthias Apitz To: freebsd-current@freebsd.org Subject: makefs && gpart (...) Message-ID: <20150101114829.GA3196@unixarea.DDR.dd> Reply-To: Matthias Apitz Mail-Followup-To: Matthias Apitz , freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Operating-System: FreeBSD 11.0-CURRENT r269739 (i386) User-Agent: Mutt/1.5.23 (2014-03-12) X-Con-Id: 51246 X-Con-U: 0-guru X-Originating-IP: 93.104.13.226 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2015 11:48:42 -0000 Hello, I have a small question and a small request re/ makefs && gpart: There is a script src/release/i386/make-memstick.sh to create an image from a full directory tree; the tree is result of make installworld DESTDIR=/tree make installkernel DESTDIR=/tree the script mainly does: ... makefs -B little -o label=FreeBSD_Install ${2} ${1} if [ $? -ne 0 ]; then echo "makefs failed" exit 1 fi rm ${1}/etc/fstab unit=$(mdconfig -a -t vnode -f ${2}) if [ $? -ne 0 ]; then echo "mdconfig failed" exit 1 fi gpart create -s BSD ${unit} gpart bootcode -b ${1}/boot/boot ${unit} gpart add -t freebsd-ufs ${unit} mdconfig -d -u ${unit} As you can see, it does makefs first, and after this it creates the gpart structure in the image (i.e. in its memory file system). Why is this in this order and where exactly starts the file system created by makefs? The request is: it would also be nice if 'make-memstick.sh' would allow to pass from the command line some values for the size of the file system to be created in the image; I modified it to fit my needs as: size=15482880b ... makefs -B little -M ${size} -m ${size} -f 400000 .... Thanks matthias -- Matthias Apitz, guru@unixarea.de, http://www.unixarea.de/ +49-170-4527211 1989-2014: The Wall was torn down so that we go to war together again. El Muro ha sido derribado para que nos unimos en ir a la guerra otra vez. Diese Grenze wurde aufgehoben damit wir gemeinsam wieder in den Krieg ziehen.