2 votes

Fixing GRUB / Bad Kernels

A few months ago I got a new to me HP Proliant ML310e Gen8. For the most part it works well, but I went to add some drives to it yesterday and grub / whateverthefuck doesn't like the one and only kernel that is installed.

I'm running Ubuntu 20.04. I looked around saw guides like this. this, and this -- but I'm not sure if this will fix the issue.

After grub I get the ol'

---[end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---

I think I need to run something with initramfs or something, but I just want to be sure before I go messing around.

The bad kernel listed is 5.11.0-27-generic. I'm a little out of my element with this part of things.

23 comments

  1. knocklessmonster
    (edited )
    Link
    It can't find root, that's the primary issue. That can cause a panic. Can you mount your root via LiveUSB/CD, and get us your /etc/fstab?

    Unable to mount root fs on unknown-block(0,0) ]---

    It can't find root, that's the primary issue. That can cause a panic.

    Can you mount your root via LiveUSB/CD, and get us your /etc/fstab?

    4 votes
  2. [21]
    pseudolobster
    (edited )
    Link
    This is usually caused grub not being able to find the initramfs. Oddly though, it found the kernel, which is typically on the same partition. In grub's configuration, you can specify which...

    This is usually caused grub not being able to find the initramfs. Oddly though, it found the kernel, which is typically on the same partition.

    In grub's configuration, you can specify which disk/partition houses your kernel and initramfs. Typically these days this is specified by a UUID which should never change, but older configs used to use the path to the device, eg: root=/dev/sda for the disk plugged into the first SATA port etc. If this is how it's configured then rearranging drives can cause sda to become sdb for example. At first I thought this is probably what happened, since you say the only difference was to add new drives, but if I'm reading this correctly it sounds like grub was able to load the kernel, but not the initramfs, which are, as I mentioned, typically on the same partition.

    Another possibility is the drives you added are a red herring, and your problem was actually caused by an update. Whenever you update your kernel, kernel modules, etc, it tries to generate a new initramfs and copy it to your /boot/ partition. Often times the /boot/ partition is really small, fills up, and fails to copy the initramfs. You probably would have seen an error if this happened, but it's a possibility.

    I'd probably start by just unplugging the drives you added. See if it boots fine without them. If it does, grub is freaking out that the order of your drives is different, and it's looking for a device by its location rather than its UUID. I fit doesn't, then it's an unrelated problem, possibly your /boot/ partition is full or for some other reason your initramfs got borked.

    In any case, if you need to reinstall grub, you'll want to generate the initramfs beforehand, so follow this one: https://askubuntu.com/questions/41930/kernel-panic-not-syncing-vfs-unable-to-mount-root-fs-on-unknown-block0-0/48516#48516

    4 votes
    1. [20]
      tomf
      Link Parent
      ok, I left this for a few days because I was too pissed off to think clearly. I ended up doing a fresh install on a second drive. I popped in the old main drive and am making a back up of the...

      ok, I left this for a few days because I was too pissed off to think clearly. I ended up doing a fresh install on a second drive. I popped in the old main drive and am making a back up of the music and some other stuff -- then I'll take another stab at this. My main concern is losing my music. I have an older backup, but over the past month or so I went on a real specific-pressing hunt that would be a total pain in the ass to do again.

      With the new install I gave it a 1gb /boot, which I think is plenty.

      I don't run a lot of software on the thing outside of *arr and a few smaller applications, so a fresh setup won't take long at all. I should have exported my settings... I'll probably sort out a good automated method for this.

      Thanks for all of this. I'll do some more hunting once I have stuff backed up. If it works out, I'll shoot you an update. This part of linux-stuff is a little out of my comfort zone, but everything is at some point, so it'll be good to understand it.

      /cc @knocklessmonster

      I can't believe its been under three days. It felt like well over a week.

      1 vote
      1. [19]
        Don_Camillo
        Link Parent
        I feel you. I had exactly this kinds of problems so many times. and then solved it the same way as you did. reinstall. but i would advice you to try and solve the problem anyway, as the tools you...

        I feel you. I had exactly this kinds of problems so many times. and then solved it the same way as you did. reinstall.
        but i would advice you to try and solve the problem anyway, as the tools you will learn will help you fix this kind of problems or even not making them in the first place.

        things you might learn are:

        • what is fstab and why keeps it fucking up my boot.
        • how to mount "foreign" partitons to a live system
        • how to chroot into a system
        • what does grub actually do?
        • ...

        as most other people here expect it is with a high posibility a fstab problem which you can resolve in minutes if you know these things.

        3 votes
        1. [18]
          tomf
          Link Parent
          thanks for these! I'm sort of at the point where I know enough about this stuff to either breeze through guides or totally break stuff. I like a fresh install. There were some things I did with...

          thanks for these! I'm sort of at the point where I know enough about this stuff to either breeze through guides or totally break stuff.

          I like a fresh install. There were some things I did with the first install that were sloppy, so this should be nicer.

          1 vote
          1. [17]
            Adys
            Link Parent
            Hey, so this might not be top of your priorities right now but it sounds like you might be ready for Arch Linux. It's closer to the metal but not very high maintenance once installed. MUCH easier...

            Hey, so this might not be top of your priorities right now but it sounds like you might be ready for Arch Linux.

            It's closer to the metal but not very high maintenance once installed. MUCH easier to understand, and with an outstanding quality wiki. If you're going to do a fresh install, you might want to give it a try :)

            I switched from Ubuntu to Arch in 2012 and never looked back.

            4 votes
            1. [16]
              tomf
              Link Parent
              haha -- I knew the day would come. I should really look into it. is it completely a la carte or does it come with a rough set of standards (e.g. samba, python, etc)?

              haha -- I knew the day would come. I should really look into it. is it completely a la carte or does it come with a rough set of standards (e.g. samba, python, etc)?

              2 votes
              1. [15]
                Adys
                Link Parent
                If you want true à la carte you want gentoo. Arch is pretty standardised, it just gives you better access to the lower levels and abstracts less.

                If you want true à la carte you want gentoo. Arch is pretty standardised, it just gives you better access to the lower levels and abstracts less.

                1 vote
                1. [14]
                  tomf
                  Link Parent
                  ok cool. I'll look into it. I played around with manjaro for a night, but I think that's pretty much got everything out of the box.

                  ok cool. I'll look into it. I played around with manjaro for a night, but I think that's pretty much got everything out of the box.

                  1 vote
                  1. [13]
                    cfabbro
                    (edited )
                    Link Parent
                    I'm actually going to suggest the exact opposite as @Adys. Given all the issues you have been experiencing with your NAS, and the headaches that has been causing, IMO at this point you might want...

                    I'm actually going to suggest the exact opposite as @Adys. Given all the issues you have been experiencing with your NAS, and the headaches that has been causing, IMO at this point you might want to look into a NAS specific OS/distro like TrueNAS or EasyNAS. They're far less useful for general purpose home server applications, but they're also far more reliable for NAS specific setups, so once running you're unlikely to keep experiencing such weird and annoying NAS related issues in the future.

                    1 vote
                    1. [9]
                      Adys
                      Link Parent
                      Sorry, I completely missed that this was for a NAS. @tomf disregard my advice if this is for specialized hardware / usage.

                      Sorry, I completely missed that this was for a NAS. @tomf disregard my advice if this is for specialized hardware / usage.

                      2 votes
                      1. [7]
                        tomf
                        Link Parent
                        its still worth messing around with. I think I'll spin a VPS or something for it sometime in the near future.

                        its still worth messing around with. I think I'll spin a VPS or something for it sometime in the near future.

                        2 votes
                        1. [6]
                          Adys
                          Link Parent
                          Good luck! Feel free to @ me if you get into trouble with it.

                          Good luck! Feel free to @ me if you get into trouble with it.

                          1 vote
                          1. [5]
                            tomf
                            Link Parent
                            awesome! thanks! Everybody cool I know uses Arch.. no joke.

                            awesome! thanks! Everybody cool I know uses Arch.. no joke.

                            1 vote
                            1. Adys
                              Link Parent
                              😎 Damn right.

                              😎 Damn right.

                              2 votes
                            2. [3]
                              cfabbro
                              Link Parent
                              I still use Windows 10... <sad trombone> :(

                              I still use Windows 10... <sad trombone> :(

                              1 vote
                              1. tomf
                                Link Parent
                                I use LTSC on my little media center. It isn't all bad. MacOS is my main, too. I'm covering the bases so I can be moderately cool in any social situation :)

                                I use LTSC on my little media center. It isn't all bad. MacOS is my main, too. I'm covering the bases so I can be moderately cool in any social situation :)

                                2 votes
                              2. Don_Camillo
                                Link Parent
                                Dont worry, use what is good for you. coolness is about taking your own choices an be shure of them, not what other people are doing or thinking.

                                Dont worry, use what is good for you. coolness is about taking your own choices an be shure of them, not what other people are doing or thinking.

                                2 votes
                      2. cfabbro
                        Link Parent
                        To be fair, I don't think tom mentioned anywhere in this topic that it was for a NAS... I am just familiar with his previous topics about it. :P

                        To be fair, I don't think tom mentioned anywhere in this topic that it was for a NAS... I am just familiar with his previous topics about it. :P

                        1 vote
                    2. [3]
                      tomf
                      Link Parent
                      I ran freenas many years ago and liked it. Once this is up and running it should be smooth sailing. Its somewhat frustrating. I've been running VPSs for ages without any issues. But that bypasses...

                      I ran freenas many years ago and liked it. Once this is up and running it should be smooth sailing.

                      Its somewhat frustrating. I've been running VPSs for ages without any issues. But that bypasses a lot of the goofy hardware hiccups I've had lately. :)

                      1 vote
                      1. [2]
                        cfabbro
                        Link Parent
                        🤞

                        it should be smooth sailing

                        🤞

                        1 vote
                        1. tomf
                          Link Parent
                          I am willing to cross almost anything at this point. If it doesn't go, I'll just buy some other tower that will let me go JBOD and sell this one for a song.

                          I am willing to cross almost anything at this point. If it doesn't go, I'll just buy some other tower that will let me go JBOD and sell this one for a song.

                          1 vote
  3. Adys
    Link
    Did you change/update your /etc/fstab? Any chance you can post it here?

    Did you change/update your /etc/fstab? Any chance you can post it here?

    3 votes