Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
c259d69
Use geom_rowr
probonopd May 2, 2021
3ffe7de
Add geom_rowr kernel module for combining read-only with read-write d…
probonopd May 2, 2021
ebad506
Fix extra quotes
probonopd May 2, 2021
955c860
Fix missing $
probonopd May 2, 2021
eb36567
Update build.sh
probonopd May 2, 2021
f15e198
Copy the 'geom' command and its dependencies into the ramdisk
probonopd May 2, 2021
7a89284
ld-elf.so.1
probonopd May 2, 2021
3aa68d9
'b' suffix to the mdconfig -s option
probonopd May 2, 2021
9c4c2fa
Fix localize
probonopd May 2, 2021
f3fff81
if sys.platform.startswith('freebsd')
probonopd May 2, 2021
f54bd32
if sys.platform.startswith('freebsd')
probonopd May 2, 2021
43c24fb
Add 'open' command
probonopd May 23, 2021
f56fa39
Wait for Menu to appear on D-Bus; this is needed for autostart to wor…
probonopd May 25, 2021
6deabd2
devel/py-xdg [ci skip]
probonopd May 25, 2021
bcf0d31
devel/py-xdg
probonopd May 25, 2021
acc54ac
Merge pull request #215 from helloSystem/experimental
probonopd May 30, 2021
04d6ee7
if [ ! -L "/bin/bash" ] ; then
probonopd Jun 2, 2021
fe7f60b
Increase free space from 20% to 50%
probonopd Jun 2, 2021
79b3226
cirrus:github/helloSystem/drm-kmod-FreeBSD-12
probonopd Jun 3, 2021
5507643
Disable 13 based builds for now due to their size [ci skip]
probonopd Jun 17, 2021
cea6435
Merge branch 'tmpfs' into tmpfstest
probonopd Nov 5, 2021
23c1111
Merge pull request #291 from helloSystem/tmpfstest
probonopd Nov 5, 2021
8e7da7d
Minimize mkfs space
probonopd Nov 5, 2021
03e3909
mount -o ro [ci skip]
probonopd Nov 6, 2021
639db6c
root_rw_mount="NO"
probonopd Nov 6, 2021
d42e2da
Prevent merge conflict [ci skip]
probonopd Nov 9, 2021
01073a7
Merge pull request #294 from helloSystem/experimental [ci skip]
probonopd Nov 9, 2021
32ef590
New Live ISO system
probonopd Nov 9, 2021
7fc931a
Do not put manifest on ISO, it's redundant there
probonopd Nov 9, 2021
e6c7646
mkdir cdroot
probonopd Nov 10, 2021
3250650
Set more kenv in loader.conf [ci skip]
probonopd Nov 10, 2021
c6ee65e
Add init_ variables
probonopd Nov 10, 2021
9464725
Move files back to /etc/rc.d/
probonopd Nov 10, 2021
0e82e6f
Fix rcorder
probonopd Nov 10, 2021
e1830f4
Try 13 based build with FAT32 ESP
probonopd Nov 10, 2021
ed929bd
Actually we need NVIDIA version 440 and 390 [ci skip]
probonopd Nov 10, 2021
f0e5533
Try fixing hostname [ci skip]
probonopd Nov 10, 2021
76353c7
Remove unneeded part [ci skip]
probonopd Nov 10, 2021
d0d3b54
Remove outdated comment [ci skip]
probonopd Nov 10, 2021
19c1527
Changes to EFI partition creation [ci skip]
probonopd Nov 10, 2021
41435ff
Add install-boot.sh script for creating ESP [ci skip]
probonopd Nov 10, 2021
c937c5d
Build 12.2 and 13 based images
probonopd Nov 10, 2021
c374006
. ${HERE}/install-boot.sh
probonopd Nov 10, 2021
6c5d434
Try with nullfs instead of tmpfs
probonopd Nov 10, 2021
d3b55c6
chmod 777 # FreeBSD 13 seems to need this
probonopd Nov 11, 2021
db3337f
Get rid of chroot
probonopd Nov 11, 2021
7dfb0d1
Merge branch 'tmpfs' of https://github.com/helloSystem/ISO into tmpfs
probonopd Nov 11, 2021
cd91c8c
Do all build stages
probonopd Nov 11, 2021
1a026a3
Use zstd for FreeBSD 13
probonopd Nov 11, 2021
d366f69
Commit missing directories
probonopd Nov 11, 2021
8cc419f
Try improving zstd build speed and use less memory
probonopd Nov 11, 2021
5651fc0
Try to prevent Cirrus CI from running out of memory
probonopd Nov 11, 2021
12befca
Try to prevent Cirrus CI from running out of memory
probonopd Nov 11, 2021
beec4c6
Be bold and see what happens
probonopd Nov 12, 2021
0f882a0
Be bold and see what happens
probonopd Nov 12, 2021
9f41c7a
Be bold and see what happens
probonopd Nov 12, 2021
2770c82
Some directories were missing
probonopd Nov 12, 2021
930aa6e
Must not try to load tmpfs module in FreeBSD 13 and later
probonopd Nov 12, 2021
c5fbafb
Try to enable Ventoy
probonopd Nov 12, 2021
4e9c6f2
/nvidia must be writable for initgfx
probonopd Nov 12, 2021
24d9c09
Copy from packages.common-13 [ci skip]
probonopd Nov 12, 2021
3ee63bd
freebsd-14-0-current-amd64-v20211111
probonopd Nov 12, 2021
5d9cce8
Install Ventoy module does not exist yet for FreeBSD 14
probonopd Nov 12, 2021
c10e98a
Add FreeBSD COPYRIGHT file [ci skip]
probonopd Nov 12, 2021
f5ab6b4
Fix rcorder, ship all Nvidia driver versions, various fixes
probonopd Nov 12, 2021
048f032
Merge branch 'tmpfs' of github.com:helloSystem/ISO into tmpfs
probonopd Nov 12, 2021
2cfe02b
Build 13.0 and 12.2, in that order
probonopd Nov 12, 2021
9f102b8
Accommodate for new Live system setup in 0.7.0 [ci skip]
probonopd Nov 12, 2021
2ab76c1
Try to fix unbootable FreeBSD 13
probonopd Nov 12, 2021
996f6de
No longer used [ci skip]
probonopd Nov 12, 2021
34ceb67
Not needed here [ci skip]
probonopd Nov 12, 2021
10b3aa7
Small fixes [ci skip]
probonopd Nov 12, 2021
d67f648
Do not boot in verbose mode by default
probonopd Nov 12, 2021
57c89df
Silence /boot/init_script
probonopd Nov 12, 2021
a6aa59d
Update initgfx
probonopd Nov 13, 2021
a67b4e1
Fix poweroff?, enable equalizer, enable async I/O system calls, disab…
probonopd Nov 13, 2021
0ef60de
Unset boot_mute for now [ci skip]
probonopd Nov 13, 2021
fe4440a
Use custom color scheme for console
probonopd Nov 13, 2021
49e73bd
Fix unbootable FreeBSD 13
probonopd Nov 13, 2021
198b815
Comment [ci skip]
probonopd Nov 13, 2021
157c751
Font like Terminal [ci skip]
probonopd Nov 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 12 additions & 14 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
task:
freebsd_instance:
cpu: 2
memory: 8G
cpu: 8
memory: 16G
matrix:
# image: freebsd-12-1-release-amd64 # EOL
- image: freebsd-13-0-release-amd64
- image: freebsd-12-2-release-amd64
# image: freebsd-13-0-release-amd64 # ISO way too large, HIDPI broken, BIOS boot broken, boot installed system broken?
# image: freebsd-14-0-current-amd64-v20211111
# image: freebsd-12-1-release-amd64 # EOL

