<SOLVED> Login screen not appearing. Can't run fsck in recovery mode.

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Miss_Fab01
Level 1
Level 1
Posts: 12
Joined: Wed Apr 07, 2021 11:04 pm

<SOLVED> Login screen not appearing. Can't run fsck in recovery mode.

Post by Miss_Fab01 »

I'm very new to Linux.

I recently had a problem where I incorrectly changed the ownership of the home directory :oops:. This problem has been resolved thanks to help from this forum.

However, after the problem was resolved I tried to use Timeshift and after going through its normal process it became stuck on a blank screen for a long time and I was forced to manually shut down the computer.

Now when I turn the computer on the GRUB boot menu doesn't show (the computer is dual boot with Windows) and it is just stuck on a blank black screen again.

I've tried to fix the problem by booting from CD/DVD and following this tutorial viewtopic.php?t=162096 however, after I enter

Code: Select all

sudo grub-install --root-directory=/mnt/ /dev/sda
I get "this GPT partition label contains no BIOS Boot Partition; embedding won't be possible".

I've tried this process with each of the Linux partitions but to no avail. I'm not sure what to try next.

EDIT: I did a live boot and used Timeshift and this has solved the problem of the GRUB boot menu not appearing. However, the normal login screen after this does not appear.

Also, when I try to run a fsck in recovery mode I get:

fsck from util-linux 2.31.1
/dev/sda5 is mounted.
e2fsck: cannot continue, aborting
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
linux-rox
Level 10
Level 10
Posts: 3334
Joined: Sun Jul 19, 2020 9:17 pm

Re: Black screen and no GRUB menu.

Post by linux-rox »

Let's start with, if the system freezes, don't shut down with the power button. You're likely to corrupt the file system, which can be fixed but it's a PITA. Instead, what you should do is press Alt+SysRq, then still holding the Alt key press S U O to shutdown or S U B to reboot (can be either upper or lower case). Practice this a few times so you know how it works, then put the steps on a note next to your computer.

Now, to your problem. First, that tutorial from 2014 is ancient by computer standards. This one is relatively new and more comprehensive. As it happens, though, the simplest way to reinstall Grub is to restore a Timeshift snapshot. By default, Timeshift reinstalls Grub (though this can be unselected). So, boot a live session and try again to restore the snapshot you were trying to restore in the first place.
Miss_Fab01
Level 1
Level 1
Posts: 12
Joined: Wed Apr 07, 2021 11:04 pm

Re: Black screen and no GRUB menu.

Post by Miss_Fab01 »

linux-rox wrote: Sat Apr 10, 2021 2:10 am Let's start with, if the system freezes, don't shut down with the power button. You're likely to corrupt the file system, which can be fixed but it's a PITA. Instead, what you should do is press Alt+SysRq, then still holding the Alt key press S U O to shutdown or S U B to reboot (can be either upper or lower case). Practice this a few times so you know how it works, then put the steps on a note next to your computer.

Now, to your problem. First, that tutorial from 2014 is ancient by computer standards. This one is relatively new and more comprehensive. As it happens, though, the simplest way to reinstall Grub is to restore a Timeshift snapshot. By default, Timeshift reinstalls Grub (though this can be unselected). So, boot a live session and try again to restore the snapshot you were trying to restore in the first place.

Hi linux-rox, thank you for your advice. I wasn't aware that I should (or could) shut down using Alt+SysRq. I will do this in future if the system freezes again.

As you suggested, I booted from my CD/DVD and used Timeshift. However, toward the end of the "restoring snapshot" process it seems to be having trouble with "updating bootloader configuration" and says "restore completed with errors" once it's done. Now when I start my computer the GRUB boot menu appears but after this the normal login screen doesn't appear.

At the GRUB menu I went into Advanced Options and Recovery Mode. Under system summary it says "System database (APT) - Database is consistent: no (BAD)". I'm not sure what this means, could this be part of the problem? I also tried "fsck - check all file systems" but this gives an error as does the "clean" option.

I'm going to try some of the other suggestions from the link you posted. I will let you know how I go. Thanks for your help.
linux-rox
Level 10
Level 10
Posts: 3334
Joined: Sun Jul 19, 2020 9:17 pm

Re: Black screen and no GRUB menu.

Post by linux-rox »

