1

I am working on a Dell Inspiron 15 5000 series laptop which is dual booted for Ubuntu 22.04 and Window 11. The /sda5 partition contains the OS while /sda10 partition was for /home. Windows is working fine.

The problem started with a power loss. I skipped the disk check on restart as I was in hurry. However, we lost the power again. The restart blinked on disk check and immediately went to command line “need root password for maintenance”. I tried sudo user password which did not work. After sometime, login screen appeared and I found myself stuck in login loop. Steps taken by me till now: -

  1. I made a live USB and found that data on /sda10 is fine while /sda5/home was empty (/home was /sda10). Gparted
  2. Using the excellent comment by Eliah Kagan https://askubuntu.com/a/147023/491560 here I created a root password.
  3. I tried fsck -y /dev/sda5 and fsck -A -y /dev/sda5 which did not show any result.
  4. I rebooted and provided my newly created root password. It led me to command line screen where even fsck was not possible. Login Loop still persisted.
  5. I used Live USB again and created a new user ‘rec’ with sudo privilege. This got an entry in /home directory.
  6. I tried e2fsck -yf /dev/sda5. It actually processed.
  7. On returning to normal login, Login Loop still exists for newly created ‘rec’ user.
  8. I got following details when I checked the grub edit. setparams 'Ubuntu...' recordfail set gxfpayload... insmod part_msdos insmod ext2 set root=... search --no-floppy... linux /boot/vmlinuz-2.6.38... initrd /boot/initrd.img-2.6....
  9. The memtest is giving kernel shim error.
  10. The df -Th command doesn’t show /sda10 or window partition. Gparted shows all.

The /sda5 and /sda10 partition was not created by me. I was getting some BIOS bugs but system is working fine. I can’t update BIOS as it requires laptop battery.

I have some online programs running. Due to my work, reformatting /sda5 is my last option.

Ask anything more that may be needed. Thank you for your help.

1 Answers1

1

Solved

Since the whole problem started due to power failure; I searched that as query. One of most common suggested reason was / switching to protection mode.

So, basically my root / went into read-only mode.

  1. cat /etc/fstab gave me remount-ro error.
  2. To be sure I performed normal disk check fsck -f /dev/sda5
  3. Next to isolate bad sectors (if any) e2fsck -fccky /dev/sda5 #
  4. Reboot
  5. mount -o remount,rw / to give read-write permission to OS drive.
  6. Back to normal.
  7. smartctl -t long /dev/sda and `smartmontool' need to be done to check disk.