Open jvisser-di opened 3 weeks ago
having an install script that is not Nix sounds amazing to me
Glad you like it!
NixOS used to be my daily driver until I grew tired of various limitations. Haven't been happier in a long time after switching to OSTree
when I supply no command line options, or the options help it shows nothing
Cherry-picking changes from future branch sometimes breaks things, thanks for finding this bug.
Fixed in https://github.com/GrabbenD/ostree-utility/commit/e013379aaab600b43145b0870af1e76eb1ade328
I would like to debug this
You can debug the script with xtrace
by sourcing it in a subshell (to avoid polluting your current shell):
(set -x; source ./ostree.sh test)
it can't write anymore
The error message which you're seeing is from podman
being unable to commit the latest layer due to insufficient disk space.
You can find which directories are used by Podman with: $ podman output
graphRoot: /var/lib/containers/storage
imageCopyTmpDir: /var/tmp
volumePath: /var/lib/containers/storage/volumes
By default DISK_CREATE_LAYOUT
function in ostree.sh
has a hardcoded 25GiB
size for OSTREE_SYS_ROOT_LABEL
partition which is where /var
resides. You probably need to resize it and you can easily confirm that with:
df -H /var
Furthermore, consider being conservative with RUN
instructions in your Containerfile to avoid unnecessary layers thus save disk space.
Unfortunately a serious bottleneck with using Podman/Docker here is the disk overhead. The current implementation effectively duplicates files by storing them first in "Podman Layer Cache" and then committing to "OSTree Repository", not to mention the need to temporarily store the entire image in a transient container before committing changes to the layer cache :slightly_frowning_face:
there are 2 entries for every ostree thingy:
That's your GRUB2 entries from grub-mkconfig
I'm guessing you might have a dependency which calls GRUB2, probably a Pacman Hook if you've accidentally installed something like a custom kernel image in the wrong place.
Again, this is another unfortunate instance of Podman/Docker causing trouble. RUN
instructions where you install dependencies re-runs various hooks thus wasting a lot of CPU cycles. Ideally you'd only install dependencies once with Pacstrap
.. This is something I'm trying to find a better approach to in the next version
Nonetheless, you'd have to share your repository if you want me to check what's wrong.
Then there were some minor issues
Definitely
I'm re-working parts of the script to address various inconveniences
Don't have any time estimate for when it will be done though
(I mistakingly posted the bug report with my work account, I am @jvisser-di)
Thanks for your very comprehensive answer! I'll give it another go and see if I can figure out some stuff.
I will be waiting patiently to see what other approaches you will be coming up with!
Let me know if I can help!
Hi! Thanks for your great script!
I tried your script and it's amazing! I'm not really familiar with ostree other then trying Fedora Silverblue. I started looking if I could reproduce something like that using Arch. And I found this! I'm very new to all this so I'm sorry if the answers to my questions are obvious. But having an install script that is not Nix sounds amazing to me.
Your script mainly works but I have some issues. I hope you don't mind me adding them in 1 issue. If you want me to report separate issues for every problem and add some debugging, let me know!
Somehow when I supply no command line options, or the options
help
it shows nothing. I would like to debug this but I'm unable to install everything due to another issue:The main issue was that when started installing some bigger stuff I got this error that it can't write anymore. I'll add a picture. (Didn't have a lot of other thing installed so copy pasting was a bit hard.)
Then there is an issue that there are 2 entries for every ostree thingy:
Then there were some minor issues. When following your guide I made the mistake of not copying it to my homedir. And I didn't have git installed. Thankfully you can fix it by using the unlock command. Might have been a bit better for the beginner if that was in the manual. Then again.. I don't think this really is a setup for beginners. If I ever learn how this all works I might make a PR to fix it or to at least explain it or something. You can't use Containerfile.host as a filename because podman doesn't want tags with uppercase letters.
TL;DR: Amazing script! Got stuck installing things after gnome because of write issues (no space left on device?). Please help!