History log of /freebsd-current/release/amd64/mkisoimages.sh
Revision Date Author Comments
# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# cefe5879 15-Jul-2022 Jessica Clarke <jrtc27@FreeBSD.org>

release: Support GNU stat in mkisoimages.sh

BSD stat and GNU stat differ significantly when it comes to using a
custom format string, both in the option name and in the format string
itself. Handle both here (assuming Linux means GNU stat rather than BSD
stat).

Reviewed by: brooks, gjb
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D35814


# 1a9b1c36 28-Feb-2022 Jessica Clarke <jrtc27@FreeBSD.org>

release: Add support for building on non-FreeBSD

This requires two sets of changes. Firstly, for non-FreeBSD, we do not
know where tools are in PATH (and it is likely that some are not in
system directories and have been built as bootstrap tools during the
build), so we should leave PATH alone and trust the user. Secondly,
makefs needs a master.passwd for building images from a METALOG file, so
pass the directory in the image tree to makefs's -N option in order to
pick up a valid FreeBSD master.passwd; this is unnecessary on FreeBSD
(except in the edge case of building an image that refers to users or
groups not present in the host's database, which is unlikely but
technically possible) but harmless so can be done unconditionally.

Reviewed by: brooks, emaste, gjb
Differential Revision: https://reviews.freebsd.org/D34001


# 13cb0041 28-Feb-2022 Jessica Clarke <jrtc27@FreeBSD.org>

release: Support -DNO_ROOT image building

This requires a bunch of METALOG mangling to include the files we inject
into the tree. The mkisoimages.sh and make-memstick.sh scripts are now
called with the current directory inside the tree so that the relative
paths in the METALOG match up with the current directory. The scripts do
not require this when not using a METALOG, but for simplicity we always
do so. The Makefile mangles the real METALOG created from the install,
as those files are shared across all uses of the tree, but the shell
scripts create a temporary copy of the METALOG that they mangle as their
tree modifications are specific to that image. We also need to pass -D
to makefs to turn any duplicate METALOG entry errors into warnings, as
we have many (harmless) instances of those.

Whilst dvd1.iso should work, the !NOPKG code will need more work to
support this.

All media will also lack mergemaster and etcupdate trees, since more
work is needed to add -DNO_ROOT modes to them. Users of install media
built this way will have to manually bootstrap them.

Reviewed by: brooks, gjb
Differential Revision: https://reviews.freebsd.org/D33999


# 045c8f52 28-Feb-2022 Jessica Clarke <jrtc27@FreeBSD.org>

mkisoimages.sh: Avoid creating temporary files in the current directory

Currently the current directory is the parent of the rootfs directory,
but this will change in order to support NO_ROOT builds that use a
metalog manifest, since those need to have the current directory be the
rootfs itself in order for the relative paths to be correct, and we do
not want the non-METALOG case (which passes the directory to makefs) to
pick up leftover temporary .img files from a previous failed build.

Reviewed by: brooks, emaste, gjb
Differential Revision: https://reviews.freebsd.org/D33998


# 90d2f7c4 26-Mar-2021 Emmanuel Vadot <manu@FreeBSD.org>

release: amd64: Fix ISO/USB hybrid image

Recent mkimg changes forces to have partitions given in explicit order.
This is so we can have the first partition starting at a specific offset
and the next ones starting after without having to specify an offset.
Switch the partition in the mkisoimage.sh script so the first one created
is the isoboot one.

PR: 254490
Reported by: Michael Dexter <editor@callfortesting.org
Tested by: Vincent Milum Jr <freebsd@darkain.com>
MFC after: Right now


# bdccfea1 15-Oct-2020 Glen Barber <gjb@FreeBSD.org>

Bump the ISO EFI partition size from 1024 to 2048, following r366732.

Suggested by: imp
Sponsored by: Rubicon Communications, LLC (netgate.com)


# a0da9a62 15-Oct-2020 Glen Barber <gjb@FreeBSD.org>

Increase the amd64 ISO ESP file size from 800KB to 1024KB.

At some poing over the last week, the bootx64.efi file has grown
past the 800KB threshold, resulting in being unable to copy it to
the EFI/BOOT directory.

# stat -f %z efiboot.znWo7m
819200
# stat -f %z stand-test.PIEugN/EFI/BOOT/bootx64.efi
842752

The comment in the script that creates the ISOs suggests that 800KB
is the maximum allowed for the boot code, however I was able to
boot an ISO with a 1024KB boot partition. Additionally, I verified
against an ISO from OtherOS, where the boot EFI partition is 2.4MB.

Sponsored by: Rubicon Communications, LLC (netgate.com)


# 14113f12 03-Sep-2019 Matt Macy <mmacy@FreeBSD.org>

Use makefs -t msdos in make_esp_file

With this last piece in place, make -C /usr/src/release release.iso is
finally able to run in a jail. This was not possible before because
msdosfs cannot be mounted inside a jail.

Submitted by: ryan@ixsystems.com
Reviewed by: emaste@, imp@, gjb@
MFC after: 1 week
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D21385


# db8b5613 20-Dec-2018 Rebecca Cran <bcran@FreeBSD.org>

