From here on out, the steps are the same for both the CentOS and the Ubuntu virtual machines, except for the following:
- On your Ubuntu machine, the grub.cfg file is in the /boot/grub/ directory. On your CentOS machine, it's in the /boot/grub2/ directory.
- On Ubuntu, the /boot/grub/ and /etc/grub.d/ directories are world-readable. This means you can cd into them as a normal user.
- On CentOS, the /boot/grub2/ and /etc/grub.d/ directories are restricted to the root user. So, to cd into them, you'll need to log in to the root user's shell. Alternatively, you can list the contents from your normal user shell with sudo ls -l, and you can edit the files you need to edit with sudo ...