coreos-assembler icon indicating copy to clipboard operation
coreos-assembler copied to clipboard

Max override file size for custom "cosa build"?

Open duhmojo opened this issue 8 months ago • 3 comments

Bug Report

There's a silent, and very frustrating, size limit on override files, and this includes files IN rpms.

I've tried a hell of combos and endless builds, but the short of it is I've been trying to build the coreos live iso with a smallish prepackaged docker image file.

Basically, at this point I have an rpm with 4 files in it, two are docker image files. One is 101MB the other is 19MB. Not a lot of bulk, but its something I need to include in this ISO for it to be useful post install.

The rpm spec stuffs the two docker image files it into, and my rpm is put into the fcos/overrides/rpms folder so they make their way into the live ISO for install.

This basically works, except the two large-ish files are missing. I can't grab the console output easily right now but it goes like this:

$ rpm -ql testo
/usr/lib/systemd/system/teso.service
/var/lib/testo/images/test1.tar.gz
/var/lib/testo/images/test2.tar.gz

ls -al /var/lib/testo/images/
<nothing, nothing as sudo or root>

Is there some silent file limit? Can I bypass or change it?

My workaround was to have the rpm .spec SPLIT the files into 5MB chunks, then in the .service I include in the rpm, I cat them into "docker load". This imports the image fine. But this is crazy.

I had also hoped to bypass the rpm altogether and just dump my files into fcos/overrides/rootfs, but likely because it too suffers from the file size limit, I spent a 1/2 a day trying to figure out why my files weren't appearing in the ISO or install!? Now I know. Too big.

Environment

What operating system is being used to run coreos-assembler? Fedoras 41, using quay.io/coreos-assembler/coreos-assembler:latest, f241c9fcd029, pulled 10 hours ago

What operating system is being assembled? Coreos? Whatever the latest is. The build is fairly on rails.

Is coreos-assembler running in Podman or Docker? Podman

If Podman, is coreos-assembler running privileged or unprivileged? Doesn't matter, the build works.

Expected Behavior

Let me override the file limit. There's not much reason to impose this limit, or hide it.

Actual Behavior

Files over 10MB(?) are skipped in the cosa build, even when they're in an override rpm and it installed the rpm without warning or complaint or exception. Just install the files.

Reproduction Steps

Other Information

duhmojo avatar Apr 10 '25 01:04 duhmojo

Another wrinkle. I tried an experiment to work around the silent file size limit. I split my 100MB files into 5MB chunks, and the 10MB file into 2 chunks. This allows my 1st bigger file to appear into the OS, HOWEVER the 2nd file only has the 1st part. The 2nd part file is missing just like before...

So there's a secondary limit somewhere as well?! Is this a limit for the override layer or a single rpm layer? It's a 100MB limit isn't it? The 2nd file's 1 part is only 20 bytes on disk when it should be 5MB. The other split files sums to just under 100MB.

I guess I'm spending another day experimenting to see if this is a rpm specific limit or override globally.

Anyone have a tip or suggestion? Thanks.

duhmojo avatar Apr 10 '25 13:04 duhmojo

hmm. AFAIK there isn't a limit that is being imposed anywhere. Maybe a technical limitation?

Either way if you want a custom ISO with some extra bits added on top of Fedora CoreOS then I'd suggest trying out https://github.com/coreos/custom-coreos-disk-images/ instead of trying to use COSA directly. You first start with a container build FROM the coreos container image and then feed that into the custom-coreos-disk-images script to generate you a ISO

Seeing as you are running into size issues you might need to pass in --metal-image-size (see https://github.com/coreos/custom-coreos-disk-images/issues/19#issuecomment-2751527105).

dustymabe avatar Apr 10 '25 21:04 dustymabe

Thanks! I'll give both options a look. The size limits are pretty obvious to me when I observe my split files on the live iso installed vm. There's 5M chunks X 20, then a 20 byte file, where there should be 2 X 5M files. They suspiciously add up to 100MB. It could be some coincidence but I'm out of hair to pull. Thanks again.

duhmojo avatar Apr 10 '25 21:04 duhmojo