david-cortes / snapper-in-debian-guide

Step-by-step guide for configuring Debian with automated BTRFS snapshots and rollbacks from the boot menu
GNU General Public License v3.0
35 stars 4 forks source link

Partitioning instructions not viable for UEFI systems #3

Open JHBoricua opened 10 months ago

JHBoricua commented 10 months ago

The partitioning instructions appears to have been done using a Virtualbox VM that's booting in Legacy BIOS mode, not UEFI. On UEFI systems, partitioning the disk per the existing instructions results in an error during install due to the EFI partition not being present and a non-bootable system.

The guide should probably have some sort of disclaimer indicating this or be update to show the proper partitioning for UEFI systems that's compatible with snapper.

david-cortes commented 10 months ago

Thanks for the information. I don't remember the debian tool's working by heart, but if you are booting in UEFI mode and create a /boot partition through the graphical installer and choose to overwrite the boot entries, doesn't it automatically create /boot/efi too?

imthenachoman commented 10 months ago

I recall something like this too. The guide says to create a /boot partition but the installer does that itself. I forgot now but I only had to create the / and swap partitions.

JHBoricua commented 10 months ago

When I tried it on my system, I immediately got a warning about not having the EFI partition after finishing with the disk partitioning part. I continued with the install anyway and when I got to the grub phase I got another reminder at that point of not having a valid EFI partition. When it tried to setup the bootloader anyway, after selecting to override the NVRAM, it just threw an error related to failing to install the bootloader and at that point I could not continue.

So now I'm attempting the setup again, creating an EFI partition mounted on /boot/efi, instead of the ext4 /boot one. I'll see if that works out.

JHBoricua commented 10 months ago

Ok, on my UEFI system using default GPT partitions I created the disk layout as follows:

1st primary partition as 600 MB, type ESP. Debian automatically enables boot flag on it and mounts it as /boot/efi 2nd primary partition taking the rest of the disk as btrfs, mounted on / if you use zram as swap. Otherwise leave some space for a third partition to be used as swap.

Doing this and following the rest of your snapper setup guide worked and I was able to successfully test rolling back.