6

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?

Pilot6
  • 92,041

2 Answers2

4

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.

  1. Shrink / partition to leave 1-2 GB free with gparted

  2. Create ext2 partition.

  3. Mount the / partition to /mnt

  4. Mount the new ext2 partition to /media

  5. Run cp -a /mnt/@/boot/* /media

  6. Edit /mnt/@/etc/fstab and add there mount of the new ext2 partition to /boot.

  7. Delete old boot from / by sudo rm -r /mnt/@/boot

  8. Run sudo umount /mnt && sudo umount /media

  9. Run boot-repair and do a default check.

All should work, and grub timeout is OK now.

Pilot6
  • 92,041
0

There is another way to fix timeout issue on btrfs file systems.

You can add

GRUB_RECORDFAIL_TIMEOUT=0

to /etc/default/grub and run sudo update-grub.

But make sure you can always get into UEFI settings using ESC or other key.

Pilot6
  • 92,041