Partitioning for Btrfs

What does your current setup look like?

sudo parted -l

cat /etc/fstab

1 Like
[uwe@HAL ~]$ sudo parted -l
[sudo] Passwort fĂŒr uwe:
Modell: ATA Samsung SSD 860 (scsi)
Festplatte  /dev/sda:  250GB
SektorgrĂ¶ĂŸe (logisch/physisch): 512B/512B
Partitionstabelle: gpt
Disk-Flags:

Nummer  Anfang  Ende    GrĂ¶ĂŸe   Dateisystem     Name      Flags
1      1049kB  538MB   537MB   fat32           Boot EFI  boot, esp
2      538MB   1612MB  1074MB  ext4            Boot      boot, esp
3      1612MB  241GB   239GB   btrfs           System
4      241GB   250GB   9123MB  linux-swap(v1)  Swap      swap


Modell: ATA ST2000DM008-2FR1 (scsi)
Festplatte  /dev/sdb:  2000GB
SektorgrĂ¶ĂŸe (logisch/physisch): 512B/4096B
Partitionstabelle: gpt
Disk-Flags:

Nummer  Anfang  Ende    GrĂ¶ĂŸe   Dateisystem  Name  Flags
1      1049kB  2000GB  20

[uwe@HAL ~]$ cat /etc/fstab
# <file system>                           <mount point>  <type>  <options>                                        <dump>  <pass>
UUID=6B27-4ECC                             /boot/efi      vfat    umask=0077                                      0       2
UUID=e8267b53-a196-4ce5-bd51-6481d3ed65ff  /boot          ext4    defaults,noatime                                0       2
UUID=d4ea77de-a2db-42c2-aca9-10bb58f70661  /              btrfs   subvol=/@,defaults,noatime,space_cache,autodefrag,compress=lzo       0       1
UUID=d4ea77de-a2db-42c2-aca9-10bb58f70661  /var/cache     btrfs   subvol=/@cache,defaults,noatime,space_cache,autodefrag,compress=lzo  0       2
UUID=d4ea77de-a2db-42c2-aca9-10bb58f70661  /var/log       btrfs   subvol=/@log,defaults,noatime,space_cache,autodefrag,compress=lzo    0       2
UUID=76c9bf53-88a4-4d70-8949-b23a590140a8  /home          ext4    defaults,noatime                                0       2
UUID=2d8c57a0-3705-430c-ad9b-4f368e4d7b6f   none          swap    defaults                                        0       0
tmpfs                                      /tmp           tmpfs   defaults,noatime,mode=1777
1 Like

Looks you’ve got all the subvolumes as you would have if you had done it @joe’s way. I wouldn’t have any reason to re-install. What @joe’s method would give (as he mentioned) is the options to automatically set up swap partition/file with or without hibernation and also full disk encryption when you do a full “erase disk and install”.

1 Like

thx @pebcak :ok_hand:t2:

1 Like

One more question came to my mind. for a reinstallation due sometime: shouldn’t I format the boot partition in btrfs as well or is ext4 (or xfs?) the better choice? Sorry guys that I ask you here holes in the belly, but I want to learn something :wink:

1 Like

If you format that partition in btrfs, won’t you be back to the grub issue you had before? Isn’t that why you created the boot partition?

1 Like

That’s right, I hadn’t thought of that. Thanks for that.

@joekamprad : I have now installed EnOS on another computer using your method (not manually, but with the automatic routine). In the end, I had the problem again that the grubenv could not be read, because no extra bootpartition was created outside the EFI partition. The bootloader was probably installed on /. I wonder why this is then regulated in the automatic installation. In the installation WITH boot partition, however, BOTH partitions (efi-boot and boot) are flagged as boot/esp. Seems a bit strange to me. Would that be correct?