env:
CIRRUS_CLONE_DEPTH: 1
Expand Down Expand Up @@ -33,8 +34,9 @@ task:
- kldload nullfs.ko || true
- kldload geom_uzip.ko || true
- pkg install -y pkg git-lite zsync wget sha bash zip devel/py-xdg librsvg2 ca_root_nss # qemu-devel uefi-edk2-qemu-x86_64
- mkdir -p /usr/local/furybsd
# mount -t tmpfs tmpfs /usr/local/furybsd
- mkdir -p /usr/local/furybsd/uzip /usr/local/furybsd/cdroot/
- mount -t tmpfs tmpfs /usr/local/furybsd/uzip
- mount -t tmpfs tmpfs /usr/local/furybsd/cdroot/

Build_script:
- export VER=$(uname -r | cut -d "-" -f 1)
Expand All @@ -45,14 +47,10 @@ task:
- export BUILDNUMBER=$(RELEASE_ID_FOR_STORAGE=33980128 ./buildnumbers)
- /bin/sh -x ./build.sh "${DESKTOP}" || true # FIXME: Why does this return an error even though the ISO succeeded?
- df -h
- ls -lh "${CIRRUS_WORKING_DIR}"/artifacts/*.iso || false # Error out if ISO was not produced to mitigate the above
# ( cd "${CIRRUS_WORKING_DIR}"/artifacts ; zsyncmake *.iso )
- ls -lh /usr/local/furybsd/iso/*.iso || false # Error out if ISO was not produced to mitigate the above
# ( cd /usr/local/furybsd/ ; zsyncmake *.iso )

Upload_script:
- export VER=$(uname -r | cut -d "-" -f 1) # No way to pass on from Build_script to Upload_script?
- ls -lh "${CIRRUS_WORKING_DIR}"/artifacts/
- case "$CIRRUS_BRANCH" in *pull/*) echo skipping since PR ;; * ) wget -c -q https://github.com/tcnksm/ghr/files/5247714/ghr.zip ; unzip ghr.zip ; ./ghr -prerelease -delete -t "${GITHUB_TOKEN}" -u "${CIRRUS_REPO_OWNER}" -r "${CIRRUS_REPO_NAME}" -b "This is an experimental __UNTESTED__ build for developers, it may not even boot." -c "${CIRRUS_CHANGE_IN_REPO}" "${CIRRUS_BRANCH}"-"${VER}" "${CIRRUS_WORKING_DIR}"/artifacts ; esac

FreeNode_script:
- echo "TODO: Fix IRC bot script"
# case "$CIRRUS_BRANCH" in *pull/*) echo skipping since PR ;; * ) echo -e 'USER helloSystemBot guest tolmoon tolsun\nNICK helloSystemBot\nJOIN #helloSystem\nPRIVMSG #helloSystem :A new build is now available in the Create Live Media tool, happy testing!\nQUIT\n' | nc irc.freenode.net 6667 >/dev/null ; esac
- ls -lh /usr/local/furybsd/iso/
- case "$CIRRUS_BRANCH" in *pull/*) echo skipping since PR ;; * ) wget -c -q https://github.com/tcnksm/ghr/files/5247714/ghr.zip ; unzip ghr.zip ; ./ghr -prerelease -delete -t "${GITHUB_TOKEN}" -u "${CIRRUS_REPO_OWNER}" -r "${CIRRUS_REPO_NAME}" -b "This is an experimental __UNTESTED__ build for developers, it may not even boot." -c "${CIRRUS_CHANGE_IN_REPO}" "${CIRRUS_BRANCH}"-"${VER}" /usr/local/furybsd/iso/ ; esac
152 changes: 53 additions & 99 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ if [ "${VERSIONSUFFIX#RC}"x != "${VERSIONSUFFIX}x" ] ; then
FTPDIRECTORY="releases"
fi

echo "${FTPDIRECTORY}"

# pkgset="branches/2020Q1" # TODO: Use it
desktop=$1
tag=$2
Expand All @@ -43,15 +41,8 @@ cache="${livecd}/${arch}/cache"
base="${cache}/${version}/base"
export packages="${cache}/packages"
iso="${livecd}/iso"
if [ -n "$CIRRUS_CI" ] ; then
# On Cirrus CI ${livecd} is in tmpfs for speed reasons
# and tends to run out of space. Writing the final ISO
# to non-tmpfs should be an acceptable compromise
iso="${CIRRUS_WORKING_DIR}/artifacts"
fi
export uzip="${livecd}/uzip"
export cdroot="${livecd}/cdroot"
ramdisk_root="${cdroot}/data/ramdisk"
vol="furybsd"
label="LIVE"
export DISTRIBUTIONS="kernel.txz base.txz"
Expand Down Expand Up @@ -111,8 +102,7 @@ if [ "${desktop}" = "hello" ] ; then
# based on environment variable set e.g., by Cirrus CI
if [ ! -z $BUILDNUMBER ] ; then
echo "Injecting $BUILDNUMBER" into manifest
sed -i -e 's|\(^version: .*_\).*$|\1'$BUILDNUMBER'|g' "${cwd}/overlays/uzip/hello/manifest"
rm "${cwd}/overlays/uzip/hello/manifest-e"
sed -i '' -e 's|\(^version: .*_\).*$|\1'$BUILDNUMBER'|g' "${cwd}/overlays/uzip/hello/manifest"
cat "${cwd}/overlays/uzip/hello/manifest"
isopath="${iso}/${desktop}-${HELLO_VERSION}_${BUILDNUMBER}-FreeBSD-${VER}-${arch}.iso"
else
Expand All @@ -129,33 +119,28 @@ cleanup()
else
umount ${uzip}/var/cache/pkg >/dev/null 2>/dev/null || true
umount ${uzip}/dev >/dev/null 2>/dev/null || true
zpool destroy -f furybsd >/dev/null 2>/dev/null || true
mdconfig -d -u 0 >/dev/null 2>/dev/null || true
if [ -d "${livecd}" ] ;then
chflags -R noschg ${uzip} ${cdroot} >/dev/null 2>/dev/null || true
rm -rf ${uzip} ${cdroot} >/dev/null 2>/dev/null || true
fi
rm ${livecd}/pool.img >/dev/null 2>/dev/null || true
rm -rf ${cdroot} >/dev/null 2>/dev/null || true
fi
}

workspace()
{
mkdir -p "${livecd}" "${base}" "${iso}" "${packages}" "${uzip}" "${ramdisk_root}/dev" "${ramdisk_root}/etc" >/dev/null 2>/dev/null
truncate -s 3g "${livecd}/pool.img"
mdconfig -f "${livecd}/pool.img" -u 0
gpart create -s GPT md0
gpart add -t freebsd-zfs md0
sync ### Needed?
zpool create furybsd /dev/md0p1

# Mount a temporary filesystem image at "${uzip}" so that we can clean up afterwards more easily
# dd if=/dev/zero of=test.img bs=1M count=512
# mdconfig -a -t vnode -f test.img -u 9
# newfs /dev/md9
# mount /dev/md9 "${uzip}"

mkdir -p "${livecd}" "${base}" "${iso}" "${packages}" "${uzip}" "${cdroot}" >/dev/null 2>/dev/null
#truncate -s 3g "${livecd}/pool.img"
#mdconfig -f "${livecd}/pool.img" -u 0
sync ### Needed?
zfs set mountpoint="${uzip}" furybsd
# From FreeBSD 13 on, zstd can be used with zfs in base
MAJOR=$(uname -r | cut -d "." -f 1)
if [ $MAJOR -lt 14 ] ; then
zfs set compression=gzip-6 furybsd
else
# zstd conflicts uzip for good compression ratio?
zfs set recordsize=1M furybsd # This may influence the compression ratio
zfs set compression=zstd-15 furybsd # Since we do not write to it, 15 may be ok (but may need more RAM?)
fi
}

base()
Expand Down Expand Up @@ -199,8 +184,7 @@ packages()
# NOTE: Also adjust the Nvidia drivers accordingly below. TODO: Use one set of variables
if [ $MAJOR -eq 12 ] ; then
# echo "Major version 12, hence using release_2 packages since quarterly can be missing packages from one day to the next"
# sed -i -e 's|quarterly|release_2|g' "${uzip}/etc/pkg/FreeBSD.conf"
# rm -f "${uzip}/etc/pkg/FreeBSD.conf-e"
# sed -i '' -e 's|quarterly|release_2|g' "${uzip}/etc/pkg/FreeBSD.conf"
echo "Major version 12, using quarterly packages"
elif [ $MAJOR -eq 13 ] ; then
echo "Major version 13, using quarterly packages"
Expand Down Expand Up @@ -239,10 +223,8 @@ packages()
/usr/local/sbin/pkg-static -r ${uzip} add "${packages}/transient/${p}" # pkg-static add has no -y
done <"${packages}/transient/transient-packages-list"

# /usr/local/sbin/pkg-static -c ${uzip} info > "${cdroot}/data/system.uzip.manifest"
# Manifest of installed packages ordered by size in bytes
/usr/local/sbin/pkg-static -c ${uzip} query "%sb\t%n\t%v\t%c" | sort -r -s -n -k 1,1 > "${cdroot}/data/system.uzip.manifest"
cp "${cdroot}/data/system.uzip.manifest" "${isopath}.manifest"
/usr/local/sbin/pkg-static -c ${uzip} query "%sb\t%n\t%v\t%c" | sort -r -s -n -k 1,1 > "${isopath}.manifest"
# zip local.sqlite and put in output directory next to the ISO
zip pkg.zip ${uzip}/var/db/pkg/local.sqlite
mv pkg.zip "${isopath}.pkg.zip"
Expand Down Expand Up @@ -275,18 +257,8 @@ repos()

user()
{
mkdir -p ${uzip}/usr/home/liveuser/Desktop
# chroot ${uzip} echo furybsd | chroot ${uzip} pw mod user root -h 0
chroot ${uzip} pw useradd liveuser -u 1000 \
-c "Live User" -d "/home/liveuser" \
-g wheel -G operator -m -s /usr/local/bin/zsh -k /usr/share/skel -w none
chroot ${uzip} pw groupadd liveuser -g 1000
# chroot ${uzip} echo furybsd | chroot ${uzip} pw mod user liveuser -h 0
chroot ${uzip} chown -R 1000:1000 /usr/home/liveuser
chroot ${uzip} pw groupmod wheel -m liveuser
chroot ${uzip} pw groupmod video -m liveuser
chroot ${uzip} pw groupmod webcamd -m liveuser
chroot ${uzip} pw groupmod cups -m liveuser
# This is now done ad-hoc at boot time because we would
# need to constuct $HOME from skel anyway
}

dm()
Expand Down Expand Up @@ -328,7 +300,6 @@ pkg()
initgfx()
{
if [ "${arch}" != "i386" ] ; then
MAJOR=$(uname -r | cut -d "." -f 1)
if [ $MAJOR -lt 14 ] ; then
PKGS="quarterly"
# PKGS="latest" # This must match what we specify in packages()
Expand All @@ -337,8 +308,8 @@ initgfx()
fi

# 390 needed for Nvidia Quadro 2000, https://github.com/helloSystem/hello/discussions/241#discussioncomment-1599131
for ver in '390'; do # Only use NVIDIA version 440 and 390 for now to reduce ISO image size
# for ver in '' 390 340 304; do
# 340 needed for Nvidia 320M
for ver in '' 390 340 304; do
pkgfile=$(/usr/local/sbin/pkg-static -c ${uzip} rquery %n-%v.txz nvidia-driver${ver:+-$ver})
fetch -o "${cache}/" "https://pkg.freebsd.org/FreeBSD:${MAJOR}:amd64/${PKGS}/All/${pkgfile}"
mkdir -p "${uzip}/usr/local/nvidia/${ver:-440}/"
Expand Down Expand Up @@ -367,29 +338,28 @@ script()

uzip()
{
( cd "${uzip}" ; ln -s . ./sysroot ) # Workaround for low-level tools trying to load things from /sysroot; https://github.com/helloSystem/ISO/issues/4#issuecomment-787062758
install -o root -g wheel -m 755 -d "${cdroot}"
sync ### Needed?
cd ${cwd} && zpool export furybsd && while zpool status furybsd >/dev/null; do :; done 2>/dev/null
sync ### Needed?
mkuzip -S -d -o "${cdroot}/data/system.uzip" "${livecd}/pool.img"
}
makefs "${cdroot}/rootfs.ufs" "${uzip}"
mkdir -p "${cdroot}/boot/"
if [ $MAJOR -lt 13 ] ; then
mkuzip -o "${cdroot}/boot/rootfs.uzip" "${cdroot}/rootfs.ufs"
else
# Use zstd when possible, which is available in FreeBSD beginning with 13
mkuzip -A zstd -C 15 -o "${cdroot}/boot/rootfs.uzip" "${cdroot}/rootfs.ufs"
fi

ramdisk()
{
cp -R "${cwd}/overlays/ramdisk/" "${ramdisk_root}"
sync ### Needed?
cd ${cwd} && zpool import furybsd && zfs set mountpoint=/usr/local/furybsd/uzip furybsd
sync ### Needed?
cd "${uzip}" && tar -cf - rescue | tar -xf - -C "${ramdisk_root}"
touch "${ramdisk_root}/etc/fstab"
cp ${uzip}/etc/login.conf ${ramdisk_root}/etc/login.conf
makefs -b '10%' "${cdroot}/data/ramdisk.ufs" "${ramdisk_root}"
gzip -f "${cdroot}/data/ramdisk.ufs"
rm -rf "${ramdisk_root}"
rm -f "${cdroot}/rootfs.ufs"

}

boot()
{

# /bin/freebsd-version is used by Ventoy to detect FreeBSD ISOs
mkdir -p "${cdroot}"/bin/ ; cp "${uzip}"/bin/freebsd-version "${cdroot}"/bin/
# /COPYRIGHT is used by Ventoy to inject code
cp "${uzip}"/COPYRIGHT "${cdroot}"/
cp -R "${cwd}/overlays/boot/" "${cdroot}"
cd "${uzip}" && tar -cf - boot | tar -xf - -C "${cdroot}"
# Remove all modules from the ISO that is not required before the root filesystem is mounted
Expand All @@ -400,40 +370,24 @@ boot()
-not -name 'cryptodev.ko' \
-not -name 'firewire.ko' \
-not -name 'geom_uzip.ko' \
-not -name 'opensolaris.ko' \
-not -name 'tmpfs.ko' \
-not -name 'xz.ko' \
-not -name 'zfs.ko' \
-delete
# Compress the kernel
gzip "${cdroot}"/boot/kernel/kernel
gzip -f "${cdroot}"/boot/kernel/kernel || true
rm "${cdroot}"/boot/kernel/kernel || true
# Compress the remaining modules
find "${cdroot}"/boot/kernel -type f -name '*.ko' -exec gzip {} \;
sync ### Needed?
cd ${cwd} && zpool export furybsd && mdconfig -d -u 0
sync ### Needed?
# The name of a dependency for zfs.ko changed, violating POLA
# If we are loading both modules, then at least 13 cannot boot, hence only load one based on the FreeBSD major version
MAJOR=$(uname -r | cut -d "." -f 1)
if [ $MAJOR -lt 13 ] ; then
echo "Major version < 13, hence using opensolaris.ko"
sed -i -e 's|opensolaris_load=".*"|opensolaris_load="YES"|g' "${cdroot}"/boot/loader.conf
rm -f "${cdroot}"/boot/loader.conf-e
sed -i -e 's|cryptodev_load=".*"|cryptodev_load="NO"|g' "${cdroot}"/boot/loader.conf
rm -f "${cdroot}"/boot/loader.conf-e
sed -i -e 's|tmpfs_load=".*"|tmpfs_load="YES"|g' "${cdroot}"/boot/loader.conf
rm -f "${cdroot}"/boot/loader.conf-e
else
echo "Major version >= 13, hence using cryptodev.ko"
sed -i -e 's|cryptodev_load=".*"|cryptodev_load="YES"|g' "${cdroot}"/boot/loader.conf
rm -f "${cdroot}"/boot/loader.conf-e
sed -i -e 's|opensolaris_load=".*"|opensolaris_load="NO"|g' "${cdroot}"/boot/loader.conf
rm -f "${cdroot}"/boot/loader.conf-e
sed -i -e 's|tmpfs_load=".*"|tmpfs_load="NO"|g' "${cdroot}"/boot/loader.conf
rm -f "${cdroot}"/boot/loader.conf-e
find "${cdroot}"/boot/kernel -type f -name '*.ko' -exec gzip -f {} \;
find "${cdroot}"/boot/kernel -type f -name '*.ko' -delete
mkdir -p "${cdroot}"/dev "${cdroot}"/etc # TODO: Create all the others here as well instead of keeping them in overlays/boot
cp "${uzip}"/etc/login.conf "${cdroot}"/etc/ # Workaround for: init: login_getclass: unknown class 'daemon'
cd "${uzip}" && tar -cf - rescue | tar -xf - -C "${cdroot}" # /rescue is full of hardlinks
if [ $MAJOR -gt 12 ] ; then
# Must not try to load tmpfs module in FreeBSD 13 and later,
# because it will prevent the one in the kernel from working
sed -i '' -e 's|^tmpfs_load|# load_tmpfs_load|g' "${cdroot}"/boot/loader.conf
rm "${cdroot}"/boot/kernel/tmpfs.ko*
fi
echo 'exec="mode 0"' >> "${cdroot}"/boot/loader.conf # Prevent the FreeBSD 13 bootloader from changing the screen resolution, https://github.com/helloSystem/ISO/issues/198#issuecomment-901919172
sync ### Needed?
}

tag()
Expand All @@ -445,14 +399,15 @@ tag()
echo "${URL}" > "${cdroot}/.url"
echo "${URL}" > "${uzip}/.url"
echo "Setting extended attributes 'url' and 'sha' on '/.url'"
setextattr user sha "${SHA}" "${uzip}/.url"
setextattr user url "${URL}" "${uzip}/.url"
setextattr user build "${BUILDNUMBER}" "${uzip}/.url"
# setextattr user sha "${SHA}" "${uzip}/.url" # Does not work on tmpfs
# setextattr user url "${URL}" "${uzip}/.url"
# setextattr user build "${BUILDNUMBER}" "${uzip}/.url"
fi
}

image()
{
# For Ventoy, does it make a difference? TODO: Remove next line
sh "${cwd}/scripts/mkisoimages-${arch}.sh" -b "${label}" "${isopath}" "${cdroot}"
sync ### Needed?
md5 "${isopath}" > "${isopath}.md5"
Expand Down Expand Up @@ -487,7 +442,6 @@ dm
script
tag
uzip
ramdisk
boot
image

Expand Down
File renamed without changes.
Empty file added overlays/boot/System/.gitkeep
Empty file.
Empty file added overlays/boot/bin/.gitkeep
Empty file.
Loading