0

Currently in grub2 ( trying to solve a boot problem ) , coming from this post grub error: you need to load kernel first However whenever I am tying to set the Linux kernel using this command linux (hd0,gpt1)/boot/vmlinuz-5.4.0.-37-generic

I am getting

error: failure reading sector 0x465aa00 from 'hd0'

It cannot be a hard drive problem because i can clearly use ls -la (hd0,gpt1)/ or any such ls commands and can see the contents ( i wouldn't have known which vmlinuz to take without seeing the contents of boot )

So if anyone can help me on this it would be really appreciated .

1 Answers1

0

The fact that you can ls -la doesn't mean your disk is errors-free. Please boot from a live CD and run these commands:

  1. This is the most basic one: once it finishes you can be sure your disk is readable and working:

    cat /dev/sda > /dev/null
    echo $?
    dmesg | tail
    

    You must get 0 as a result and dmesg output should contain no errors as well.

  2. Then just in case:

    e2fsck -f -v -C 0 -t /dev/sdaX
    

    Where sdaX is your Linux partition. Please run this command for each partition.

  3. Lastly I'd run

    smartctl -t long /dev/sda
    

    This command will take a lot of time to complete (a lot less for SSD). After it finishes, run smartctl -a /dev/sda to check for any S.M.A.R.T. errors.

AdminBee
  • 22,803
  • The first command that you wrote in three lines , should I write all of it in one line and execute ? Also just by itself the first line was taking a while – soutrik das Jul 14 '20 at 05:37
  • It was taking a bit of time so i decided to check the disks and here is the SMART data page https://ibb.co/zZYgs7y also this is the normal page https://ibb.co/k5gb30P – soutrik das Jul 14 '20 at 05:46
  • SMART output looks fine. The cat /dev/sda > /dev/null command may take up to 3 hours to complete. – Artem S. Tashkinov Jul 14 '20 at 05:52
  • actually i am running using bootable usb , using it for that much time , wont it harm the usb ? Also does that command run a smart long test ? because i was just checking and the smart long test time is about 180 mins. also i did a smart short test and its ongoing (but its not going past 90% even though it should take 1 min to finish ) – soutrik das Jul 14 '20 at 06:02
  • all tests , short long or conveyance are not going beyond 90% remaining ? https://ibb.co/GQFF5ps – soutrik das Jul 14 '20 at 06:16
  • also , I didnt check this before but some of the parts are "OFFLINE" in the SMART analysis gui , https://ibb.co/Y07xjSs – soutrik das Jul 14 '20 at 06:31
  • smartctl -t long /dev/sda test takes as long as cat /dev/sda > /dev/null to complete. ONLINE and OFFLINE indicate when these attributes get updated. Simply ignore this column. – Artem S. Tashkinov Jul 14 '20 at 07:05