Rework UEFI ESP generation

Currently, the installer uses pre-created 800KB FAT12 filesystems that
it dd's onto the ESP partition.
This changeset improves that by having the installer generate a FAT32
filesystem directly onto the ESP using newfs_msdos and then copying
loader.efi into /EFI/freebsd.
For live installs it then runs efibootmgr to add a FreeBSD boot entry
in the BIOS.

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D17947


# 709bc7e0 03-Dec-2018 Yuri Pankov <yuripv@FreeBSD.org>

mkisoimages.sh: don't use -p flag when copying loader.efi to msdosfs.

This fixes 'cdrom' target in the case when world was built by user,
and not root.

Reviewed by: imp
Differential revision: https://reviews.freebsd.org/D18414


# a7d9306a 22-Oct-2018 Ed Maste <emaste@FreeBSD.org>

release: set -e to exit on error in iso image scripts

Reviewed by: gjb
Differential Revision: https://reviews.freebsd.org/D17651


# 470f228f 07-Jun-2018 Marius Strobl <marius@FreeBSD.org>

- Once we have shifted arguments up to thrice, base-bits-dir is $1 rather
than $4. Introduce $BASEBITSDIR for clarity and to avoid repeating this
mistake in the future. Fixing this ensures that we pick up newly built
boot bits native to the target rather for/from the host.
- Apply some of the argument quoting fixes done in r287635 but missing in
later revisions.


# 6ea29847 25-Apr-2018 Benno Rice <benno@FreeBSD.org>

Allow etdump, makefs and mkimg to be overridden.

Recent changes to makefs and mkimg have led to situations where the
disconnect between this script and the versions installed on the host cause
failures. Provide a way to work around this that doesn't require the
installation of new versions to the host system if that's not desired.

With this change mkisoimages.sh will honour the $ETDUMP, $MAKEFS and $MKIMG
environment variables but fall back to the previous behaviour of finding them
within $PATH.

Reviewed by: gjb
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D15181


# 0279ac04 17-Apr-2018 Benno Rice <benno@FreeBSD.org>

Generate hybrid ISO images for amd64.

This keeps the existing El Torito entries for BIOS and UEFI boot code and
adds a GPT in the ISO image's System Area containing boot code for BIOS that
will load /boot/loader from the ISO filesystem and execute it. We then use
etdump to find the EFI System Partition image in the El Torito catalog and
add an entry to the GPT that allows EFI to find it.

Reviewed by: gjb, imp
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D15051


# eb5c1940 09-Apr-2018 Benno Rice <benno@FreeBSD.org>

Fix the position of $bootable so that -o platformid=efi applies correctly.

Sponsored by: iXsystems, Inc.
Pointy hat to: benno (again)


# d4bb7978 09-Apr-2018 Benno Rice <benno@FreeBSD.org>

Fix makefs invocation after r331843.

Reported by: gjb
Reviewed by: gjb
Sponsored by: iXsystems, Inc.
Pointy hat to: benno


# 8dbc3905 23-Mar-2018 Benno Rice <benno@FreeBSD.org>

Allow makefs to properly tag UEFI El Torito boot images. Use them in amd64 ISOs.

UEFI booting requires an EFI System Partition (ESP). On most storage devices
this will be in a specific partition type. To allow booting from CD/ISO
filesystems, UEFI will look for an ESP in the form of a FAT filesystem image
embedded in the image. Historically FreeBSD has added one of these to its
amd64 ISO images but marked it as simply another i386 boot image. Luckily for
us most UEFI implementations are rather forgiving and work this out for us.

This change adds the ability to mark a boot image as being a UEFI image. It
also modifies our ISO generation to use this marking for the UEFI image we
embed.

Reported by: Thomas Schmitt <scdbackup@gmx.net>
Reviewed by: emaste, imp
MFC after: 1 week
Sponsored by: iXsystems, Inc.
Differential Revision: https://reviews.freebsd.org/D14809


# a2aef24a 29-Oct-2017 Eitan Adler <eadler@FreeBSD.org>

Update several more URLs

- Primarily http -> https
- Primarily FreeBSD project URLs


# 93cf995a 04-Sep-2017 Ed Maste <emaste@FreeBSD.org>

mkisoimages.sh: remove obsolete x$var convention

Ancient shells had trouble with empty variables but this has not been
relevant for FreeBSD for a very long time (decades?).


# 88b85228 13-Jan-2016 Steven Hartland <smh@FreeBSD.org>

Increase efiboot.img size used in ISO creation

Due to recent and upcoming changes to add additional functionality to
the EFI loader its now bigger than the space allocates for efiboot.img
so increase this in line with boot1.efifat.

MFC after: 2 weeks
X-MFC-With: r293268
Sponsored by: Multiplay


# 88343186 05-Jan-2016 Glen Barber <gjb@FreeBSD.org>

Merge ^/projects/release-install-debug:

- Rework MANIFEST generation and parsing via bsdinstall(8).
- Allow selecting debugging distribution sets during install.
- Rework bsdinstall(8) to fetch remote debug distribution sets
when they are not available on the local install medium.
- Allow selecting additional non-GENERIC kernels during install.
At present, GENERIC is still required, and installed by default.

