There is recovery mode on desktop versions but I don't know whether it exists on sever versions. It can drop a rootshell, so maybe stop reading my answer and check out whether it exists.
If it doesn't, you can chroot into the system if you can boot into a live session. So do the latter and execute these commands:
sudo mount /dev/sdxY /mnt
sudo mount /dev/sdzY /mnt/boot # THIS LINE ONLY WHEN USING A DEDICATED BOOT PARTITION!!!
sudo mount /dev/sdwY /mnt/boot/efi # THIS LINE ONLY WHEN USING UEFI!!!
sudo mount -t devtmpfs /dev /mnt/dev
sudo mount -t devpts /dev/pts /mnt/dev/pts
sudo mount -t sysfs /sys /mnt/sys
sudo mount -t proc /proc /mnt/proc
sudo mount -t tmpfs /run /mnt/run
Replace /dev/sdxY
with your system partition, /dev/sdzY
with your boot partition, and /dev/sdwY
with your efi partition (but why the hell would you be using uefi anyway!?).
And then run sudo chroot /mnt /bin/bash
to chroot into the other system. You can exit via exit
.