4

I have ubuntu 16.04 running on BTRFS, but since some pages said that GRUB2 (2.02-beta2) cannot boot from BTRFS, I made a boot partition in ext4 for /boot. But this partition is too small now, only 150MB. Can I put /boot onto BTRFS? And how can I test it without making my system unbootable?

Is it possible to create a /boot2 directory in btrfs, copy the files from /boot into it and change /boot/grub/grub.cfg by adding a new menu entry saying "boot from /boot2"?

(I have not activated UEFI)

1 Answer 1

1

You can put grub on btrfs with no problems.

It is not a good idea to have /boot as a separate partition on a desktop computer unless you have a specific reason for that.

The easiest way is to re-install the system without creating a separate /boot.

It is possible to move boot from a separate partition to your / btrfs partition, but I am afraid it will take much more effort for me to explain and for you to do it.

10
  • Let me explain what I know and not know: bios boots into MBR, MBR boots into some second boot record(?), somebody looks into the GPT partition table for the boot flag, grub menus are taken from there and presented me as the grub menu. When I select a system to boot, grub loads the kernel from /boot. So when I unmount current /boot, make a new /boot directory in btrfs, copy all files into it and mark that partition as "boot", will it work?
    – user372194
    Oct 6, 2016 at 17:20
  • Grub bootloader is located in the first sectors of the physical disk. Grub config files are located on the /boot partition. Boot flag is irrelevant for linux. So you can't "mark" a partition as boot. You will need to re-install grub to let bootloader know where to look for config files.
    – Pilot6
    Oct 6, 2016 at 17:32
  • So how does the system find my ext4 boot partition and mount it to /boot?
    – user372194
    Oct 6, 2016 at 17:38
  • 1
    So this is my plan to do it: #create copy of boot area *** cd /boot *** sudo tar cfv /xboot.tar *** sudo mkdir /boot2 *** cd /boot2 *** sudo tar xf /xboot.tar *** sudo rm /xboot.tar *** #rename *** mv /boot /boot-old *** mv /boot2 /boot *** #new grub install: *** sudo grub-install /dev/sdb5 ????*** sudo debconf-show grub-pc *** sudo dpkg-reconfigure grub-pc
    – user372194
    Oct 22, 2016 at 8:28
  • 1
    I successfully moved boot from a separate ext4 partition into my btrfs partition.
    – user372194
    Sep 3, 2017 at 21:37

You must log in to answer this question.