From owner-freebsd-questions@FreeBSD.ORG Wed Aug 27 22:04:46 2014 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 906592CA for ; Wed, 27 Aug 2014 22:04:46 +0000 (UTC) Received: from smtp-vbr14.xs4all.nl (smtp-vbr14.xs4all.nl [194.109.24.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 414BD3332 for ; Wed, 27 Aug 2014 22:04:45 +0000 (UTC) Received: from slackbox.erewhon.home (slackbox.xs4all.nl [83.162.243.5]) by smtp-vbr14.xs4all.nl (8.13.8/8.13.8) with ESMTP id s7RM4gGs018451; Thu, 28 Aug 2014 00:04:43 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.erewhon.home (Postfix, from userid 1001) id AE83E1239B; Thu, 28 Aug 2014 00:04:42 +0200 (CEST) Date: Thu, 28 Aug 2014 00:04:42 +0200 From: Roland Smith To: "Martin G. McCormick" Subject: Re: Recreating the FreeBSD Installation Disks Message-ID: <20140827220442.GA5170@slackbox.erewhon.home> References: <20140827142517.CF67A228B7@server1.shellworld.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="n8g4imXOkfNTN/H1" Content-Disposition: inline In-Reply-To: <20140827142517.CF67A228B7@server1.shellworld.net> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.23 (2014-03-12) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: "questions@freebsd.org" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Aug 2014 22:04:46 -0000 --n8g4imXOkfNTN/H1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Aug 27, 2014 at 09:25:17AM -0500, Martin G. McCormick wrote: > I have been asking lots of questions recently about > whether the procedure for building a custom FreeBSD installation > CD has changed and it apparently has not but the problem I am > having is not hard to define. > The original image downloaded from freebsd.org is: > FreeBSD-9.1-RELEASE-amd64-disc1.iso and it is > 718862336 bytes large. > I mounted it on a FreeBSD9 system as follows: > ##Set up memory disk. > # mdconfig -f FreeBSD-9.1-RELEASE-amd64-disc1.iso -u 1 > ##Mount it. > #mount -t cd9660 /dev/md1 /mnt2 > Everything looks normal if you ls /mnt2. > If one was to use mkisofs with /mnt2 as the top of the tree, a > new iso image file should appear somewhere that is about the > same size as the starting ISO file. As a test to see if this > happens, I did the following: > # mkisofs -J -R -V customBSD -no-emul-boot -b boot/cdboot -iso-level 3 = -o \ > #/home/martin/tmp/serialcd64.iso . > #ls -l /home/martin/serialcd64.iso > -rw-r--r-- 1 root martin 833892352 Aug 26 10:48 serialcd64.iso >=20 > Man! I sure wish my pay check could do that after a week of > living. > I know that hard links will make tar and rsync produce > larger outputs if not called correctly. My understanding is that > hard links are multiple sets of inode numbers pointing to the > same files so they are hard to mechanically distinguish from > actual disk space being occupied by the same data in more than > one spot. Looking at the mkisofs manpage, it *should* detect hard links by default. D= oes using the `-cache-inodes` option make any difference? > When one needs to make a custom CD, the extremely > difficult part is recreating the steps that were used to > originally build the image. =46rom the Makefile in /usr/src/release, it seems that you have to run `make buildworld buildkernel` from /usr/src, and then `make dvdrom` from /usr/src/release. Another avenue to pursue is to mount the existing CD image using md, and use nullfs and unionfs to create a writable filesystem. I've used that trick to e.g. share /usr/ports in different jails without copying the whole thing: http://rsmith.home.xs4all.nl/freebsd/using-nullfs-and-unionfs-for-the-ports= -tree-in-a-jail.html After you've modified/added what you want, you can create a new DVD. Roland --=20 R.F.Smith http://rsmith.home.xs4all.nl/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 5753 3324 1661 B0FE 8D93 FCED 40F6 D5DC A38A 33E0 (keyID: A38A33E0) --n8g4imXOkfNTN/H1 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJT/lX6AAoJEED21dyjijPgFNYP/1s+DBWodiU7wR1oO05qbNbV jd1jYDm96PtfevU8JhCIGWoFbJQXaSMwnEriWhyvJ1SafncN2HbAyD5mbB2CTYyJ ikIOcQc/arJgReaHmYkWIEn91izCOdYz86Aj0Mk6dy9Lh0kMP2gG/tQmspf1NSG9 jFR3yC65xw/WvMZduKzYSHn8ws7SIapxFKc+k5ZPJtCHvyZrFoU8G5mytVm/PwpD WOuY6biJH3RmP6Xp0BZp8R1jXH8shWG3TZa3Yuc0d4HmEiyvEe9R3JJrj4oa+Y8C wk9NZHiilvQ0jTZcNyyxbk1vpm+x/Qog19anWA7wdOO2W4CL7bgn2F8Rd4qpND+9 pqQZYtZYBEyByHXzvZXUwpPhS76G0hArUkxUdhlBS1rZEhiW71nKM/quJD1wL+3y QVEId2tiuNObDij57RPTHgdjfR84WxO6bJ6j3HkYhgO1Z6POyaWkoXkmFDRcxuTh CdiurjfulRPdJGGSuFlHqL766GEgzJP7egil0G+KRFGRUE/rFtPDleGH6xyCeDe+ yN7lyRXOtqC+pW7U+F0Q1Dr4prCgrrLFfm7fI+TOEufPnXwlKIbkxrHgUu9wOJZh T07gjY7cUINQPvQ7zpaCytrNgwKK4bs1PB00N4T7OOGfvRDEtwk2vE6hyjO17w3Z D8pFBipgX1HjVKZMSaQe =Dkfo -----END PGP SIGNATURE----- --n8g4imXOkfNTN/H1--