xargonwan / qbert Goto Github PK
View Code? Open in Web Editor NEWQbert generates a root overlay where you can install whatever software you need without messing your filesystem
License: GNU General Public License v3.0
Qbert generates a root overlay where you can install whatever software you need without messing your filesystem
License: GNU General Public License v3.0
To make the Script run on every boot we have a few Options:
As this is an Filesystem Overlay we want it up as soon as possible on boot to avoid issues.
The best would be fstab. This would require the the Script to use sudo.
/etc is not part of the read-only file system and thus survives Updates. My pacman.conf with added chaotic-aur is proof of that.
Second, root-less option would be .bashrc or .bash_profile.
Just keep in mind that load order of things is important here as we need to run qbert as soon as possible. Things that hook into rendering like vkBaslat could lead to a Gamescope crash if the required layer cannot be loaded when DeckUI starts.
Another Option would be a systemd Service. This is more universal as with this approach we can set Service Dependencies and load orders.
The script doesn't really work / overlay the actual root:
(deck@ysd ~)$ tmp/Qbert/qbert.sh -S pv
[sudo] password for deck:
@#?%&#*!
(Overlay is mounted!)
....
warning: warning given when extracting /usr/bin/pv (Can't create '/usr/bin/pv')
...
touch: setting times of '/usr': Read-only file system
error: command failed to execute correctly
(deck@ysd ~)$ touch /usr/aaa
touch: cannot touch '/usr/aaa': Read-only file system
The script mounts the overlayed root fs into ~/.qbert/merged
but doesn't really overlay/change the fs root (/
). So you can access and change everything under ~/.qbert/merged
, but /
is still read-only.
(A+)(root@ysd ~)# mount | grep overlay
overlay on /etc type overlay (rw,relatime,lowerdir=/sysroot/etc,upperdir=/sysroot/var/lib/overlays/etc/upper,workdir=/sysroot/var/lib/overlays/etc/work)
overlay on /home/deck/.qbert/merged type overlay (rw,relatime,lowerdir=/,upperdir=/home/deck/.qbert/upperdir,workdir=/home/deck/.qbert/work)
(A+)(root@ysd ~)# ls /usr
bin lib lib32 lib64 libexec local sbin share src
(A+)(root@ysd ~)# ls /home/deck/.qbert/merged/usr/
bin lib lib32 lib64 libexec local sbin share src
(A+)(root@ysd ~)# touch /usr/aaaa
touch: cannot touch '/usr/aaaa': Read-only file system
(1)(A+)(root@ysd ~)# touch /home/deck/.qbert/merged/usr/aaaa
(A+)(root@ysd ~)# ls /home/deck/.qbert/merged/usr
aaaa bin lib lib32 lib64 libexec local sbin share src
(A+)(root@ysd ~)# ls /usr
bin lib lib32 lib64 libexec local sbin share src
You would need to mount the overlay over /
itself... however there are some complications with that, becaues you need to mount it before the other mounts, especially /proc
, /sys
etc..
The easiest way to do that is from an initrd, before the normal init system starts mounting everything else, but with simple init systems it should be possible to change it also there directly. (I have done this only on custom ebedded systems or a system with a custom initrd, but haven't looked into what support for this "normal" distros have. Systemd has a systemd.volatile=overlay
option, but that puts the overlay data on a temporary in-memory filesystem, which will get lost on reboot).
Alternatively for your use case (allowing pacman installs) you could just create an overlay for just /usr
, the same way steamos already has one configured for /etc
, just check out /usr/lib/systemd/system/etc.mount
, but basically (not tested ;):
create /etc/systemd/system/usr.mount
with
[Unit]
Description=usr overlay
[Mount]
Where=/usr
What=overlay
Type=overlay
Options=lowerdir=/usr,upperdir=/var/lib/overlays/usr/upper,workdir=/var/lib/overlays/usr/work
[Install]
WantedBy=local-fs.target
run (it should be actually possible to do the mkdir automatically as a dependent systemd service or something ;)
mkdir -p /var/lib/overlays/usr/{upper,work}
systemctl enable usr.mount
reboot. Alternatively you could just start systemctl start usr.mount
to start it using right away, but already running apps would keep open files from the original usr
which might cause some confusion (for a similar reason, it will be hard to disable it again without a restart)
Exclude:
Fairly simple, running this command doesn't unmount anything. Everything is still clearly showing as mounted, and --delete-overlay
doesn't work since the files are in use.
I was attempting to build libstrangle on the Steam Deck using this to save having to unlock the filesystem, and ran into numerous issues that prevented it from working. When trying to build something from the AUR it was showing fakeroot as not installed, even though I'd just installed it and everything else for the AUR with Qbert.
Eventually I gave up, rebooted to unmount since that wasn't working, ran --delete-overlay
and uninstalled Qbert. However, the packages that I installed through Qbert are still showing as installed in the pacman package list.
I've got no idea what to do now, as while they're showing as installed, they're clearly not. I can't reinstall them since the root fs is locked, if I install them through Qbert then they don't work, and generally it feels like I've just made a huge mess which is what I was trying to avoid in the first place :(
Any ideas?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.