geckolinux / geckolinux-project

GeckoLinux bug tracker and documentation
https://geckolinux.github.io
208 stars 18 forks source link

BTRFS Instead of EXT4 for Root Filesystem By Default #185

Closed BlindRepublic closed 2 years ago

BlindRepublic commented 3 years ago

Hello, I came back to Gecko and I've been using it for a few days now with BTRFS instead of EXT4 and, because of how well the filesystem is integrated into upstream OpenSUSE, I have had a great experience with it. Because of the aforementioned integration, why not make BTRFS the default filesystem for the installer? If you want to go further with it, you can make a root configuration for Snapper as well.

Otherwise, this distro is great. Keep up the good work!

geckolinux commented 3 years ago

Hi there, thanks a lot for writing. I'm glad you're liking GeckoLinux.

I wouldn't be opposed to making BTRFS the default if that's what the majority would prefer, that's easy to change. But the Snapper root configuration with GRUB integration is unfortunately not possible at this point with the Calamares installer. (See: https://github.com/calamares/calamares/issues/525) You can use Snapper and you can manually set up all the volumes the way openSUSE's installer does, but it's nowhere near the level of automation and integration. So I'm not sure if BTRFS make sense for most users without those additional perks.

BlindRepublic commented 3 years ago

Oh, that's unfortunate. Personally, I usually just restore snapshots and then reboot instead of using GRUB. But, that probably isn't sufficient for everyone.

Thanks for the quick response!

geckolinux commented 3 years ago

Maybe you could try installing Snapper and test it with your normal workflow. The default BTRFS volume scheme that Calamares creates does have @ and @home subvolumes, so that might be enough.

emanuc commented 3 years ago

Instead of using snapper, with the @ and @home subvolumes, you could use Timeshift, which is very convenient and takes advantage of btrfs snapshots. I have been using it for many years on Ubuntu and now also on fedora, changing the subvolumes from "root" to "@" and from "home" to "@home". There is a "grub-btrfs" which shows snapshots created with timeshift on GRUB. Hope it helps.

geckolinux commented 3 years ago

Hi @emanuc , thanks for those interesting options.

Timeshift is definitely a good option for those who want to use it, although it would be sort of a lateral sidestep instead of an improvement, because Snapper does work with the default @ and @home subvolumes that Calamares creates. It just requires a bit of post-install configuration. I actually haven't tried it recently, it's worth looking into to see if that configuration could be provided out of the box for Snapper. Honestly just those two subvolumes seem like enough to segregate user data changes from root system file changes, so it would be nice to just work with that more minimalist configuration.

There is a "grub-btrfs" which shows snapshots created with timeshift on GRUB.

This is very interesting indeed. But it looks like it's specific to Arch, not sure if it would work with the dracut system that openSUSE uses. It's also not packaged for openSUSE. It could be included in the GeckoLinux root filesystem, but if it needs any compiled code then that wouldn't be a good option on the long term for GeckoLinux installations.

geckolinux commented 2 years ago

@TrueTechie , @emanuc If you'd like to test it here's an ISO with Btrfs snapshots and GRUB integration, thanks to some major improvements in Calamares and a bit of hacking: https://sourceforge.net/projects/geckolinux/files/testing/GeckoLinux_ROLLING_XFCE.x86_64-999.211212.0.iso/download I'd appreciate tests on real hardware and VMs, with and/or without other installed operating systems, on legacy BIOS or EFI systems, and also with the other non-Btrfs filesystems to make sure the installed system is bootable. Thanks in advance!

BlindRepublic commented 2 years ago

@TrueTechie , @emanuc If you'd like to test it here's an ISO with Btrfs snapshots and GRUB integration, thanks to some major improvements in Calamares and a bit of hacking: https://sourceforge.net/projects/geckolinux/files/testing/GeckoLinux_ROLLING_XFCE.x86_64-999.211212.0.iso/download I'd appreciate tests on real hardware and VMs, with and/or without other installed operating systems, on legacy BIOS or EFI systems, and also with the other non-Btrfs filesystems to make sure the installed system is bootable. Thanks in advance!

So doing some basic testing in virt-manager shows that you can create and boot snapshots with snapper without any issues. However, you cannot run snapper rollback after booting into one as the default subvolume for the root partition is not set.

geckolinux commented 2 years ago

@TrueTechie Thanks a lot for the report.

However, you cannot run snapper rollback after booting into one as the default subvolume for the root partition is not set.

It's technically because the /etc/default/grub_installdevice is missing. But there are two easy workarounds:

  1. snapper --ambit classic rollback or
  2. Manually run the YaST Bootloader tool to generate /etc/default/grub_installdevice (inside a normal RW instance of the system obviously).
BlindRepublic commented 2 years ago

@TrueTechie Thanks a lot for the report.

No problem, always glad to help out.

It's technically because the /etc/default/grub_installdevice is missing. But there are two easy workarounds:

Okay, will this be enabled on the release ISOs?

geckolinux commented 2 years ago

It's technically because the /etc/default/grub_installdevice is missing. But there are two easy workarounds:

Okay, will this be enabled on the release ISOs?

No, I can't find a way to generate it automatically. Possibly a script could be created, it just needs to be pulled from /dev/disk/by-id/..., but I'm not very good with that sort of thing. It will be easy enough to add the above two tips to the wiki, as it does work reliably that way from what I can tell.