Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/hooks/archiso_pxe_http
diff options
context:
space:
mode:
authornl6720 <nl6720@gmail.com>2020-10-24 15:53:57 +0300
committernl6720 <nl6720@gmail.com>2021-03-09 16:25:45 +0200
commit1bfadf3e6451efbb36d7fd266810cb1e38e8811e (patch)
treeb6063ec28048688a55fd390615f384de288a2687 /hooks/archiso_pxe_http
parentd13c747c67a140362a463e186fcdc900a42c840f (diff)
Support EROFS
EROFS, like Squashfs, is a read-only file system. It can be used to store airootfs in an image file. Its advantage is the support for POSIX ACLs. EROFS downside is that currently it only supports LZ4 compression (LZMA support is not yet fully implemented). A difference from Squashfs is that, EROFS stores change time (ctime) not modification time (mtime). The reverse is true for Squashfs. Implements https://gitlab.archlinux.org/archlinux/archiso/-/issues/59
Diffstat (limited to 'hooks/archiso_pxe_http')
-rw-r--r--hooks/archiso_pxe_http10
1 files changed, 8 insertions, 2 deletions
diff --git a/hooks/archiso_pxe_http b/hooks/archiso_pxe_http
index efae923..43b8b4b 100644
--- a/hooks/archiso_pxe_http
+++ b/hooks/archiso_pxe_http
@@ -39,6 +39,7 @@ _curl_get() {
archiso_pxe_http_mount_handler () {
newroot="${1}"
+ local img_type="sfs"
msg ":: Mounting /run/archiso/httpspace (tmpfs) filesystem, size='${archiso_http_spc}'"
mkdir -p "/run/archiso/httpspace"
@@ -46,7 +47,12 @@ archiso_pxe_http_mount_handler () {
# shellcheck disable=SC2154
# defined via initcpio's parse_cmdline()
- _curl_get "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.sfs" "/${arch}"
+ if ! curl -L -f -o /dev/null -s -r 0-0 "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.sfs"; then
+ if curl -L -f -o /dev/null -s -r 0-0 "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.erofs"; then
+ img_type="erofs"
+ fi
+ fi
+ _curl_get "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.${img_type}" "/${arch}"
# shellcheck disable=SC2154
# defined via initcpio's parse_cmdline()
@@ -56,7 +62,7 @@ archiso_pxe_http_mount_handler () {
# shellcheck disable=SC2154
# defined via initcpio's parse_cmdline()
if [ "${verify}" = "y" ]; then
- _curl_get "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.sfs.sig" "/${arch}"
+ _curl_get "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.${img_type}.sig" "/${arch}"
fi
mkdir -p "/run/archiso/bootmnt"