(Ich habe jetzt mal auf einem anderen Rechner EnOS nach Deiner Methode installiert (allerdings nicht manuell, sondern mit der automatischen Routine). Im Endeffekt hattte ich dort auch wieder das Problem, dass die grubenv nicht gelesen werden konnte, da keine extra Bootpartition außerhalb der EFI-Partition erstellt wurde. Der Bootloader wurde vermutlich mit auf / installiert. Ich frage mich, warum das dann in der automatischen Installation so geregelt wird. Bei der Installation MIT Boot-Partition allerdings sind BEIDE Partitionen (efi-boot und boot) als boot/esp geflaggt. Scheint mir etwas seltsam. WĂ€re das denn korrekt?)

2021-05-27_22-06

this is how it will partition on automatic (EFI) here with encryption
 no /boot partition but booting without any issue

1 Like

Correct, it looks exactly the same on said computer. However, I have the same problem there with an unreadable grubenv, as before on my computer. That means, changes (e.g. LTS kernel to be booted) are not processed despite update. I could only solve this with an explicit boot partition in ext4, which was then also flagged with boot/esp, which seems strange to me (I now have 2! partitions with flag boot/esp).

Do you have something else installed on the system besides EndeavourOS?

nope, only EnOS

Is that system UEFI? It seems strange? A boot partition isn’t needed. Even on Mbr you don’t need it. You can just install to /. :thinking:

Edit: I’m not sure about Btrfs. I just installed it using @2000 tutorial.

I have experienced the same on 2 machines now. A change in grub (because of other kernel e.g.) is only accepted if an ext4 boot partition is present. With an automatic installation with only an EFI partition in fat32 a change in grub is ignored. If I install manually, same problem. If I can’t solve this, I will go back to ext4 until my knowledge level is better.

as @dalto said, I have the same problem with grub again with the automatic installation (without boot partition).

Again: if I install another kernel (e.g. LTS) and then want to set grub to reboot the last used kernel, I get a GRUB_DEFAULT=saved entry that says
I get an error message at boot time and it is ignored. I can escape this ONLY by an extra boot partition in ext4 


:exploding_head:

I just installed using btrfs in a vm. This is what i got using the automatic erase disk and swap to file setting calamares to “Btrfs” file system on the live ISO.

Screenshot_2021-05-27_19-50-56

Edit:

[ricklinux@eos-xfce ~]$ 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=D6F3-B83E                            /boot/efi      vfat    umask=0077 0 2
UUID=c55ca30f-ea1a-4b78-86de-fca3c373bc58 /              btrfs   subvol=/@,defaults,noatime,space_cache,autodefrag 0 1
UUID=c55ca30f-ea1a-4b78-86de-fca3c373bc58 /home          btrfs   subvol=/@home,defaults,noatime,space_cache,autodefrag 0 2
UUID=c55ca30f-ea1a-4b78-86de-fca3c373bc58 /var/cache     btrfs   subvol=/@cache,defaults,noatime,space_cache,autodefrag 0 2
UUID=c55ca30f-ea1a-4b78-86de-fca3c373bc58 /var/log       btrfs   subvol=/@log,defaults,noatime,space_cache,autodefrag 0 2
UUID=c55ca30f-ea1a-4b78-86de-fca3c373bc58 /swap          btrfs   subvol=/@swap,defaults,noatime,space_cache,autodefrag 0 2
/swap/swapfile                            swap           swap    defaults,noatime 0 0
[ricklinux@eos-xfce ~]$ 
1 Like

Exactly the same for me! But then why do I get the problem with Grub as soon as I make a change there in Grub? Thanks @ricklinux

What change? Like installing another kernel? I’ll try. This is in vm though.

Yes, and then specify to boot from the last kernel used

GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true

These two lines then cause an error message at boot time

EXCEPT, boot is on ext4

First of all i installed the lts kernel. No problem.

[ricklinux@eos-xfce ~]$ uname -a
Linux eos-xfce 5.10.39-1-lts #1 SMP Sat, 22 May 2021 10:57:31 +0000 x86_64 GNU/Linux
[ricklinux@eos-xfce ~]$ 

Now i will make changes to grub. BRB

1 Like