Failure to enable XFS Qouta on root filesystem when running Centos 7 with uefi boot.

After running the Virtualmin install shell script, and finishing the first run wizard, Webmin recommends to reboot, to finish enabling quota on the root file system.

After reboot quota on the root file system is not enabled.

OS: Centos 7 x86_64 - up to date.

Cause: Webmin does only update the grub.cfg file found in /boot, and ignores the one in /boot/efi/EFI/centos/grub.cfg this causes the boot via efi to not get the needed change, and by default not enable quota's.

Fix for my setup:

[root@gw-rdam centos]# mv /boot/efi/EFI/centos/grub.cfg /boot/efi/EFI/centos/grub.cfg.orig
[root@gw-rdam centos]# grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg

Optionally make this check when the notification is displayed, so it can be fixed afterwards.


Fixed (pending)


Interesting - do all CentOS 7 systems have an extra grub.cfg file in that directory?

i just validated some different machines, all running "Centos 7 X86_64 - latest updates": - Centos 7 Bios boot (Virtual machine KVM / some random older systems): No "/boot/efi/*" folder exists at all. - Centos 7 EFI boot on physical hardware: (installed in EFI mode!) All have the before mentioned directory with the grub.cfg in the efi boot path.

The problem does exist for a while already, i noticed problems with quota support for the first time around August 2016. Many other tasks prevented me from investigating, and since quota where not mission critical on that machine i didn't bother to fix the problem until i hit it again for 3 times in a row last week.

Replication of the problem:
1 - Install a physical machine with EFI support enabled in "bios" using Centos 7
2 - In partitioning section of the installer make the following layout:

/xda1 - 2 GiB /boot       - xfs
/xda2 - 500 MiB /boot/efi - efi platform..
/xda3 - lvm remaining space for / and swap.

3 - yum update, reboot, run virtualmin from, finish the web based wizard, re-check installation --> get XFS reboot message, reboot --> get XFS message --> loop arround.

I was having a look at our installer, and actually Virtualmin doesn't update any GRUB config to enable XFS - it just assumes that an EXT filesystem is in use, and that quotas can be activated with the quotaon command.

Just experienced the same issue on a UEFI Centos 7 install. rootflags=uquota,gquota is successfully added to the /etc/default/grub template and /boot/grub2/grub.cfg. However UEFI installs don't use /boot/grub2/grub.cfg, they use /boot/efi/EFI/centos/grub.cfg.

Running "grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg" rebuilds the correct cfg file from the template at /etc/default/grub and correctly applies the changes.

Would be great if the installer could somehow detect UEFI installs and run this automatically

Is there a command or config file that can be used on a CentOS system to determine if it's using UEFI or not?

This should do it:

[ -d /sys/firmware/efi ] && echo UEFI || echo BIOS

Returns UEFI on my system. Should return BIOS for non-UEFI (BIOS) systems. So for centos / rhel 7, I reckon the best way would be:

  1. Update /etc/default/grub template with rootflags=uquota,gquota if XFS quotas aren't enabled.

  2. If [ -d /sys/firmware/efi ] && echo UEFI || echo BIOS returns UEFI run the following to rebuid grub.cfg from the template:

grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg (CentOS)
grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg (RHEL)

And if it returns "BIOS" run the following instead:

grub2-mkconfig -o /boot/grub2/grub.cfg

Hope this helps

PS. moving from a hosted WHM/cPanel VPS to my own dedicated server for the first time and just started playing with Webmin / Virtualmin. Loving it so far - awesome work mate! Great to hear it's by a fellow Aussie too. My linux skills aren't the best but I'll try and help with little things like this when I can

Assigned: Unassigned »

Joe, this looks like a fix that's needed in the install script?

Same problem this morning with a fresh install of C7.

Will the next update put things right?

Or will we have to wait 2 years for the next comment on this.

Ilia's picture
Submitted by Ilia on Sun, 07/26/2020 - 10:43

Will the next update put things right?


Or will we have to wait 2 years for the next comment on this.

No, and we are planning to make next Virtualmin 6.11 release this weekend.