Single User Mode
====================================================================================
You might need to boot into single user mode in some of the following cases:
Completely locked out of server - no credentials know
root or sudo users inaccessible.
Filesystem corruption
====================================================================================
Reboot server and access console via OOB (DRAC or KVM)
Once you see the kernel selection screen in boot menu, hit 'e' on your keyboard. This will load up the GRUB boot menu.
Once here, you want to instruct GRUB to boot the system into single user mode by appending the following to the line beginning with 'linux' or similar:
init=/bin/bash
Once you've appended this to the line, press ctrl + x to proceed with the boot up.
You should then be entered into the system at single user mode, you'll know this has worked because you'll be shown the CLI showing:
:#
From here, we then need to mount the filesystem with rw (read & write) enabled:
(ensure to mount the correct disk)
mount -o remount,rw /dev/sda1 /
You can then look to reset the password for required accounts, ie ukfastsupport, root, graphiterack:
passwd username
Once you've reset the required passwords, you then need to remount the filesystem as ro (read only):
(ensure to mount the correct disk)
mount -o remount,ro /dev/sda1 /
Now we can look to reboot the system via OS:
shutdown -r now, reboot, systemctl reboot etc
You should now be able to access the server via SSH using the newly reset credentials.
No Comments