I met this one close up and personal. It’s pretty easy to fall into this trap. The modern fashion is to disable root (nologin) and no password. User 1000 created during installation becomes the administrator and a sudoer just like Apple does.
The fun begins when you naively add a USB disk to /etc/fstab identified by UUID and default mount options taken (auto and fail). Move the disk to another host to sneaker net stuff and the next boot will fail.
Init tries to deal with this gracefully by starting a shell on the console and inviting you to log in as root. But root has no password. And the administrative user (1000) is not a substitute known to the console shell.
I got out of this trap by bootng Pop_OS in demo mode, discovering it would let me sudo su, mounting the machine’s internal root filesystem, and repairing /etc/fstab using an available editor, nano was it? If there’s a Rocky Linux Live CD, I didn’t find it. A shout out to System76 for Pop_OS and its LiveCD.
Anyway, suggest init check root for /sbin/nologin or password not set and then check the admin user. I’m not sure how you’d identify that one, top entry in sudoers, and offer primary admin’s login.