Comments (2)
@lunix33 The provided config does not reproduce the issue.
I'm not sure if I'm mishandling the cache or doing something improperly. I've been using mkosi-chroot apt-get ... to install my packages in the chroot instead of using the helper in /scripts, since I need my custom repositories and keys (which gets added and dearmored during the prepare (final) script) to be available in the final image, and from what I understand putting them in /etc/apt/... (not within the chroot), which the script seems to be using, would not make them available in the final image. Should I create the files in both? Have I missed somthing in the documentation when it comes to handling cache and package install?
You need to add put repositories in a mkosi.skeleton/ tree. Specifically in mkosi.skeleton/etc/apt/sources.list.d. Then they will be taken into account by mkosi and will be available in the final image.
I'm guessing that whatever you're doing in your scripts is getting rid of the repository metadata which we need to build the initrd later on.
from mkosi.
Thanks for the information you gave me, I'll take your recommandation into consideration.
When it comes to the actual issue at hand, after some more test I was able to get things working as expected after reading about that the script actions could affect the initrd generation. I started the project with a prototype on v21, and seems like some of the operations that were working in v21 stopped working with v22 (like deleting the package list within the chroot, though some of the configuration changed since then, and scripts were rewritten, so that might also be it). So removing those operations seem to fix my issue, when it comes to building the default initramfs. I've added a RemoveFiles configuration to delete the content of /var/lib/apt/lists
within the final rootfs.
from mkosi.
Related Issues (20)
- Ubuntu builds don't use the specified Mirror= for security patches HOT 9
- Grub module linuxefi missing on debian based systems HOT 3
- Persist changes between scripts when BuildSourcesEphemeral=true HOT 5
- Make BUILDDIR available in prepare scripts HOT 9
- `DEFAULT_HOSTNAME=` in os-release is not set when `Hostname=` is set HOT 3
- bwrap: Can't access /newroot/buildroot/proc/sysrq-trigger: Read-only file system HOT 2
- mkosi-initrd feature request: add option for persistent de-compression of SquashFS during first boot HOT 1
- mkosi-initrd kernel-install script doesn't work when kernel-install is called from `/` HOT 1
- Stale dnf5 metadata even when passing `--cache-only=never` HOT 5
- Bootable Ubuntu Image is often stuck at loading initrd HOT 7
- AttributeError: 'NoneType' object has no attribute 'strip' HOT 3
- Package manager tree ignored by `Package=` and `BuildPackage=` directive in upper layer when using `BaseTree=` and `Overlay=true` HOT 1
- Unbootable system with XBOOTLDR partition and UKIs?! HOT 4
- Fedora images seem to fail to build on Fedora hosts (in the systemd repository) HOT 5
- `bwrap --unshare-net … -c 'chmod 1777 /dev/shm && chmod 755 /etc && exec $0 "$@"' python3" returned non-zero exit code 1.`
- No support for mixed architectures (32-bit on 64-bit) HOT 5
- Mkosi tries to bindmount incompatible host filesystems HOT 2
- Unable to log into built Ubuntu 22.04 image HOT 2
- How to run mkosi inside chroot HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mkosi.