2

I had a perfectly functioning ubuntu (22.04 if I'm correct). But last time I tried to reboot it wouldn't do it anymore. It woul get stack in the first command line initramfs.

I typed exit and recevied the error:

/init: line 872: logsavw: not found
The root filesystem on /dev/nvme0n1p2 requires a manual fsck

After checking online I tried to manually fix the disc with the fsck command ( fsck -yf /dev/nvme0n1p2), but this error happened.

sh: fsck: Text file busy

nvme0n1p2 seems to be a root disk so it can't be access through the fcsk command, as it's been used.

I've checked related topics but so far nothing has really helped me. In a question I already posted they sent me to another post where they used the sudo command. But surpringsly, the sudo command is not found, and when I type whereis sudo I get the message whereis: not found.

I'm very surprised that I can't suddenly access this very basic command, and why did this happened at all.

Any insights would be helpful

  • 1
    Where are you running these commands? Did you manage to boot? – terdon Oct 14 '23 at 14:41
  • 1
    Time traveler from future? :) "(24.04 if I'm correct)" That will be Ubuntu LTS version released in April 2024. Are you running fsck from live installer. Partitions have to be unmounted. Or if you can boot recovery mode to command line before partitions are mounted. Details of e2fsck. https://askubuntu.com/questions/1474846/fixing-bad-superblock-on-ssd-drive-is-e2fsck-safe-to-run – oldfred Oct 14 '23 at 20:04
  • @terdon I'm running these commands from a command line called (initramfs) And no, I didn't manage to boot so far. sh: boot: no found – roybatty Oct 15 '23 at 09:54
  • 1
    Thx @oldfred , version corrected. Not sure I'm understading your comment. I installed ubuntu a couple of months ago and it was fully working until this error happened. So far, I haven't managed to "boot" as it won't allow me. What I do is poweroff and then re-start manually. Now that I see it, I receive several error messages. Among them: Initramfs unpacking failed: ZSTD-compressed data is corrupt wait-for-root not found among others. I believe other error messages related to the APCI BIOS where there since I installed the os, just I didn't pay attention to them – roybatty Oct 15 '23 at 10:02
  • @oldfred could it be an error on the installation? In that case, is there a way of recovering some of the data and then reinstalling? I have important information – roybatty Oct 15 '23 at 10:03
  • You can't fsck the disk if you are booted into the system (technically, on a mounted partition). You have to boot to a live usb session and then run the check. If your information is important, it should be backed up. – Organic Marble Oct 15 '23 at 11:26
  • Thank you @OrganicMarble. I have three questions: 1. How can I back up now my information? Or you meant it should be done beforehand? 2. How do I boot to a live usb session and perform the check? I thought to boot from a live usb session meant to reinstall the system? Any tutorial on how to do this? 3. If I boot from a live usb and run the check, will I lose the information stored in the laptop? – roybatty Oct 15 '23 at 12:00
  • When you boot to a live USB you get 2 choices: Try Ubuntu and Install Ubuntu. If you pick Try Ubuntu, it won't reinstall the system - it just boots Ubuntu off the USB so you can use it. Pick Try Ubuntu, let it boot into the live system, and then run the same fsck command you tried before. Assuming you do it right and it can fix the disk, you will not lose data. Re: backups - statements people make about how critical their data is are not well received if they haven't bothered to run a backup. – Organic Marble Oct 15 '23 at 13:06
  • From the live installer, you also should be able to copy your data to another drive. A single copy is not by itself a good backup but a lot better than nothing. Drives are a lot lower in cost now. I used to use multiple flash drives & DVDs, but found an external SSD to be very fast compared to flash drives. – oldfred Oct 15 '23 at 14:18

1 Answers1

0

MAKE A LIVE USB

Flash a new Ubuntu ISO to USB from a different computer, and boot from the USB on yours. When the live system booted, close the installer window or select Try Ubuntu, and open GParted. Select your drive there (/dev/nvme0n1), and the 2nd partition (/dev/nvme0n1p2). Right click on the 2nd partition, select Check, and press the green check mark at the top (if you get a message if you want to continue, select Confirm).

This should check for filesystem errors on the partition and fix them if needed. Reboot to your installed Ubuntu and check if it boots now.

STILL DOESN'T BOOT

If it still doesn't work, Boot Repair can probably help. I won't give info about it here, so if you don't know what to do, you can search online. I recommend using Ubuntu 22.04 on the live USB, as the boot repair repository currently doesn't support the newest non-LTS version.

To install Boot Repair, type in these commands on the Ubuntu live USB (press Enter to confirm at the first command):

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt update -y
sudo apt install -y boot-repair

Now open it from the applications menu, and go trough it.

Octopus
  • 85