1 System description
Hello! I am running Manjaro KDE on BTRFS with the default configurations from Architect.
1.1 Partitioning
- 100MB EFI
- some partitions for Windows
- 20GB swap
- 670GB btrfs partition:
-
@
subvolume for/root
-
@home
subvolume for/home
-
@cache
subvolume for/var/cache
-
2 Issue
When I installed Manjaro I chose kernel 5.10, however this one hangs on reboot/shutdown and I wish to downgrade to 5.9, but keep it easy to switch back to upcoming updates of 5.10 .
2.1 Try to solve this
I manage to choose the kernel I want from grub, but the choice is not saved and the next boot will load the default 5.10. In order to allow grub to save the default I set the following in /etc/default/grub
:
GRUB_DEFAULT=saved
...
GRUB_SAVEDEFAULT=true
and then sudo update-grub
.
2.2 What didn’t work
When I am rebooting and choosing kernel 5.9 I get the error:
error: sparse file not allowed
The system boots afterwards with kernel 5.9, but the choice is still not saved. After some googling I found out that this is because GRUB does not want to write to BTRFS due to possibility of corruption.
3 My next resolve
I am thinking that if I get /boot
to be mounted as ext4
, then grub will be able to carry on with writing the new default kernel choice.
3.1 What keeps me from doing that?
3.1.1 BTRFS shrink
I don’t have anymore unalocated space on my SSD, so I need to shrink the BTRFS partition. However, I found very few resources about shrinking a btrfs partition and I do not know if there is any caveat to doing so.
btrfs filesystem resize -1g /mybtrfs
3.1.2 Grub using the new /boot
I am afraid whether grub will know where the new /boot
is. Linux will sure mount it as fstab
dictates and I assume there will not be a problem there. But how does grub know about that? Is it enough to update-grub
and it will reconfigure itself?
4 My questions for you
Does anyone have any advices on how I should proceed with shrinking the btrfs partition? In addition, does anyone know how to make sure that grub will behave properly after this change?
If you have another idea how to solve this problem, I am eager to hear it.