This doesn't sound to me like a Grub problem. Rather, I think you have a file system problem. That's what fsck is for, it checks the file system. What you should do is run it manually, from Terminal in a live session. Don't have time this morning to detail the steps, but there are plenty of articles on the internet. Or maybe someone else can jump in and walk you through it. Good luck.

Edit: Maybe you've done this already, but a few pointers. First, you need to know which are the Mint partitions. Run lsblk --output name,size,fstype. The one or ones listed as ext4 are the Mint partitions. Then you run a command like this: fsck -fy /dev/sdxn, replacing sdxn with the appropriate device designation, e.g., sda4. As mentioned, you can do all this from Terminal in a live session.
Miss_Fab01
Level 1
Level 1
Posts: 12
Joined: Wed Apr 07, 2021 11:04 pm

Re: Black screen and no GRUB menu.

Post by Miss_Fab01 »

linux-rox wrote: Sat Apr 10, 2021 11:26 am This doesn't sound to me like a Grub problem. Rather, I think you have a file system problem. That's what fsck is for, it checks the file system. What you should do is run it manually, from Terminal in a live session. Don't have time this morning to detail the steps, but there are plenty of articles on the internet. Or maybe someone else can jump in and walk you through it. Good luck.

Edit: Maybe you've done this already, but a few pointers. First, you need to know which are the Mint partitions. Run lsblk --output name,size,fstype. The one or ones listed as ext4 are the Mint partitions. Then you run a command like this: fsck -fy /dev/sdxn, replacing sdxn with the appropriate device designation, e.g., sda4. As mentioned, you can do all this from Terminal in a live session.
My partitions are:
sda1 is /boot/efi
sda5 is /
sda7 is /home

