A concept to run an immutable/atomic Gentoo? - /g/ (#106162592) [Archived: 266 hours ago]

Anonymous
8/6/2025, 4:16:05 PM No.106162592
gentoo-3d-small
gentoo-3d-small
md5: bdb36aad99b1244a428ddd11a2d7025b🔍
I've looked into the bootstrapping process of Gentoo since after eight years of using it as my daily driver I was interested, and the Catalyst/stage3 creation process looked like it would be possible to automate. Here is the idea:
>Create a simple script that could add packages and their dependencies automatically to the stage3 spec files.
>Compile everything on the host system to effectively create a stage4 archive.
>Turn the stage4 into a mountable archive.
>Use GRUB to pick from a list of stage4 archives to boot from from an archive store, automatically adding the latest build to the main menu option.
>Cache everything used during the build to avoid having to rebuild the entire image to add a single new package. Keep the portage cache in a mutable subvolume that can be used across rootfs images.
>Allow overlays to let the user modify an existing rootfs in case they need something immediately and cannot find the time to create a new image.
>Have a dedicated "Config" subvolume that contains the base /etc and /home/$USER/.config directories before they are added to the final, usable system.
This doesn't sound too hard to automate. In fact, I know that because someone already did. Looking up if anyone has done this before lead me to some niche distribution called Xenia Linux which seems to have issues such as deprecating OpenRC due to relying on Flatpak instead of baking in packages to the rootfs. Still, this sounds like something that could be done over a few days with a few scripts. It would be the perfect distribution.
>Immutable and atomic but
>Still allows non-bloat installation of packages.
>Reproducibility as a side effect of the building process.
>Proper USE flags availability to not have to deal with Nix autism and Guix non-existence when it comes to source configuration.
>Trivially allows using a build server that serves the final images to all of your devices.
What would the catch be? Seems like the endgame of Linux to me.
>Tinkertranny!
Fuck off, nu-/g/.
Replies: >>106163215 >>106165099 >>106165243
Anonymous
8/6/2025, 4:19:12 PM No.106162618
I experimented with this before.
rm -f $(which rm)
rm: cannot remove '/usr/bin/rm': Permission denied

I don't remember how I did it, but my system is completely immutable until I enter a special password to modify it.
Replies: >>106162652
Anonymous
8/6/2025, 4:23:23 PM No.106162652
>muh blogpost
I'm mostly curious as to who else would be interested in such a system. I'm bored and have some time on my hands, so if anyone else would appreciate it I could make the scripts public.
>I'll make the logo!

>>106162618
That would be an immutable root, but not an atomic update system, you just unlock it, do what you need to do and pray for the best. While yes if you're not a retard it should work most of the time, you're never truly safe from some moron pushing a bad ebuild. Reproducibility is also not as much of a meme when you want to distribute from a build server to your various devices, including low-power ones like SoCs that do a bunch of smart home shit for you.
Also, this is still procedural root management, declarative generation sounds better to me.
Replies: >>106162669
Anonymous
8/6/2025, 4:25:53 PM No.106162669
>>106162652
I think you should go back to guix or nix or whatever caused your mental retardation, portage updates system immutably.
Replies: >>106162734 >>106162848
Anonymous
8/6/2025, 4:32:12 PM No.106162734
>>106162669
Immutability isn't atomicity or reproducibility.
Replies: >>106162741
Anonymous
8/6/2025, 4:32:50 PM No.106162741
>>106162734
Your mind isn't atomic and your body can't reproduce either.
OP
8/6/2025, 4:42:23 PM No.106162848
>>106162669
>Proper USE flags availability to not have to deal with Nix autism and Guix non-existence when it comes to source configuration.
>I think you should go back to guix or nix or whatever caused your mental retardation.
Anonymous
8/6/2025, 5:09:58 PM No.106163215
>>106162592 (OP)
>Guix non-existence when it comes to source configuration
What?
Replies: >>106163518
Anonymous
8/6/2025, 5:34:07 PM No.106163518
>>106163215
Guix with Gentoo would probably be the ideal world. You get a Lisp with a hack box.
Replies: >>106164155
Anonymous
8/6/2025, 5:35:45 PM No.106163537
rat
rat
md5: 044de2aa917fa9de3be4d406d052fa31🔍
squeak
Anonymous
8/6/2025, 6:33:21 PM No.106164155
>>106163518
Why the fuck would you use Gentoo then? You can compile everything from source on Guix too.
Replies: >>106164244
Anonymous
8/6/2025, 6:43:13 PM No.106164244
>>106164155
USE flags (centralized and curated compilation settings) and using tested versions and the tooling
Replies: >>106164257
Anonymous
8/6/2025, 6:44:57 PM No.106164257
>>106164244
You can change any compilation setting on Guix before compiling too, or are you just claiming you're too retarded to use these and need gentoo's babby mode? And if you are, why bother with useflags anyway? So you can save 50mb from setting up your l10n flags?
Anonymous
8/6/2025, 7:18:59 PM No.106164600
I don't understand why this requires Gentoo which has portage, a package manager notorious for being very complex and hard to fuck with. Wouldn't it be easier to make an LFS distro of sorts with a really simple package manager that does that instead? I like the idea, but portage seems not really viable for this kind of thing. Maybe something more akin to KISS Linux's package manager, which is basically a shell script, and can be reimplemented easily in any language of choice. I feel like that would be easier to modify to work as an immutable Linux package manager than that. If I recall correctly kiss is also source-based.
Replies: >>106164619 >>106164666
Anonymous
8/6/2025, 7:21:10 PM No.106164619
>>106164600
The point is to avoid reinventing the wheel. Gentoo has an existing system to build from source with any configuration and create a fully usable system as a tarball really to be deployed. The only extra work would be adding the packages to the stage4-amd64.spec file and automating the setup of GRUB with a non-traditional partition layout (/rootimages, /home, /boot/efi).
Anonymous
8/6/2025, 7:24:20 PM No.106164666
>>106164600
because op is retarded and just saw a gantoo imstall guide from tech nigger or distrolube and really really really wants to post his neofetch
Replies: >>106164743
OP
8/6/2025, 7:30:43 PM No.106164743
>>106164666
I've been using Gentoo since late 2018 because I wanted experimental performance features such as system-wide LTO as well as getting rid of useless features. Having both bleeding edge packages and ultra stable pinned versions at the same time is something I haven't found anywhere else.
Replies: >>106166030
Anonymous
8/6/2025, 8:06:09 PM No.106165099
>>106162592 (OP)
guixfren here interested to see what comes of this and wishing good luck and happy tides to fellow anon.
Replies: >>106165542
Anonymous
8/6/2025, 8:11:39 PM No.106165176
Only tangentially related but I had the idea awhile back of adding support for Gentoo's recipes to Bitbake to create reproducible images for things like atomic updates and enabling build servers that don't require a chroot that acts as a Gentoo system. I should actually start working on it...
Anonymous
8/6/2025, 8:16:39 PM No.106165243
13bb592123808f9b1664b4f86a64db93[1]
13bb592123808f9b1664b4f86a64db93[1]
md5: 8ff34300c00c4136bd3f12f282eea220🔍
>>106162592 (OP)
this is how I see you, OP, I'm 39, but 12 mentally
Replies: >>106165542
OP
8/6/2025, 8:40:08 PM No.106165542
>>106165243
>>106165099
Thanks anons, you made me motivated enough to go and make it happen.
Replies: >>106166177
Anonymous
8/6/2025, 9:19:51 PM No.106166030
1738410749346569
1738410749346569
md5: dece85a43f277f684b5b4ca5981a8618🔍
>>106164743
who gives a shit if youve been using gentoo for a yea......
man...
>bleeding edge and ultra stable pinned
you can do that on guix too, check the manual for inferiors
Anonymous
8/6/2025, 9:33:05 PM No.106166177
kill
kill
md5: 301453307456f464112bf862d4526c6a🔍
>>106165542
bonus