0

I am getting booted into the initramfs shell directly in ubuntu 18.10

I have tried the exit command which leads to the manual fsck is required on /dev/sda2

When I enter fsck /dev/sda2 the shell returns

`Either the superblock or the partition table is likely to be corrupt!

Abort<yes>?

keep in mind sudo bash fdiskor any other shell commands return a not found error.

closed as unclear what you're asking by Rui F Ribeiro, Fabby, Kiwy, Mr Shunz, Stephen Kitt Apr 29 at 16:47

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

1

I hope your backups are in good order.

In an initramfs recovery shell, you are already root, so you don't need sudo. The problem might be that the number of tools available within the initramfs is usually very restricted.

You might want to boot the system using an external boot media: a live USB/DVD/CD would probably work well, and would give you a nicer work environment and a full set of tools for troubleshooting.

But if you must try and fix it using the initramfs environment, there are alternative sources of information:

  • cat /proc/partitions should give you an idea of the number and sizes of partitions detected on the disk.
  • cat /etc/fstab, possibly together with blkid and/or ls -l /dev/disk/by-uuid might allow you to identify what type of filesystem should be on /dev/sda2.

I would recommend trying a filesystem-type-specific fsck tool (i.e. fsck.<filesystem type>) instead of the generic command, as the generic command might be misidentifying the filesystem type and displaying that scary message about possible disk corruption as a result.

Note that the problem might actually be a wrong device name for the root filesystem, particularly if the system's hardware configuration has been changed recently. What was originally /dev/sda2 might now be a /dev/sdb2 instead, for example.

If that is the case, you might be able to specify the correct root filesystem by editing the boot options in the GRUB boot menu. Once the system is up and running, you would then have to update the GRUB configuration to match the current state of the hardware.

Not the answer you're looking for? Browse other questions tagged or ask your own question.