0

Summary of issue:

I had to hard power off my laptop while a program was working with a file, and, upon booting back up, Ubuntu attempted to fix the resulting file system issues. During this process, whatever it is that Ubuntu is doing (see the Detailed information section for more) hangs indefinitely and my laptop never finishes booting. Note that during the first attempt at booting up, while Ubuntu was trying to repair itself, it printed out diagnostic info to the screen regarding orphaned inodes (unfortunately I didn’t pay enough attention to remember exactly what was on screen).

Detailed information:

I'm dual booting Windows 7 and Ubuntu 20.04 on an old Acer Aspire V3-771G.

While working in an IDE I was attempting to remove a few files from my project. The IDE became unresponsive after I confirmed my choice in a dialog box, then my entire system became unresponsive. Now, my laptop is around 10 years old and has its unreliable moments, so this didn’t really phase me. I figured that all my work was saved anyway and hard powered off my laptop after waiting, like, 5 minutes for anything to respond.

When I tried booting back up, after the Ubuntu splash screen and loading spinner, Ubuntu started trying to fix the file system displaying diagnostic info regarding inodes. The process appeared to complete, printing a line that I remember being in the format /dev/sda5: [something], [number]/[number] files, [number]/[number] blocks. After which I was left with a blinking prompt below the last message. Again, my computer became unresponsive.

After waiting another few minutes I hard reset it again, then my laptop settled into the consistent behavior it displays now. Upon trying to boot, Ubuntu displays its splash screen, then, within less than a second, a few screens’ worth of text scrolls by. I'm fairly sure that it's typical boot-up diagnostic info and not relevant to my issue, but I managed to capture a moment of it regardless:

enter image description here

After displaying that text, the screen clears and I'm left with the message /dev/sda5: clean, 231273/1222992 files, 3947028/4882432 blocks and an unresponsive blinking underscore prompt. It may be worth mentioning that this message is different than the one I saw on first boot-up. The numbers were for sure different, but I don't know about the rest of the message.

I've tried:

Being more familiar with Windows than Linux, I am at a loss for how to proceed. Because I don't fully understand the nature of the problem I'm having (beyond the fact that it has to do with my file system), so it's difficult to recognize potential solutions when/if I encounter them by a search engine.

I've tried restarting several times and waiting after the last message appears to no avail.

I've tried booting into Recovery Mode and selecting fsck, but that just yielded the following:

/lib/recovery-mode/recovery-menu: line 80: /etc/default/rcS: No such file or directory
fsck from util-linux 2.34
/dev/sda5 is mounted.
e2fsck: Cannot continue, aborting.

Finished, please press ENTER

I think the issue there was that I was in the drive whose file system needs to be checked and can’t unmount it. Is this correct?

One potential avenue that I found while searching that seems promising though is to boot using an Ubuntu Live USB and run fsck there, but I'd really like to know what commands/arguments to use ahead of time so I can make sure I fix things correctly. Since writing this question, I have tried this and successfully ran fsck where I thought the issue would be and my issue has not been resolved.

karel
  • 114,770
  • 4
    I would try fsck/e2fsck on all ext4 partitions. Details:https://askubuntu.com/questions/642504/ubuntu-14-04-is-not-booting-normaly-after-a-manual-hard-boot/642789#642789 Best not to hard reset. https://askubuntu.com/questions/11002/alt-sysrq-reisub-doesnt-reboot-my-laptop/334292#334292 You may want to reset reisub to 244 https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html sudo nano /etc/sysctl.d/10-magic-sysrq.conf – oldfred Jun 18 '22 at 03:33
  • 2
    I'd also boot and use a live file-system, but the commands you use vary on what file-systems you have used in your setup (ie. what options you selected at install time). As you've provided no specifics of that, we can't predict what fs you're using. Why did you hard power-off? Only a kernel panic requires that; as you can direct the kernel to safely close fs & eject disks then reboot avoiding what you've done (ie. SysRq commands direct to linux kernel as oldfred has already suggested; Ubuntu still runs the linux kernel). – guiverc Jun 18 '22 at 04:06
  • 2
    It sounds to me like the fsck completed successfully, and your problem is completely unrelated to that. Likely something is wrong with your graphics system, like an incompletely installed video driver. Instead of hard powering off, you should briefly press the power button and give it several minutes to shut itself down cleanly. Likley using systemd.unit=multi-user.target and then logging into a text window and running updates will fix this. – user10489 Jun 18 '22 at 04:34
  • 1
    Ah, I was totally unaware of the magic SysRq key, hence the "inexperienced" in the title! Glad to learn something new.

    @user10489 I agree, it seems the problem is unrelated. Could you explain what you mean by "using systemd.unit=multi-usertarget"?

    – Sigmatic Jun 18 '22 at 09:36
  • 2
    Are you able to boot into a live session? If so, can you find the /var/log/nvidia-installer.log file and put the content in your question. – Raffles Jun 18 '22 at 11:22

1 Answers1

1

You might have a video driver issue. Maybe you tried to upgrade or change the NVIDIA-driver to an unsupported version (and forgot to mention it), or the kernel cannot load the video-driver code for some other reason.
When the video driver cannot be loaded, the graphical desktop cannot start and an unresponsive prompt appears.

When you see the unresponsive "_" flashing, do this:

Hit Shift+Alt+F3. or if you have a Keyboard were the F-Keys are occupied with Audio/Videoplayer Controls, hit Shift+Alt+Fn+F3.

To go back to the unresponsive "_", enter Shift+Alt+F2 (or Shift+Alt+Fn+F2)

You will see another black screen, but with a responsive <hostname> login: prompt. Log in to your Shell (bash?) with your credentials.

Try to repair the system, with bash commands, mostly calls to apt, and occasional reboots.

You are on your own now, because we cannot know what you have tried already.

If it is an Nvidia-related problem, perhaps try to apt purge the nvidia packages. The system might fall back to using the nouveau open-source video driver, or fall back to use the on-board Intel graphics driver.

knb
  • 5,004
  • I'll add that running apt upgrade may trigger partially installed drivers to finish installing or may give an error telling you how to help it finish installing. Keep trying until apt upgrade finishes successfully, and then maybe apt install the video driver if necessary. If the Alt-F3 stuff above doesn't work, next thing to try is ctrl-alt-delete and add systemd.unit=multi-user.target to the linux command line in grub (from the grub live menu) to try to force it into text only mode. – user10489 Jun 18 '22 at 12:20
  • 1
    Thanks for the info! This helped me resolve my issue when you posted it but I hadn't come back to verify that it was resolved. It seems my problem was with the nvidia drivers which I ended up purging so my system could fall back on nouveau drivers – Sigmatic Jul 02 '22 at 19:13