I tried doing a live boot and using fsck -fy /dev/sdxn as you suggested but unfortunately that hasn't solved the problem of the login screen not appearing. I can't run fsck from recovery mode either as it says that "/dev/sda5 is mounted. e2fsck cannot continue, aborting" :(
User avatar
Larry78723
Level 14
Level 14
Posts: 5476
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

Re: Login screen not appearing. Can't run fsck in recovery mode.

Post by Larry78723 »

You need to boot from your install USB/DVD, open a terminal, and run fsck -fy /dev/sdxn
Image
If you have found the solution to your initial post, please open your original post, click on the pencil, and add (Solved) to the Subject, it helps other users looking for help, and keeps the forum clean.
Miss_Fab01
Level 1
Level 1
Posts: 12
Joined: Wed Apr 07, 2021 11:04 pm

Re: Login screen not appearing. Can't run fsck in recovery mode.

Post by Miss_Fab01 »

Larry78723 wrote: Sun Apr 11, 2021 12:40 pm You need to boot from your install USB/DVD, open a terminal, and run fsck -fy /dev/sdxn
Hi Larry, thanks. Linux-rox suggested that above, but unfortunately it hasn't solved the problem.
User avatar
JOPETA
Level 17
Level 17
Posts: 7762
Joined: Thu Nov 20, 2014 6:10 am
Location: En un lugar de cuyo nombre no quiero acordarme

Re: Login screen not appearing. Can't run fsck in recovery mode.

Post by JOPETA »

Did you also check your /home partition filesystem from Linux Live USB/DVD (sudo fsck -y /dev/sda7)?

Did you follow last recommendation in the other thread (i.e the snapshot you have restored was taken after fixing permissions problem)?

Can you open a text session (i.e. Alt+Ctrl+F1 or F2) when in black screen?

If it so, then try to login as your user and password then run startx. If you can not get into a working graphical session or login, please report errors or warning you are receiving.
Ni cola de león ni cabeza de ratón, prefiero ser diente de ajo.(Javier Krahe)
linux-rox
Level 10
Level 10
Posts: 3334
Joined: Sun Jul 19, 2020 9:17 pm

Re: Black screen and no GRUB menu.

Post by linux-rox »

Miss_Fab01 wrote: Sun Apr 11, 2021 12:02 pm I tried doing a live boot and using fsck -fy /dev/sdxn as you suggested but unfortunately that hasn't solved the problem of the login screen not appearing. I can't run fsck from recovery mode either as it says that "/dev/sda5 is mounted. e2fsck cannot continue, aborting" :(
If it's any consolation, I can't get fsck to work in recovery mode either. OTOH, live session (which is what I recommended) works fine. To confirm, you ran the command as fsck -fy /dev/sda5, right? sdxn was a placeholder. Also, echoing Jopeta's query, did you check sda7? In both cases, what did the system say? Should have either reported the file system as "clean" or returned an error.

Answer also Jopeta's other queries, then let's take stock. I'm beginning to wonder, though, whether reinstall wouldn't be easier.
Miss_Fab01
Level 1
Level 1
Posts: 12
Joined: Wed Apr 07, 2021 11:04 pm

Re: Login screen not appearing. Can't run fsck in recovery mode.

Post by Miss_Fab01 »

JOPETA wrote: Sun Apr 11, 2021 1:40 pm Did you also check your /home partition filesystem from Linux Live USB/DVD (sudo fsck -y /dev/sda7)?

Did you follow last recommendation in the other thread (i.e the snapshot you have restored was taken after fixing permissions problem)?

Can you open a text session (i.e. Alt+Ctrl+F1 or F2) when in black screen?

If it so, then try to login as your user and password then run startx. If you can not get into a working graphical session or login, please report errors or warning you are receiving.
Hi JOPETA. I checked sda1, sda5, and sda7 from live DVD boot (my other partitions are Windows). It removed a dirty bit first and then fixed something when I did the fsck on both sda5 and sda7 (sorry I can't remember exactly what it said it did). I remember that sda5 and sda7 were 0.4% and 0.9% "non-contiguous". Not sure if that's bad. After the checks I rebooted but still cannot log in. The black screen that comes up has a small terminal in the top left-hand corner (it says tty1 after the hostname, is this significant?). This has only appeared since I did the Timeshift from live boot.

When I did the Timeshift I used snapshots from before I had any problems (I have snapshots going back a few months as well as weekly & daily). I've tried several but it hasn't resolved the login screen problem. Thank you for trying to help.
Miss_Fab01
Level 1
Level 1
Posts: 12
Joined: Wed Apr 07, 2021 11:04 pm

Re: Black screen and no GRUB menu.

Post by Miss_Fab01 »

linux-rox wrote: Sun Apr 11, 2021 9:54 pm
Miss_Fab01 wrote: Sun Apr 11, 2021 12:02 pm I tried doing a live boot and using fsck -fy /dev/sdxn as you suggested but unfortunately that hasn't solved the problem of the login screen not appearing. I can't run fsck from recovery mode either as it says that "/dev/sda5 is mounted. e2fsck cannot continue, aborting" :(
If it's any consolation, I can't get fsck to work in recovery mode either. OTOH, live session (which is what I recommended) works fine. To confirm, you ran the command as fsck -fy /dev/sda5, right? sdxn was a placeholder. Also, echoing Jopeta's query, did you check sda7? In both cases, what did the system say? Should have either reported the file system as "clean" or returned an error.

Answer also Jopeta's other queries, then let's take stock. I'm beginning to wonder, though, whether reinstall wouldn't be easier.
I ran fsck on sda1, sda5, and sda7 whilst in the live session as you recommended. It said that it removed a dirty bit first. When it did the checks on sda5 and sda7 there were a couple of errors (something about shortening and lengthening extent tree? :?).
Miss_Fab01
Level 1
Level 1
Posts: 12
Joined: Wed Apr 07, 2021 11:04 pm

Re: Login screen not appearing. Can't run fsck in recovery mode.

Post by Miss_Fab01 »

UPDATE.

I left my computer on the black screen (with terminal in corner) for a while and the normal login screen has now appeared :D.

However, when I put the password in it tries to log in but returns/loops back to the login screen again. Could this be due to sda5 being almost full? Once before I had to use clean in recovery mode in order to make space on sda5 so I could log in.

I'm a bit apprehensive about rebooting now :(. Also, the clean in recovery mode wouldn't work last time I tried it (since having these problems).
Miss_Fab01
Level 1
Level 1
Posts: 12
Joined: Wed Apr 07, 2021 11:04 pm

Re: Login screen not appearing. Can't run fsck in recovery mode.

Post by Miss_Fab01 »

Thanks everyone. After running a clean in recovery mode (which works now) I was able to log in to my computer again :D.

Thank you all for your help.
Locked

Return to “Beginner Questions”