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.
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?
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 causesda
to becomesdb
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
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.
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:
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.
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.
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.
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)?
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.
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.
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.
Sorry, I completely missed that this was for a NAS. @tomf disregard my advice if this is for specialized hardware / usage.
its still worth messing around with. I think I'll spin a VPS or something for it sometime in the near future.
Good luck! Feel free to @ me if you get into trouble with it.
awesome! thanks! Everybody cool I know uses Arch.. no joke.
😎 Damn right.
I still use Windows 10... <sad trombone> :(
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 :)
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.
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
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. :)
🤞
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.
Did you change/update your
/etc/fstab
? Any chance you can post it here?