Tested with: head@r293203
Sponsored by: The FreeBSD Foundation


# 27065039 10-Sep-2015 Devin Teske <dteske@FreeBSD.org>

Fix argument quoting and remove unnecessary braces

MFC after: 3 weeks
X-MFC-to: stable/10


# 7fad9ac9 02-Jul-2014 Nathan Whitehorn <nwhitehorn@FreeBSD.org>

Now that GENERIC can boot on UEFI systems (r268158), switch the build to use
UEFI-compatible images. These will boot as before on BIOS systems, but will
boot using the UEFI loader on UEFI-aware systems.


# de17cbcc 03-Feb-2013 Hiroki Sato <hrs@FreeBSD.org>

- Add CHECKSUM.* support in Makefile[1].
- Use ln -fs to create a symlink.
- Remove pkgadd for docports.
- Use WITHOUT_JADETEX=yes instead of WITH_JADETEX=no.
- Add {WORLD,KERNEL}_FLAGS to [BTWK]MAKE.
- Use makefs(8) and gpart(8) for sparc64 ISO image[2].
- Add publisher option to makefs(8)[2].

Based on work by: gjb[1]
Discussed with: marius, nwhitehorn[2]


# 0e4b6f5e 08-Jan-2013 Hiroki Sato <hrs@FreeBSD.org>

ISO 9660 specification allows only "d-characters" and "a-characters" in the
Volume Descriptor (section 7.4). In short, upper-case alphanumeric + some
symbols only. While the makefs utility automatically converts the characters,
$LABEL should be consistent in the scripts.


# eadacd13 05-May-2011 Nathan Whitehorn <nwhitehorn@FreeBSD.org>

Garbage collect some unused variables and stray debug code.

Submitted by: marius


# cf6ba592 04-May-2011 Nathan Whitehorn <nwhitehorn@FreeBSD.org>

Repair release CD generation on PC98 and sun4v after release building
changes, and backport the new logic (ISO images are TARGET dependant, not
TARGET_CPUARCH dependant) to Makefile.sysinstall. While modifying ISO
image scripts, change several archs to use makefs (from base) instead of
mkisofs (from ports) which makes release CD generation both faster and
self-hosting.


# 0877c11e 21-Mar-2011 Nathan Whitehorn <nwhitehorn@FreeBSD.org>

Use labels to find release media instead of hard-coded device paths. This
makes booting more reliable (and working at all on USB sticks). While here,
move responsibility for setting up fstab into the various platform mk-*.sh
scripts.

Suggested by: many


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 92536187 30-Jan-2005 Ken Smith <kensmith@FreeBSD.org>

The current version of mkisofs is warning us that the -P option will
be changing with the next version, and we should be using -publisher
instead.

Also warned by: trhodes
MFC after: 1 week


# f0096481 15-Jul-2004 Murray Stokely <murray@FreeBSD.org>

Add a publisher variable with the URL for the FreeBSD Project, and put
this into the ISO headers by specifying the -P option to mkisofs.

Obtained from: share/examples/worm/makecdfs.sh


# 57a3bc41 12-Jul-2004 Kris Kennaway <kris@FreeBSD.org>

Set BATCH=yes to avoid bumping into interactivity in the port builds.

XXX /usr/ports is still hardcoded, should be ${PORTSDIR}


# 156b04cc 02-Jun-2004 Marius Strobl <marius@FreeBSD.org>

mkisofs(8) is now installed by sysutils/cdrtools.

This will be instantly MFC'ed.


# 64973963 11-Apr-2002 John Baldwin <jhb@FreeBSD.org>

Switch to using cdboot for booting i386 CD's by default.

Approved by: murray


# e4e61f78 24-Jan-2002 Murray Stokely <murray@FreeBSD.org>

Providing long filename support on the Macintosh requires over 30
megabytes of additional space on the install CD. Given our premium
for space, I don't think this is a wise use of 30MB. HFS support was
not provided on the FreeBSD 4.4 CDs and I received a grand total of 0
complaints.


# 074aec36 03-Sep-2001 David E. O'Brien <obrien@FreeBSD.org>

Try to build `mkisofs' first, and only `pkg_add -r' if you cannot.


# d0f44c4d 03-Sep-2001 David E. O'Brien <obrien@FreeBSD.org>

Fix my backwards logic.

Submitted by: dirk


# 9c2ee316 20-Aug-2001 David E. O'Brien <obrien@FreeBSD.org>

+ do not hard code where a port may be installed to
+ uses `mkisofs' rather than `mkhybrid' as the new mkisofs is the merger
of the two
+ checks for `setcdboot's existsance and tries to pkg_add it if needed
+ removes English contraction

Approved by: jkh


# 2ef74d22 23-Jul-2001 Jordan K. Hubbard <jkh@FreeBSD.org>

Add scripts and Makefile support for building ISO images automatically
as part of the release if MAKE_ISOS is set. Will also build the
first CD with packages (in addition to the "minimal" CD) if CD_EXTRA_BITS
points to them. This probably need a bit more work to get fully useful,
but it at least covers the basics for now.