Introduction
If you're experiencing problems with your Linux system booting directly to a terminal (tty1) and encountering errors when trying to start the graphical interface, this guide will walk you through troubleshooting steps, backing up your data, and creating a bootable Linux Mint USB drive—all from the command line.
Table of Contents
1. Understanding the Issue: Booting to tty1
When your Linux system boots directly to a terminal interface (tty1) and asks for your login credentials, it usually indicates an issue with the graphical user interface (GUI). After logging in, you might encounter errors related to sound drivers or other components, as shown in the image below:
This could be due to a misconfiguration, corrupted files, or issues with the display manager or breaking of the packages associated with the GUI.
2. Starting the Graphical Interface Manually
If your system isn't automatically starting the GUI, you can try starting it manually:
sudo service lightdm start
If you encounter an error like lightdm.service not found
, it indicates that the display manager isn't installed or configured properly. Your machine may be using other interfaces like gdm3, etc. Check for them the same way I tested for lightdm.
Solution:
Install LightDM (if not installed):
sudo apt-get install lightdm
Start LightDM:
sudo service lightdm start
If the GUI starts but you're asked to log in again and receive a "failed to start session" error, there may be deeper issues with the configuration or user profile.
In that case you most likely need to reset the whole system.
3. Backing Up Your Data to a USB Drive
To back up your data to a USB drive from the terminal:
Insert the USB Drive and identify it using
lsblk
:lsblk
Your USB drive should appear as something like
/dev/sdc1
. If it appears as just/dev/sdc
, it might need partitioning.Create a Mount Point:
mkdir /mnt/usb
Mount the USB Drive:
sudo mount /dev/sdc1 /mnt/usb
Copy Your Data:
sudo cp -r /home/your_username /mnt/usb
Safely Unmount the USB Drive:
sudo umount /mnt/usb
Handling Unpartitioned USB Drives
If your USB drive shows as /dev/sdc
without partitions:
Create a New Partition:
sudo fdisk /dev/sdc
Follow the prompts to create a new partition, then format it:
sudo mkfs.vfat /dev/sdc1
You can specify the partition type while using the mkfs command.
Mount and Copy Data as described above.
5. Using Timeshift to Restore Your System
If you have Timeshift installed, you can restore your system to a previous snapshot:
List Available Snapshots:
sudo timeshift --list
Restore a Snapshot:
sudo timeshift --restore
Follow the on-screen prompts to complete the restoration. Afterward, reboot your system:
sudo reboot
This will reboot the system to the time the snapshot was taken with all the configurations and rivers present at the time of the snapshot.
6. Creating a Bootable USB Drive
If you need to reinstall Linux or create a live USB for troubleshooting, here's how to create a bootable USB drive:
Download the ISO:
wget -O linuxmint.iso https://mirrors.edge.kernel.org/linuxmint/stable/21.2/linuxmint-21.2-cinnamon-64bit.iso
Here, I have downloaded the iso file of Linux Mint you can download as of your preferences.
Identify Your USB Drive using
lsblk
and unmount it:sudo umount /dev/sdc1
Write the ISO to the USB Drive using
dd
:sudo dd if=linuxmint.iso of=/dev/sdc bs=4M status=progress oflag=sync
With this the drive will be a bootable drive and you can fix or completely reinstall the system with this drive.
7. Conclusion
Dealing with boot issues and system recovery in Linux can be challenging, but with the right tools and commands, you can navigate through most problems. Whether you're backing up data, restoring your system with Timeshift, or creating a bootable Linux Mint USB drive, this guide has provided you with the essential steps to get your system back on track.