aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-09-15 13:38:19 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-09-15 13:38:19 +0200
commitbb70fe6adee0ccda2d5bb8243baf5793714ecbe1 (patch)
tree84f8b7888e558be0e8092c1f1fe5cd89217f9022
parentb16d6eef13f061962d020aa326c64b2450ecd6e6 (diff)
Fixup
-rw-r--r--.gitignore2
-rwxr-xr-xbootstrap7
2 files changed, 6 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 46a102d..3ea7963 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
-*.cpio.gz
+*.cpio.xz
buildos-buildid-*
buildos-initrd-*
buildos-image-*
diff --git a/bootstrap b/bootstrap
index 488a359..773b379 100755
--- a/bootstrap
+++ b/bootstrap
@@ -652,6 +652,9 @@ if [ "$stage" -le "5" ]; then
# Quite a few files/directories are only accessible by root (e.g., /root) so
# we run under sudo.
#
+ # Note also that without --check=crc32 the kernel will not be able to
+ # decompress things.
+ #
root_dirs="build dev etc mnt root usr var"
root_links="bin sbin lib lib32 lib64"
@@ -660,7 +663,7 @@ if [ "$stage" -le "5" ]; then
cd "$root"
sudo find $root_dirs $root_links -print0 | \
sudo cpio --null -o -H newc | \
- xz -9 > "$owd/buildos-rootfs.cpio.xz"
+ xz -9 --check=crc32 >"$owd/buildos-rootfs.cpio.xz"
cd "$owd"
subvol_snapshot -r "$root" "$root-5"
@@ -691,7 +694,7 @@ if [ "$stage" -le "6" ]; then
cd "$root"
sudo cpio -o -H newc <<EOF | \
- xz -9 > "$owd/buildos-init.cpio.xz"
+ xz -9 --check=crc32 >"$owd/buildos-init.cpio.xz"
usr/lib/os-release
init
usr/sbin/buildos