Error in mke2fs when create reform image with docker

I want to create a reform image with docker. But I have error with mke2fs :

Copying files into the device: __populate_fs: symlink increased in size between lstat() and readlink()
__populate_fs: symlink increased in size between lstat() and readlink()
__populate_fs: symlink increased in size between lstat() and readlink()
__populate_fs: symlink increased in size between lstat() and readlink()
__populate_fs: symlink increased in size between lstat() and readlink()
__populate_fs: symlink increased in size between lstat() and readlink()
__populate_fs: Ext2 file too big while writing file "kcore"
mke2fs: Ext2 file too big while populating file system

I tried to search about it on my favorite search engines but I found nothing.

Off the cuff (I’ve been playing around building a devuan image, but have no way to test it yet), kcore will likely be /proc/kcore in target-userland. On my system, this ends up being 128TB (far beyond ext4’s max single file size with 4KiB blocks). /proc/kcore doesn’t necessarily exist on all Linux systems; it’s a kernel flag, and my impression is that it isn’t support at all on ARM. This might explain why @minute may not have seen the problem.

As for solving it, kcore doesn’t actually take up that much space - /proc is a psuedo-filesystem. Essentially, it’s a virtual filesystem representing information about the running system, and the filesizes are theoretical. However those files when copied to a destination outside of procfs can actually take up that space. Thus the file too big error from mke2fs when it copies target-userland into reform-system.img.

I’d imagine it’s fine to unmount target-userland after mkuserland3.sh has been called and finished. This will empty out target-userland/proc, and avoid the problem. I can’t see any further use of target-userland after that, so it should be fine.

This sounds like the culprit. @ephase try to unmount /proc and friends before the mke2fs. I think the script doesn’t unmount anything at the moment.

Thanks @podge and @minute, I tested it this afternoon and all work wen I unmounted target-userland/proc and image creation work.

Now I can work on my own minimal image :slight_smile:

2 Likes

So, I have built my first minimal image today built with a docker image on my x86 laptop but I have plenty of errors and missing packages.

It could be cool to move kernel and special packages to deb packages on MNT repo.

1 Like

Sorry, the docker build process is not up-to-date, because it was quite a pain to get it working in docker. I just clone the reform-system-image repo and execute ./mkimage.sh.

As my gaming machine is powerful than my Reform, it make sense for me to let it compile and build images.

So I start a collection of scripts and docker image for building reform2 stuff. I finished the first one this night : building kernel. The early version is available here

My main idea: use different docker images for each operation:

  • building kernel
  • building uboot
  • create minimal Debian image
  • building mesa, xwayand …
  • create disk image
2 Likes

So, I have a script and a dockerfile to build uboot now. My git repository is available here.

1 Like