geckolinux / geckolinux-project

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

boot from snapshot option missing from grub #457

Open tako-jerome opened 1 year ago

tako-jerome commented 1 year ago

gecko rolling KDE, kernel 6.0.8-1-default, Tumbleweed snapshot 20221115.

searching online, I only found one forum post describing the issue but I don't quite understand the instructions that were replied there. The one step I have been able to complete troubleshooting this is to edit /etc/fstab to include a line ". snapshots", which was previously missing. Any thoughts how to go about fixing this? Do I need to reinstall grub?

geckolinux commented 1 year ago

Hi there, which ISO version did you originally install from?

tako-jerome commented 1 year ago

Hi there, which ISO version did you originally install from? GeckoLinux_ROLLING_Plasma.x86_64.999.220820.0.iso, and I did confirm the checksum beforehand.

geckolinux commented 1 year ago

Do you see any snapshots listed in the YaST Snapshots tool?

tako-jerome commented 1 year ago

Yeah, lots, I"m trying to restore to 21 of like 50.

geckolinux commented 1 year ago

You can try changing some of the options in YaST Bootloader and then applying the changes, which will reinstall the bootloader.

tako-jerome commented 1 year ago

this didn't work despite trying several options, and now it only boots to the grub terminal screen.

tako-jerome commented 1 year ago

so, I have a question about gecko versus standard tumbleweed. One thing I noticed on this recent reinstallation was that almost nothing from the open Suse software site or the snap craft store installed correctly. Does that have anything to do with gecko's differences in package management? This included zoom, brave browser, Mesa drivers, and several other things. even some things like installing the repose to try and install snapd and alien gave me a lot of errors. i'm wavering on whether or not I should continue trying anything based on SUSE, it might just be beyond my skill level, so sorry if this is vague or coming from a place of frustration. having not used Linux for a few years for my daily driver, i've genuinely been shocked how messy the out-of-the-box experience has been this time around, but it feels like I must have been using sufficiently older hardware before that let it run smoothly. I used to have no trouble throwing kubuntu on a USB, installing the restricted codecs, getting a ms office to run with play on Linux, and in general it took longer to configure the plasma appearance to how I than to do all that. now that I've bought a new laptop for the first time in my life, I've tried five distros and nothing has been particularly functional out-of-the-box. anyways, sorry to ramble, I'm not frustrated with you just clinics in general right now. I actually really appreciate the gecko project, I wish there were more in the spirit of yours and Linux mint and the like. I might just end up paying for SLED if it gets me a working system faster.

geckolinux commented 1 year ago

Hi there, No, GeckoLinux does not have any fundamental differences in package management compared to a vanilla openSUSE installation. We would need to see what exact errors you're running into in order to help.

tako-jerome commented 1 year ago

OK, so I did a fresh install of that same I saw this morning, and once again there is no option to boot from a snapshot in grub. Just boot geckolinux, boot gecko Linux recovery mode, or UEFI firmware settings. And I tried that solution of just changing the number of seconds to regenerate to grab config file in yast boot loader settings, but that didn't work. What would help you diagnose this? Do you want the contents of my ETC/FSTAB file?

geckolinux commented 1 year ago

Did you maybe install it with the custom partitioning module and/or select a different filesystem?

tako-jerome commented 1 year ago

Etc/fstab reports that my boot/efi is vfat but that "/" & "/home" are btrfs. I erased disc and didn't change any configuration options on install.

geckolinux commented 1 year ago

Would you mind sharing a photo of your GRUB boot screen?

tako-jerome commented 1 year ago

image

tako-jerome commented 1 year ago

image

These are what display under the advanced options

tako-jerome commented 1 year ago

here's the list of available snapshots also

Screenshot_20221119_175107

tako-jerome commented 1 year ago

I also posted to forums.opensuse.org looking for advice, but I'm not sure I understand what they're saying.
https://forums.opensuse.org/showthread.php/578347-No-boot-to-snapshot-option-in-GRUB

Here are my current partitions :

