HOWTO - GPT/UEFI install with full disk encryption: BTRFSonLUKS with separate root, home and pkg subvolumes; hibernation with a swapfile; auto-snapshots with easy system rollback (GUI); boot into snapshots

:scream: Not going to help with that! :wink:

No way around having only a single try before you get bumped to grub rescue, sorry.

Typing in the commands to give you a new try without rebooting takes way longer than a simple reboot, so I wouldn’t bother.

1 Like

I have done that for the first one and am using the EndeavourOS logo. But i want to change the logo for the other two drives. Before i would just rename them vmlinuz-linux.png and drop them in the /boot folder with the image.

What I did was setting rEFInd to not add boot entries automatically. I then edited the config file by adding two menu entries (EOS and Win10). In these you can point to an image.

There is an example in the config file, I believe, so you should be able to set this up.

That sounds difficult. Does it require adding all the info from grub such as uuid? :scream_cat:

No, it’s basically just the drive info grub will show you that you need to add to rEFInd.

When you boot and are asked for a password, it says something like
Enter passphrase for hd0,gpt2 (UUID of that device) :

The info “drive 0, partition 2” (/dev/sda2/) should point you in the right direction.


[EDIT]
Maybe check this old post for some pointers.

1 Like

Okay i will. But the way i did it before is by adding the image to /boot in each drive. Since rEFInd is only installed on the first drive how do i do this, using this method?

But each of your drives has a EFI partition containing the EOS .efi file that rEFInd uses.

I just checked the rEFInd config file on github and there is an example entry like fs0:\EFI\tools\launch_windows.nsh.

You could probably load EOS on the other drive by adjusting fsX:; e. g. using something like

loader fs1:/EFI/EndeavourOS/grubx64.efi

They are all EOS just different desktops. :grin:

@2000
Just an update on the BTRFSonLuks setup. I have managed to implement rEFInd and install multiboot with other BTRFSonLUKS installs and have separate icons for each in rEFInd for each desktop. This is only out of the ordinary when using the same distro with different desktops as the icon would be the same for all installs. The other thing that is different is i usually boot using the vmlinuz image rather than grub but on the BTRFSonLUKS because it’s setup with grub snapshots etc. it is booting from the grubx64.efi file. So i have managed to replicate the same procedure sort of that i use with booting the vmlinuz image thanks to @freebird54 with some advice. It’s working and i will use it for a while and see how it goes.

1 Like

@2000

Just wanted to ask what does this do exactly as you have it marked optional. So what is the difference?

sudo sed -i 's/compress=lzo/compress=zstd/' /usr/share/calamares/modules/fstab.conf
sudo sed -i 's/autodefrag/autodefrag,compress=zstd/' /usr/share/calamares/modules/fstab.conf

Is it just changing the file system compression?

@2000
I had another question regarding swap size. Is it possible to increase you swap size once set or delete it and make a new one or does it mess up the whole set up on Btrfs here?

Exactly. The verbose Wiki article explains this in more detail in #02.

Yes you can redo and modify this later on without problems.

1 Like

What is the exact procedure or best way to create a larger swap. I only did the 8G but my memory is 32G so i guess i should have went 32G?

Not necessarily. On my 32GB system I too have a swapfile that is only half that and usually don’t haven’t any issues with hibernation.

It depends on how much data needs to be stored to get your system back to its former state; which again depends on how RAM-heavy your system is at the time of hibernation.
For my use, anything over 16GB would probably just be a waste of space.

But if you absolutely need hibernation to work in every situation Ubuntu recommends 38GB swap if you have 32GB RAM. CentOS recommends the size of RAM + 2 GB.

Well it probably doesn’t need it. Not really doing anything. I was just wondering if i made it too small and how to change it as there are some problems using fallocate so I’m not sure on the procedure and i would probably use dd. So i would probably remove the existing and recreate a larger one or maybe it can be made larger with the dd command? Is it a swap file or swap partition on the Btrfs?

Encountered that too on occasion, but not consistantly; anyway the following will definitely work and create a 38GB large swapfile (without holes).

swapsizeGB=38
swapsize=$(( swapsizeGB * 1024 ))
sudo dd if=/dev/zero of=/swapfile count=$swapsize bs=1MiB status=progress

If it works just stick to it. :wink: Until it doesn’t …

It’s a swap file, so it can always be deleted and rebuilt again if need be.
Just run

sudo swapoff
sudo rm /swap/swapfile

to remove the swapfile and then rebuild it according to the guide,

So if i want to change the size i only have to change (swapsizeGB=)? Nothing else?

Yes, change to 38 for 38GB, for example.

But this is only a substitute for fallocate…
Don’t forget to run all the other commands needed before and after fallocate/dd described in the WIki

I keep ending up in a mess, is there any chance you could do a guide for a non-encrypted install without hibernate please?

I’ll assume you will still want swap; think of hibernation as an option, you don’t need to use it.

The following refers to the copy&paste Wiki article.


+++ non-encrypted version +++

Just follow the aforementioned guide, but …

#03
Don’t choose encrypt.


#05

  • change
btrfsonluks=`sudo blkid -o device | grep luks`

-to-

btrfsonluks=/dev/sda2

#06

  • change
fs_uuid=`sudo blkid -o device | grep luks` &&

-to-

fs_uuid=`sudo blkid -o device | grep sda2` &&
  • delete (do not run) …
fs_uuid=`sudo blkid -o device -l -t TYPE=crypto_LUKS` &&
fs_uuid=`sudo blkid -o value -s UUID $fs_uuid` &&
sudo sed -i "s/parent_device_uuid\" : \"/parent_device_uuid\" : \"$fs_uuid/" /etc/timeshift/timeshift.json &&

You should now have an equivalent system to the guide, without the benefit of full disk encryption.
Still don’t get why one would choose this :exploding_head: :pleading_face: … but if it makes you happy, go for it :wink:.

[Edit 2020-11-29] modified to reflect timeshifts new config location

3 Likes