Installer can't correctly setup grub when root is f2fs or xfs

Hello,
i can’t install with f2fs / xfs root formated because calamares failled to generate grub config.

On two latest stable isos.

would need the installer log to see why it fails :wink:
I go to try to reproduce.
But to see what exactly goes wrong needs:

cat ~/endeavour-install.log | eos-sendlog

from livesession after failed install.

1 Like

Must be something you missed… like on Bios may not set boot flag, or if on UEFI you do not set an ESP fat32 partition with boot flag ?

just done UEFI and BIOS test installs with xfs and has no such issue here.
Same done for f2fs without failing to install grub.

That is something I bypasses when setting up alternate filesystems, by running a separate /boot partition on ext4 and the rest of / on the other filesystem (f2fs or xfs). I would be interested if there is a way around that! BTW - grub was not involved except as an item to be removed…

:yum:

I just install in Bios mode using xfs/f2fs as / both filesystems are supported by grub afaik.
And on UEFI mode we need a fat32 ESP but /boot is also on the root partition.
I do not say it will be the best way… and personally, I see no reason to use this filesystems if there is no reason to do so.

Always there is a reason - the question is whether it’s a GOOD reason! f2fs is (at least theoretically) superior on NVME drives… and XFS is good for data drives if you don’t go all the way to ZFS…

That said - ext4 is the usual default for a reason (several of them, in fact)…

Thanks for your replies.
I’ve not problems when i manually install Archlinux.
I suspect f2fs-tools and xfsprogs packages not installed.

as i mentioned already, i do not have any issue using both filesystems for root device.
And i do not see why f2fs-tools and xfsprogs should produce an issue for you and not for others?
To see what happens it would need to see the installer log, without that it is only a view inside a magic ball. :wink:

I may be able to clarify…
I have a similar issue with F2FS not being bootable despite a clean installation with no issues WHEN I format the partition manually myself using mkfs.f2fs. It boots just fine if I let Calamares create the partition and format it through there but I’ve been unsuccessful in many of my attempts to get it to work when manually partitioning, which is required if you want to have F2FS compression enabled. Last I checked Calamares doesn’t enable compression when creating an F2FS filesystem and I have been unable to find a way of fixing grub to boot from the F2FS filesystem when I manually create it. I’ve tried all the standard grub fixes and none were successful… And yet I have no issue booting or any other issue if Calamares creates the F2FS partition itself.
I just wiped my drive so I’m gonna reinstall with a manual format and get the logs for you guys. Maybe we can find a solution together.
I will do my best to send the necessary information ASAP.

Edit:
Here’s the log converted to PDF. Hope it helps.
endeavour-install.pdf (112.7 KB)

the F2FS format command I used is as follows:
mkfs.f2fs -f -o 10 -O extra_attr,inode_checksum,sb_checksum,compression,encrypt -t 0 /dev/nvme0n1p3

Edit2:
To clarify, when I try to boot it sends me directly to grub rescue because it cannot find the file. And yes I’ve tried the usual fixes of directing grub to the correct file location and it doesn’t work. It is like I cannot see the F2FS partition. I’ve tried so many grub fixes that it would be difficult to list them all. None of them were successful. The ONLY thing that ever worked was letting Calamares create all the partitions and filesystems itself.

We do not set anything for how e2fs is setup with calamares aside from default fstab options that will be used generally:

Possible to have something here:

what could enable the compression on creation of e2fs filesystems.

I just avoid the entire issue, by splitting /boot off from the rest of the system, and formatting it ext4. This avoids all the 'can’t find filesystem type errors no matter WHAT you boot with (I use rEFInd) and then f2fs (or other unusual filesystems) can be safely and simply be utilized.

Grub SHOULD be able to figure it out, but there may be an entry required along the way to make it go - which I haven’t researched because mostly I avoid grub - but the separate /boot bypasses ALL the potential difficulties…

1 Like

I’m unfamiliar with this method of installation. Do you know of any guides or tutorials you can provide a link for that could help me do that?

According to this wiki page, it’s unknown if Refind can boot an F2FS filesystem:

Says only Grub2 can for sure boot F2FS and I know it works just fine if I let Calamares do the partition and filesystem creation but not if I create the filesystem myself. Even if all the partitions and everything are the same. Something happens (or doesn’t happen) during the installation with Calamares that prevents the F2FS partition from being detectable and I’ve been unable to figure out what that is or find a way of customizing Calamares to enable compression when it creates an F2FS filesystem.

I’m sorry if I should be posting this somewhere else. I’m not fully versed with forum etiquette or guidelines. I’ve had this issue for months and through several versions of Endeavour and really any version of Calamares.

Another question maybe… Is there a way to manually install Endeavour on to a F2FS partition? I remember reading a guide about installing Endeavour on to an LVM that’s encrypted with LUKS. Could that same method work but minus the encryption and minus the LVM?

I think I found the problem.

While GRUB supports F2FS since version 2.0.4, it cannot correctly read its boot files from an F2FS partition that was created with the extra_attr flag enabled.

Directly from the GRUB ArchWiki:
https://wiki.archlinux.org/title/GRUB

Which means unless I can find a way to install another bootloader that works, F2FS with compression is unusable as root partition.

It certainly can be done with the method I mentioned, I used it! I have an EnOS build with f2fs for the root, and ZFS for the data partition on my current system. I just created the partitions needed before starting the install (EFI was actually already there) so I made a small /boot partition of ext4, and one for the rest of /. When Calamares was running, I specified that the ext4 partition was to be mounted at /boot, that the EFI partition was /boot/efi and the rest was / - then proceeded as usual through the process. No tricks needed.

Grub will also work in this situation, but I use rEFInd myself, and there was no difficulty. No tricks needed there either. I didn’t encrypt, though - because I reserve that for the data drive, as there is nothing but system stuff and config files on the rest. You’ll need to do the research yourself on that if you want it to encrypt your root for some reason (or if you leave your data in /home).

yes i would say using a boot partition separated from root is what should do the trick.