I have Ubuntu 18.04 installed on a UEFI system with /boot
on a btrfs partition (subvol=@).
Because of recent changes in Ubuntu I always get grub timeout 30 sec. This is by design if /boot
is on a btrfs partition.
Part of /grub.cfg
function recordfail {
set recordfail=1
# GRUB lacks write support for btrfs, so recordfail support is disabled.
}
...
if [ "${recordfail}" = 1 ] ; then
set timeout=30
I think that if I create a separate ext2 /boot
partition the problem will be solved.
The question is if the above assumption is correct, how do I move boot
from a btrfs subvol to an ext2 partition?
I managed to do it using Boot-repair from a LiveUSB.
Before start I recommend to create a snapshot of
@
subvolume in case something goes wrong.Shrink
/
partition to leave 1-2 GB free withgparted
Create
ext2
partition.Mount the
/
partition to/mnt
Mount the new
ext2
partition to/media
Run
cp -a /mnt/@/boot/* /media
Edit
/mnt/@/etc/fstab
and add there mount of the newext2
partition to/boot
.Delete old boot from
/
bysudo rm -r /mnt/@/boot
Run
sudo umount /mnt && sudo umount /media
Run
boot-repair
and do a default check.All should work, and grub timeout is OK now.
There is another way to fix timeout issue on btrfs file systems.
You can add
to
/etc/default/grub
and runsudo update-grub
.But make sure you can always get into UEFI settings using ESC or other key.