stuck in tty1 because of changes in fstab-file
Recentley i installed another linux distro on another partition on my SSD disk. During the instalation i reinstalled grub on the computer, and ever since my Ubuntu OS has been very slow to boot up. This has never been an issue before , and im very qurious to find out what is causing it.
Before this, the boot has been very fast. As soon as i log in the ssd seems to work fine, no change i behaviour.
I reinstalled grub on my ubuntu distro and now grub displayes Ubuntu and an old linux mint distro i have deleted to make room for a new one.
I followwed another solution changing the UUID in /etc/fstab, by baking up the original and creating a new one.
I ran:
sudo vim /etc/fstab
This file was empty so I entered the UUID for the swap memory partition. Now I'm stuck in tty1.
I've tried to reinstall Ubuntu desktop, ctrl + alt +f7, tried to run sudo /etc/init.d/gdm restart
nothing works. I've checked a lot of similar issues "stuck in tty1" etc. nothing is working.
Trying to fix the /etc/fstab.bak file by running:
sudo cp /etc/fstab.bak /etc/fstab
is not working beacause i only get "read-only" in the tty1 output. Please help, i dont want to reinstall my OS.
Update: I tried following this answer, but every terminal command in the answer gives output like: this doesnt exist, no such directory etc.
I've looked at several similar tty1 issues/post and i'm still stuck.
Well you didn't have to follow the steps from my answer exactly. But here is a detailed way to recover your system from the slow boot:
-
Undo the
GRUB
modification:-
Open GRUB:
sudo nano /etc/default/grub
-
Change this line:
GRUB_CMDLINE_LINUX_DEFAULT=
to
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
Now save the file and exit: Ctrl + O, then Enter and Ctrl + X.
-
Update GRUB:
sudo grub-mkconfig -o /boot/grub/grub.cfg
-
-
Now, open a terminal and type:
sudo blkid
and note down the
UUID
of your swap partition. The output will have a line that looks something like:/dev/sda6: UUID="727cac18-044b-4504-87f1-a5aefa774bda" TYPE="swap" PARTUUID="8rof66hg-12"
ITS BETTER TO COPY THE UUID
PART FROM THE ABOVE OUTPUT, i.e., 727cac18-044b-4504-87f1-a5aefa774bda
-
BACKUP YOUR EXISTING FSTAB FIRST BY TYPING THE FOLLOWING COMMAND:
sudo cp /etc/fstab /etc/fstab.bak
-
3a. Next, open your
etc/fstab
file:sudo nano /etc/fstab
-
-
Repalce the
UUID
of the existingswap
partition with the one that you copied earlier, i.e., changeUUID=whateverishere none swap defaults 0 0
to
UUID=727cac18-044b-4504-87f1-a5aefa774bda none swap defaults 0 0
Now save the file and exit: Ctrl + O, then Enter and Ctrl + X.
Reboot.