Need help with CentOS issue in emergency mode Quota

I am currently taking a server administration class. Where we learn linux and make our own server. This is the first time the professor is doing it on CentOS. He is pretty good at making sure there are no issues. The manuals he makes are top notch but I ran into an issue with Quota and I messed it all up

5 Quota
To install quota, we run this command:
yum -y install quota
Now we check if quota is already enabled for the filesystem where the website (/var/www) and maildir data (var/vmail) is stored.
In our setup, we have one big root partition, so we search for ' / ':
[[email protected] ~]# mount | grep ' / '

/dev/mapper/centos-root on / type xfs (rw,relatime,attr2,inode64,noquota)

[[email protected] ~]#
If the line contains the word "noquota", then proceed with the following steps to enable quota.
Enabling quota on the / (root) partition
Normally you would enable quota in the /etc/fstab file, but if the filesystem is the root filesystem " / ", then quota has to be enabled by a boot parameter of the Linux Kernel.
Edit the grub configuration file:
vim /etc/default/grub
Search for the line that starts with GRUB_CMDLINE_LINUX and add rootflags=uquota,gquota to the command line parameters so that the resulting line looks like this:
GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet rootflags=uquota,gquota"
Save and Exit the file.
Apply the changes by running the following commands:
cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg_bak

grub2-mkconfig -o /boot/grub2/grub.cfg
And reboot the server, reboot

As I went to reboot was propted with this screen

I trying to figure out how to get the backup file of the grub.cfg_bak back in.

quotas.... yeah. had probs with them also.

well, maybe journalctl shows you some errors?

cp /boot/grub2/grub.cfg /boot/grub2/grub.cfg_bak

so your grub.cfg_bak is in /boot/grub2. so why not try to use your _bak file?

I'm trying to use the bak file but I can't seem to get to it.
When I
CD /boot/grub2
Returned with no such file directory.

here is what I get when I to a "ls" command

Are you booted or are you in the recovery console?

If your in the recovery console, reboot, press e at the grub screen edit your entry by removing the rootflags part you added and press Ctrl+X to boot

Once in post your /etc/defaults/grub file

or

grep GRUB_CMDLINE_LINUX /etc/default/grub
1 Like

OH MAN! Thank you @Eden

2 Likes