Ubuntu 17.04 will not boot on UEFI system with XFS system partition

Solution 1:

I haven't tried such an installation in a while, but it sounds like there's a bug in GRUB's XFS support, or at least in the way Ubuntu sets it up. I have three suggestions for workarounds:

  • Create a separate /boot partition -- If you create a separate /boot partition and use ext4fs on it, that will eliminate GRUB's need to read XFS, which should bypass the problem. I recommend making /boot at least 500 MB in size, and maybe as large as 1 GB.
  • Mount the ESP at /boot -- This approach is a variant of the preceding one. I'm pretty sure that the Ubuntu installer will refuse to accept this layout, so you'd need to install in some other way and then tweak the configuration using an emergency boot system. Even aside from the difficulty setting this up, there's one BIG caveat: Ubuntu sometimes (but not always) creates symbolic links as a temporary part of installing a new kernel. Since FAT (which is used on the ESP) does not support symbolic links, this will fail, as will any kernel update that creates symbolic links. Thus, this approach will cause minor problems from time to time. If your computer were a Mac (or if you were installing to a VirtualBox virtual machine), you could use HFS+ on the ESP, which is a violation of the EFI spec but would work on a Mac or under VirtualBox. Using HFS+ on the ESP will not work on any UEFI-based PC I know of. In any event, you'd want to ensure the ESP was big enough (at least 512 MiB) if you try this.
  • Use rEFInd and the efifs XFS driver -- GRUB isn't the only EFI boot loader for Linux; but most require that the kernel reside on the same partition as the boot loader itself. GRUB and my own rEFInd are the two exceptions to this rule. The trick with rEFInd is that it includes no XFS support; however, there is an XFS driver for EFI available in the efifs package. Thus, installing both rEFInd and the XFS driver from efifs should work. The trick is that you'll need to do this at least somewhat manually and from an emergency system, so it'll be a pain to set up. Also, efifs is derived from GRUB's filesystem drivers, so if GRUB's XFS support is flaky, efifs might not be any better.

Overall, creating a separate ext4fs /boot partition is likely to be the easiest solution; however, if you're really keen on having everything (except the ESP) on XFS, you could try rEFInd or mounting the ESP at /boot. Of those two, I'd recommend rEFInd above mounting the ESP at /boot; mounting the ESP at /boot is just too far from what Ubuntu expects to be a good choice, particularly since you're likely to see occasional failed kernel package updates. I mentioned that option mainly for completeness, not to say it's a good idea.