Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Dec 2013 05:12:20 +0000
From:      "Teske, Devin" <Devin.Teske@fisglobal.com>
To:        Pavel Timofeev <timp87@gmail.com>
Cc:        Devin Teske <dteske@freebsd.org>, freebsd-stable stable <freebsd-stable@freebsd.org>, "Teske, Devin" <Devin.Teske@fisglobal.com>
Subject:   Re: 10.0-BETA4 bsdinstall zfs encryption broken
Message-ID:  <DC06E8AD-4C7B-4FCA-BDC6-470EC7F8C917@fisglobal.com>
In-Reply-To: <BB420342-E706-4A47-B6C8-C0F6989494E8@fisglobal.com>
References:  <CAAoTqfu904a=W8zZ_170bjVUUeqxe-Jajo_W=g%2BU2vk%2BwTdaeg@mail.gmail.com> <099CD122-B7D8-4FC1-9C99-F19248418CD0@fisglobal.com> <CAAoTqftxt74DEWjxeYtpaiavqiuj8_gawY4%2BGpHirWM-FPaKQQ@mail.gmail.com> <A7DF3606-B33E-4117-A1DB-FE759E0A0E5F@fisglobal.com> <CAAoTqfvaPb4go_d7aeU0sepmPAGey1WuAtxVYsour11DVTguBQ@mail.gmail.com> <BB420342-E706-4A47-B6C8-C0F6989494E8@fisglobal.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]

On Dec 4, 2013, at 8:04 AM, Devin Teske wrote:

> On Dec 4, 2013, at 7:54 AM, Pavel Timofeev wrote:
>
>> Great! But I don't know how to build new iso from source and check
>> this patch =(.
>
> I can help you with that later tonight.
>
> The procedure I use is to take the existing ISO and...
>
> 1. use mdconfig to access it
> 2. use mount_cd9660 to mount it
> 3. use rsync to copy the contents to a local dir
> 4. use patch to patch the files
> 5. use makefs to roll the new files into a new ISO
>
> I've got a makefile that does the last step.
> But I won't be back until later tonight.
>

I've attached the Makefile that I'm using as-of today
which rejects the use of rsync and instead uses UnionFS.

I found this to be more efficient as I'm running out of disk
space on this VM/laptop.


--
Devin

_____________
The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.

[-- Attachment #2 --]
############################################################ IDENT(1)
#
# $Title: Makefile for customizing a FreeBSD ISO using UnionFS and makefs(8) $
#
############################################################ CONFIGURATION

ISO_OLD=	FreeBSD-10.0-RC1-amd64-disc1.iso
ISO_NEW=	/nfs/test.iso

MOUNT=	iso
AUX=	new_iso
SR=	sudo

############################################################ TARGETS

.PHONY: all conditional_mount mounted not_mounted open close clean

all: conditional_mount
	@echo "Making $(ISO_NEW)..."
	$(SR) makefs -t cd9660 \
		-o rockridge \
		-o bootimage="i386;/boot/cdboot" \
		-o no-emul-boot \
		-o publisher=test \
		-o label=FREEBSD_INSTALL \
		$(ISO_NEW) $(MOUNT)/
	@echo "ALERT! Don't forget to say \`$(MAKE) close' when done!" >&2

conditional_mount:
	@$(MAKE) $$MAKEFLAGS mounted > /dev/null 2>&1 || \
		{ echo "Not open; opening..."; $(MAKE) $$MAKEFLAGS open; }

mounted:
	@[ "$$( mount | awk '$$3~"/$(MOUNT)$$"' )" ] || \
		{ echo "Not open; say \`$(MAKE) open'" >&2; false; }

not_mounted:
	@[ ! "$$( mount | awk '$$3~"/$(MOUNT)$$"' )" ] || \
		{ echo "Already open; say \`$(MAKE)'" >&2; false; }

open: not_mounted
	unit=$$( $(SR) mdconfig -f $(ISO_OLD) ) && \
		$(SR) mount_cd9660 -o ro /dev/$$unit $(MOUNT) && \
		$(SR) mount_unionfs -o rw,noatime $(AUX) $(MOUNT)

close: mounted
	$(SR) umount $(MOUNT)
	unit=$$( mount | awk \
		'$$3~"/$(MOUNT)$$"&&$$1~"/dev/md"{ \
			sub(".*/md","",$$1);print $$1 \
		}' ) && \
		$(SR) umount $(MOUNT) && \
		$(SR) mdconfig -d -u $$unit

clean: close
	$(SR) rm -f $(ISO_NEW)

distclean: clean
	$(SR) rm -f $(ISO_OLD)

################################################################################
# END
################################################################################
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DC06E8AD-4C7B-4FCA-BDC6-470EC7F8C917>