jerome@koti:~> df -Th 
Filesystem     Type      Size  Used Avail Use% Mounted on 
devtmpfs       devtmpfs  4.0M     0  4.0M   0% /dev 
tmpfs          tmpfs     7.7G     0  7.7G   0% /dev/shm 
tmpfs          tmpfs     3.1G   13M  3.1G   1% /run 
/dev/nvme0n1p2 btrfs     477G  9.2G  467G   2% / 
tmpfs          tmpfs     7.7G     0  7.7G   0% /tmp 
/dev/nvme0n1p2 btrfs     477G  9.2G  467G   2% /home 
/dev/nvme0n1p1 vfat      300M  3.7M  296M   2% /boot/efi 
tmpfs          tmpfs     1.6G   44K  1.6G   1% /run/user/1000

And then here is /etc/fstab :

# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=E87D-C57B                            /boot/efi      vfat    umask=0077 0 2 
UUID=7ea66b0a-5f88-40c3-b71e-e421a5be7861 /              btrfs   subvol=@,defaults,noatime,space_cache=v2,compress=zstd 0 1 
UUID=7ea66b0a-5f88-40c3-b71e-e421a5be7861 /home          btrfs   subvol=@home,defaults,noatime,space_cache=v2,compress=zstd 0 2

One person said _"your "btrfs" subvolumes are different from what an normal openSUSE provides. In particular, a normal setup has subvolumes for "/boot/grub2/x8664-efi" and for "/boot/grub2/i386-pc" (if I recall correctly). And I think those are important for booting a snapshot (so that grub2 is not also rolled back for the snapshot)."

They seem to think I might not have used a btrfs filesystem, but as far as I can tell I definitely did? YaST partitions screenshot

geckolinux commented 1 year ago

Thanks for the additional details.

The different subvolume layout is to be expected, as the configuration that I found to work best within the constraints of the Calamares installer is slightly different from what the openSUSE YaST installer uses. But you definitely have a Btrfs filesystem.

The problem is that for some reason your system is using a @ subvolume for the root partition, whereas the Snapper config expects it to not have a subvolume. This is how a default installation of GeckoLinux Rolling Plasma looks with the Erase Disk option:

cat /etc/fstab 
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=BA17-ACC8                            /boot/efi      vfat    umask=0077 0 2
UUID=5c458ee6-5ed3-4610-a300-8c3aa5fc6767 /              btrfs   defaults,noatime,space_cache=v2,compress=zstd 0 0
UUID=5c458ee6-5ed3-4610-a300-8c3aa5fc6767 /.snapshots    btrfs   subvol=/.snapshots,defaults,noatime,space_cache=v2,compress=zstd 0 0
UUID=5c458ee6-5ed3-4610-a300-8c3aa5fc6767 /home          btrfs   subvol=/home,defaults,noatime,space_cache=v2,compress=zstd 0 0
UUID=5c458ee6-5ed3-4610-a300-8c3aa5fc6767 /root          btrfs   subvol=/root,defaults,noatime,space_cache=v2,compress=zstd 0 0
UUID=5c458ee6-5ed3-4610-a300-8c3aa5fc6767 /var           btrfs   subvol=/var,defaults,noatime,space_cache=v2,compress=zstd 0 0
sudo btrfs sub list /
[sudo] password for root: 
ID 257 gen 57 top level 5 path home
ID 258 gen 38 top level 5 path root
ID 259 gen 57 top level 5 path var
ID 260 gen 44 top level 5 path .snapshots
ID 261 gen 33 top level 257 path home/.snapshots
ID 262 gen 39 top level 260 path .snapshots/1/snapshot
ID 263 gen 43 top level 260 path .snapshots/2/snapshot

Screenshot from 2022-11-20 13-07-43

Can you please confirm if the "Start bootloader from a read-only snapshot" option existed immediately after installation (before you updated the system)?

Also, could you please look into the bootloader section of your computer's UEFI settings? I wonder if it's booting from an old bootloader that was installed from a previous OS.

tako-jerome commented 1 year ago

So, I had done about 4 installs of gecko recently, all from the most recent rolling kde snapshot. The most recent two I never had the snapshot option in grub. There was not anything in the UEFI settings, I make sure to update that after installs always. Yeah I don't know how that setup was created using calamares, I didn't manual guide the partitioning.

For the time being I have just thrown a vanilla tumbleweed install onto this machine to experiment, so sorry that I can't follow up further but thank you for the help.

tako-jerome commented 1 year ago

So, a weird update though even though I told my open Sue's tumbleweed installer to erase everything, this is what my UEFI looks like - image