Score:0

Ubuntu running only graphics mode and I cant change to text mode

jp flag

I working on VM machine Ubuntu in text mode. But today my machine have run in graphics mode. Although that it was version with only text mode. Maybe any packet installed some graphics modules. And now I can do nothing. Because Ubuntu in graphics mode have not any application like terminal. I can only enter to recover mode ( but it doesnt make sense because there is the same effect ) and grub edit/console. I tried to connect via ssh and I can only login for ubuntu user not root. So only way to enter to root directory is using any distro live linux and then no problem to get root data and all files on the disk. Maybe problem is related to vm disk corruption ? What can I do to run my machine in text mode ?

sudodus avatar
jp flag
The accepted answer at [this link](https://askubuntu.com/questions/900985/how-can-i-simply-change-into-a-text-mode-runlevel-under-systemd) should help you get back to text mode: `sudo systemctl start multi-user.target` if you can run it from your recovery mode. In graphics mode maybe via an Alt + F2 "Run" window.
jp flag
I connected via ssh to this machine but I can login only standard user I cant login to root user.
sudodus avatar
jp flag
Please ask the system administrator to help you.
Score:2
jp flag

Ok the problem I solved. If you have sudoers users then you can connect via ssh to machine. If you dont have one then to run rescue iso or live distro. I have used Linux Mint. ( Machine must have to boot from rescue disk and attached disk with our problematic system ) Next it need to mount it and do chroot like this:

$ su sudo
$ fdisk -l                           ### disk list ( sda1, sda2 ..)
$ mount /dev/sda1 /mnt/ubuntu        ### if not mounted
$ mount --rbind /dev /mnt/dev
$ mount --rbind /proc /mnt/proc
$ mount --rbind /sys /mnt/sys
$ chroot /mnt

and next steps are shared:

$ vim /etc/default/grub

#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX="text"
GRUB_TERMINAL="console"

and update settings:

$ update-grub
$ systemctl set-default multi-user.target

Next to restart system changing boot order on the right one ... and FINISH :)

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.