Closed guysoft closed 7 years ago
You'll need have to revert that commit or use newer e2fsprogs.
$ truncate -s 1G test.img
$ mkfs.ext4 -O ^metadata_csum test.img
mke2fs 1.42.13 (17-May-2015)
Invalid filesystem option set: ^metadata_csum
$ mkfs.ext4 -O ^metadata_csum test.img
mke2fs 1.43.4 (31-Jan-2017)
Discarding device blocks: done
Creating filesystem with 262144 4k blocks and 65536 inodes
Filesystem UUID: 1e400e09-73fb-4eba-b3f7-79cfa48303ae
Superblock backups stored on blocks:
32768, 98304, 163840, 229376
Allocating group tables: done
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
I using your docker image. My system has the new e2fsprogs. The dockerfile is not up to date and breaks the build. The point of docker is to take care if versions. It gets built with build.sh. and breaks with docker.
Ah, I can't do much about that. I am leaving the maintenance of the docker part of pi-gen to the people who use it. PR's welcome.
I guess cc @cfstras then. My stake here is making nightly builds, i'm trying to replicate the way you are building as best as I can.
We have a VM, which runs a nightly cronjob to build the image. There's also a postrun script which does basic cleanup and moves the files where we need them.
What distribution? Does the vm have a provision script?
Alternatively, if you're okay with doing a quick patch to your local git clone, then you can remove the dependency on the latest e2fsprogs by only flagging to disable metadata_csum if it's potentially set as a default feature. This will allow you to run the build script on multiple environments, and should not require you to revert that commit based on the e2fsprogs version. Although the logic could be further refined to prevent possible false positives.
diff --git a/export-image/prerun.sh b/export-image/prerun.sh
index a639c9c..67da3da 100755
--- a/export-image/prerun.sh
+++ b/export-image/prerun.sh
@@ -50,8 +50,12 @@ ROOT_DEV=$(losetup --show -f -o ${ROOT_OFFSET} --sizelimit ${
echo "/boot: offset $BOOT_OFFSET, length $BOOT_LENGTH"
echo "/: offset $ROOT_OFFSET, length $ROOT_LENGTH"
+ROOT_FEATURES="^huge_file"
+if grep -q "metadata_csum" /etc/mke2fs.conf; then
+ ROOT_FEATURES="^metadata_csum,$ROOT_FEATURES"
+fi
mkdosfs -n boot -F 32 -v $BOOT_DEV > /dev/null
-mkfs.ext4 -O ^metadata_csum,^huge_file $ROOT_DEV > /dev/null
+mkfs.ext4 -O $ROOT_FEATURES $ROOT_DEV > /dev/null
mount -v $ROOT_DEV ${ROOTFS_DIR} -t ext4
mkdir -p ${ROOTFS_DIR}/boot
I want to build something that mimcs the Rpi foundation builds. The idea is to have unofficial builds that would be part of the OctoPi project nighties. And like that we will be able to catch changes like the csum. So patching is the opposite of what I want to do.
@rkubes That looks sensible. I'd accept that as a PR.
@guysoft The full setup is something like this: Debian Stretch VM, runs a script at midnight which does a quick sanity check of the environment, gets the latest commit from an internal git repo, does the build in a screen session with logging enabled and then moves the files to a place they can be downloaded for internal testing. There is a separate CI system which checks that the basics work on all pi models.
Ok, I am building nighties now using this: https://github.com/guysoft/pi-gen-nightly
They are uploaded here: http://unofficialpi.org/Distros/raspbian-nightly/
Technically I don't really mind the docker build isn't working. However it is a part in this repo that is broke, so not closing.
I'll look at getting newer e2fs tools. Need to build a new round of inages soon anyway.
Would someone like to PR a vagrantfile for this repo? Having "the official" way supported here would be good to have in the pursuit of reproducibility.
okay, look at #87.
@XECDesign: Is there a (formal) description of the build system that produces the official images on https://www.raspberrypi.org/downloads/raspbian/ ?
That was quick. :tada:
There isn't anything formal and everything is subject to change, so it would probably be out of date within a few weeks.
Is there any idea why I am getting this error as below:
$ mke2fs ext4.img -F -E encoding=3 -O casefold
mke2fs 1.44.1 (24-Mar-2018)
Invalid filesystem option set: casefold
For general support questions, I'd recommend the forum.
But in this case, the issue is that you're using an option that's not supported by the version of e2fsprogs you're running. I think you'd need at least v1.46.0.
For general support questions, I'd recommend the forum.
But in this case, the issue is that you're using an option that's not supported by the version of e2fsprogs you're running. I think you'd need at least v1.46.0.
How can I update or install v1.46.0, any suggestion please. @XECDesign
Hey, I am trying to build pi-gen with the docker build and without it I get the following error. There is no image at the end in the deploy folder. Using Ubuntu 17.04:
current workaround is to build without docker