Ubuntu – What filesystem should /boot be

grub2partitioningsystem-installationuefi

I recently decided to set up my custom built system to be Linux only and I manually set up /boot, /, and swap partitions with /boot and / being ext4 filesystem types. Upon completing installation of Ubuntu 13.10 (as my 14.04 iso was corrupt) and restarting, I would be faced with grub rescue prompt. I tried installing the boot loader installation on /dev/sda and /dev/sda1 where my /boot partition was and it seemed my system could not find grub. I finally got tired of messing around with this and deleted all my partitions using GParted and installed from a Live DVD and allowed the installer to install Ubuntu for me. When it was done installing, I became curious and checked via GParted how the partitions were set up and the partitions were the same with the exception of /boot was using the fat32 filesystem. I rebooted the system and it booted up correctly with no problems.

Are there certain filesystem types that should be used for the /boot partition simply so grub will be found/read?

Best Answer

In theory, almost anything that both the Linux kernel and GRUB (or whatever boot loader you use) can read is suitable for /boot. Most distributions default to ext4fs, but I've used ext2fs, ext3fs, and XFS with no problems under Ubuntu. I don't recall offhand if JFS is supported at installation. If so it should work fine, too. ReiserFS, HFS+, and FAT are not supported for /boot by Ubuntu's installer, but they all work fine if you set them up after the fact. Chances are a few more (NTFS, exFAT, and some others) would work, too, but I've never tried them -- at least, not with GRUB. FAT deserves special mention because, if you're using EFI, the EFI System Partition (ESP) is FAT, and mounting the ESP at /boot can simplify use of certain boot loaders and boot managers, such as ELILO and gummiboot, which require the kernel to reside on the same partition as the boot loader. Ubuntu uses GRUB 2 by default, so this isn't an issue with Ubuntu if you use the default boot loader, but if you want to experiment it might be worth considering. OTOH, using FAT for /boot will slightly complicate OS version updates and re-installations.

One complication to changing the filesystem on /boot (on an already-installed system) is that you may need to completely re-install GRUB. The reason is that its filesystem driver gets built into its binary (stored in the sectors following the MBR, in the BIOS Boot Partition, or in the grubx64.efi file, depending on the boot mode and partition table type). Thus, if you change the filesystem, that binary must be reconstructed, which is done by grub-install. This isn't an issue for fresh Ubuntu installations, since the installer will run grub-install as part of the installation process, so it should work fine as long as the Ubuntu installer itself accepts your choice of filesystem -- which, as I've said, will actually narrow your choices from what GRUB permits.

Related Question