LukeShortCloud / winesapOS

winesapOS - Game with Linux anywhere, no installation required!
GNU General Public License v3.0
888 stars 30 forks source link

[install] Create a new read-only image type #871

Open LukeShortCloud opened 1 month ago

LukeShortCloud commented 1 month ago

Two possible solutions for providing a read-only image type:

I feel comfortable using one of these two solutions because of the resources I have available to me. Other solutions are either unclear to me or are not widely used enough.

LukeShortCloud commented 1 month ago

This image type will be optional. The normal image types (minimal, performance, and secure) will remain writable with no changes. The new read-only image will likely be based on the minimal image rootfs.

LukeShortCloud commented 1 month ago

Some known issues of bootc that are relevant to us:

GuestSneezeOSDev commented 1 month ago

why not use the steamos-readonly i know it is for steamos but somehow i think i can implement this into winesapOS

LukeShortCloud commented 1 month ago

bootc is the most flexible by allowing us to use a container image for deployment. It caches old deployments so we can rollback more than just once with a A/B configuration like SteamOS.

frzr is easy and stable. Both of those solutions we can easily implement re-using what we have today.

Do any projects re-use what SteamOS uses? I looked at ChimeraOS and HoloISO. They both use different solutions.

My biggest concern is that the read-only deployment should be used and maintained by more than one existing OS. I'm also not interested in re-using more technologies from SteamOS. I tried it and it was frustrating and a lot of work.

LukeShortCloud commented 1 month ago

The ChimeraOS team let me know that they have experimental support for using container images for the file system in frzr, similar to how bootc works. It sounds like they might be moving to that long-term. Cool stuff!

GuestSneezeOSDev commented 1 month ago

maybe in the grub flags replace rw to only r

LukeShortCloud commented 1 month ago

That technically works. The problem is how we then distribute and manage upgrades. Technically, the upcoming archupgrade project would handle that if we temporarily switch back to rw. However, the only way to guarantee that a user has 100% the same build is to distribute the same set of root file system files. As it is today, winesapOS Upgrades tend to have a drift between what is actually released and what you are running. It is never exactly the same. Looking at Android, ChromeOS, Fedora Silverblue, etc. for inspiration, we can see that the OS files are consistent across similar devices. That really helps with troubleshooting and providing a stable experirence.

GuestSneezeOSDev commented 1 month ago

I have added a service file which allows winesapOS to be read-only https://github.com/LukeShortCloud/winesapOS/pull/917

GuestSneezeOSDev commented 1 month ago

Use frzr instead of the scripts / services I Created

GuestSneezeOSDev commented 1 month ago

here are some steps that hopefully may help

Find your UUID

sudo blkid
$ sudo nano /etc/fstab
# $ sudo vi /etc/fstab
# $ sudo vim /etc/fstab

now insert this to the fstab

UUID=<the-uuid-you-got> / ext4 ro,defaults 0 1

then exit now we need to "adjust the boot parameters"

$ sudo nano /etc/default/grub
# $ sudo vi /etc/default/grub
# $ sudo vim /etc/default/grub

find the GRUB_CMDLINE_LINUX_DEFAULT line and add

GRUB_CMDLINE_LINUX_DEFAULT="quiet ro"

then update the grub configuration

sudo grub-mkconfig -o /boot/grub/grub.cfg
sudo reboot

Infromation Sources :

LukeShortCloud commented 1 month ago

Compared to what I was trying before, this guide is saying to also add the ro option to the root file system mount in /etc/fstab. I'll give that a try when I have some free time, thanks!

GuestSneezeOSDev commented 1 month ago

Welcome mate