4

I'm getting an error that's similar to many I've seen before, but I somehow can't seem to fix. I am on Ubuntu 22.04.

[    0.260527] ×86/cpu: SGX disabled by BIOS.
[    0.786997] Initramfs unpacking failed: ZSTD-compressed data is corrupt
/init: line 73: wait-for-root: not found
Finit: line 872: logsave: Text file busy
The root filesystem on /dev/sda2 requires a manual fsck

BuSyBox v1.30.1 (Ubuntu 1:1.30.1-7ubuntus) built-in shell (ash)
Enter 'help' for a list of built-in commands.

At other times, I've only had to run something like...

fsck -fy /dev/sda2

... and error would get fixed and I'd be on my way.

However, this time around, I run the command I get:

(initramfs) fsck -fy /dev/sda2
fsck from util-linux 2.37.2 e2fsck 1.46.5 (30-Dec-2021)
Pass 1: Checking inodes, , blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda2: 908631/61022208 files (0.3% non-contiguous), 121159114/244059136 blocks

(initramfs)

Which seems fine. But then when I try to exit, I end up right back with it asking me to run a manual fsck check on the drive again. I have to force shutdown to get out of the shell (?).

Any ideas how to fix this?

EDIT: I can use a live USB ubuntu session, and mount the disk without issues. I can see the files and open them without issue. So the drive is "fine" at least in some sense. SMART does not raise any warnings. So, why can't I boot with it?

1 Answer 1

4

This look like the initramfs image on your system is corrupted. Here is what you can do to regenerate the initramfs image:

  1. boot on a live Ubuntu usb

  2. mount your root partition sudo mkdir /mnt then sudo mount /dev/sda2 /mnt

  3. Mount the required file system

    sudo mount --bind /dev /mnt/dev then sudo mount --bind /proc /mnt/proc then sudo mount --bind /sys /mnt/sys

  4. Chroot the mounted root partition sudo chroot /mnt

  5. regen the initramfs image sudo update-initramfs -u

  6. exit the terminal and umount the partitions exit sudo umount /mnt/dev then sudo umount /mnt/proc then sudo umount /mnt/sys the sudo umount /mnt

Then you can reboot, your system should work normaly

1
  • Thanks! Indeed, that fixed it. Learned something new today, too.
    – Nate
    Apr 1, 2023 at 21:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .