I’m on debian 11, this error doesn’t show up every time, but once it appear I need more that one reboot and it will fix automatically without doing nothing, don’t know the reason why (just read that can be kernel dependent). What I want to avoid is that maybe it’s just a warning of somethink that will cause a pc break in future (maybe hardware is starting working bad?) Do you have any sugggestion? Thanks

  • KISSmyOS@lemmy.world
    link
    fedilink
    arrow-up
    36
    arrow-down
    1
    ·
    edit-2
    11 months ago

    In the grub menu, choose advanced options and then choose an older kernel to boot into.
    If that boots fine, remove and reinstall the newest installed kernel and run sudo update-grub.
    That should be the easiest way to fix the most possible causes of this error.

    Edit: Now would be a very good time to back up all your data to an external drive. This might be a sign of your hard drive failing.

    • wth@sh.itjust.works
      link
      fedilink
      arrow-up
      8
      arrow-down
      1
      ·
      11 months ago

      I second the advice to switch to a different/previous/known good kernel. That has been the cause a most boot problems for me. I just had it happen on a VM a couple of weeks ago, so I switched to the old kernel, then removed the new kernel. I’ll wait for another kernel before upgrading.

      It’s probably worth scanning your disk just in case as well.

    • Synthead@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      3
      ·
      11 months ago

      I wouldn’t be quick to assume that this means a failing disk. There would probably be more sporadic issues if this were the case.

      • KISSmyOS@lemmy.world
        link
        fedilink
        arrow-up
        17
        ·
        11 months ago

        I wouldn’t assume a failing disk either.
        But every time there’s an error you can’t pin on something you just did, a full backup should be the first thing you do as a matter of principle.

        • dafunkkk@lemmy.worldOP
          link
          fedilink
          arrow-up
          3
          ·
          edit-2
          11 months ago

          ok, I’ll backup all data first. How can I remove old kernel without enter in grub menu (since usually boot works well) and select the oldone as default? Thanks

          • KISSmyOS@lemmy.world
            link
            fedilink
            arrow-up
            8
            ·
            edit-2
            11 months ago

            By default, your grub menu should show up every time you boot.
            If it doesn’t, boot your PC and do:
            sudo nano /etc/default/grub
            You need these lines:
            GRUB_TIMEOUT=10
            GRUB_TIMEOUT_STYLE=menu

            Every line starting with:
            GRUB_HIDDEN_TIMEOUT
            should be commented out like so:
            #GRUB_HIDDEN_TIMEOUT

            Then run sudo update-grub and reboot.

            What this does:

            • sets a countdown of 10 seconds before grub boots the kernel
            • tells grub to show the boot menu during that countdown
            • doesn’t use a hidden countdown that waits for a button press to show the menu

            In the grub menu, select advanced options and there you should be able to select an older kernel to boot.

            • dafunkkk@lemmy.worldOP
              link
              fedilink
              arrow-up
              3
              ·
              edit-2
              11 months ago

              ok, thank you very much for detailed explanation, yes I remember that I had removed timeout from grub in the past, I will follow your procedure and select previous kernel. Another question, once I’v selected the older kernel did you think that removing (it’s fine using apt?) and resinstall newest kernel will fix the issue or I’v to keep the older kernel? In case I’v to keep the older kernel how can I avoid that it will be overwritten once I update the os?

              • KISSmyOS@lemmy.world
                link
                fedilink
                arrow-up
                5
                ·
                edit-2
                11 months ago

                I think the newer kernel should work after reinstallation.
                If it doesn’t and you want to stay with the older one:

                apt list --installed linux-image*

                There should be a package with a specific version number in its name. For example, the standard kernel for Debian 11 is:
                linux-image-5.10.0-26-amd64

                Uninstall the linux-image-... package you don’t want to keep.
                Also uninstall linux-image-amd64 which is the meta-package that pulls in the newest kernel version. Without it, you won’t get new kernel versions in upgrades.

    • dafunkkk@lemmy.worldOP
      link
      fedilink
      arrow-up
      3
      ·
      11 months ago

      I not on that machine but as far as I remember it’s a full ntfs partition, don’t think I ever changed fstab

      • ScottE@lemm.ee
        link
        fedilink
        arrow-up
        9
        arrow-down
        1
        ·
        11 months ago

        Your root filesystem is NTFS? That’s likely the problem - I’m surprised it boots at all. Switching to a Linux filesystem is the likely solution. You could also try a newer kernel, too - 5.10 is quite old, current LTS is 6.1. Good luck.

  • vcmj@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    11 months ago

    Depending on if you wrote the kernel cmdline yourself I imagine this might happen using /dev/sdN style device paths? BIOS might change things up every now and then for fun, so using partition UUIDs would be a better way if so.

    • dafunkkk@lemmy.worldOP
      link
      fedilink
      arrow-up
      2
      ·
      11 months ago

      so can be bios dependent?..it’s possible to change from /dev/sdn to UUIDs…how? Thanks

      • vcmj@programming.dev
        link
        fedilink
        arrow-up
        0
        ·
        11 months ago

        Basically just look for things like root=/dev/sda2 in the kernel command line. You can get it at runtime by running “cat /proc/cmdline” having /dev/sda etc in your fstab might also be a problem

        • vcmj@programming.dev
          link
          fedilink
          arrow-up
          0
          ·
          11 months ago

          You can change those to /dev/disk/by-uuid/XYZ (“ls -an” that directory to see the symlinks to your current drives)

      • vcmj@programming.dev
        link
        fedilink
        arrow-up
        0
        ·
        11 months ago

        Yes if you have multiple drives some buggy BIOS may not enumerate them in the same order every time. Most modern distros do UUIDs by default but when manually setting up a bootloader it is easy to succumb to such temptations to use the much simpler device paths as the UUIDs are a pain. If you’re not sure how to change the kernel parameters most likely you’re good on that front actually, its in your grub config as others have mentioned. I’ll leave this comment around in case some poor soul who did it manually comes across the thread.

    • uis@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      11 months ago

      I hope by partition UUID you mean root=PARTUUID=, not root=UUID= because kernel can understand only PARTUUID.

  • uis@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    11 months ago

    Kernel says it can’t mount root device. Maybe it is not specified or kernel just can’t find it. You need to edit root= parameter for kernel. For:

    1. GRUB: press ‘e’ to edit menu entry and then press ‘F10’ to boot
    2. LILO: just append desired root=
    3. EFIStub: change it in config and recompile it

    If you use GRUB you can use its console and search for disk and partition where root fs is located.

  • Yuki@kutsuya.dev
    link
    fedilink
    arrow-up
    1
    ·
    11 months ago

    You sure your hdd/ssd is fine? It complains about not being able to mount the root fs.