[SOLVED] Is my Debian 10 install about to bite the dust due to a GRUB error?
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is my Debian 10 install about to bite the dust due to a GRUB error?
Hello,
I was using my Debian 10 Buster laptop earlier today to browse the web when I decided to use apt to update my system. I ran
Code:
sudo apt update; sudo apt upgrade
just like I usually do, and it seemed to work like usual until it started installing a GRUB update and displayed an error dialogue.
The error dialogue, which popped up entirely in the Terminal, went like this:
Quote:
GRUB failed to install to the following devices:
/dev/sda
Do you want to continue anyway? If you do, your computer may not start up properly.
Writing GRUB to boot device failed - continue?
I had a "Yes" and "No" option. I tried to select "No" because having a broken install on a laptop that's potentially vital for my college work sounds like a scenario I would like to avoid. However, it took me to a screen asking which of my install partitions I want to install Grub to. I selected all of them because it told me to select all of them if I was unsure. Then, it popped up the same error message again, except it told me that Grub can't be installed on any of the partitions, and it asked me whether I wanted to hit continue or not.
My main fear is that if I hit "Yes" to continue, I get a broken GRUB configuration and my computer refuses to boot into Debian, and I can't fix it, and I end up with a college laptop that I can't actually use for any college work. However, my laptop's been working great up to this point, and I've never had any problems with GRUB in the past due to updates. Is this error message the harbinger of doom that I'm making it out to be? If it is, what can I do to avert complete disaster?
Also, I chose Debian Minimal for this laptop because I wanted something I could configure myself with my own desktop environment and the like, as well as something that's really stable and that doesn't break very easily with updates. However, it looks like my computer is about to break easily with an update, and this is only after 6 months of running the thing. Meanwhile, I've had to make trade-offs with older software in the repositories, as well as some software (Godot, Blender 2.8, PaleMoon) not being in the repositories. I believe I'm advanced enough for a distro like Void Linux or Arch, but I stuck with Debian because of familiarity with Ubuntu and Mint and other Debian-based distros, and because I heard it's famous for it's stability. However, I don't know if I'm getting that stability right now. No offense to Debian or anything, but should I just cut my losses, embrace the possibility of more things going wrong, and move to a distro like Void?
I appreciate any help and information on the matter!
Also, I chose Debian Minimal for this laptop because I wanted something I could configure myself
This is a sign...
You say you want to learn and do it on your own, but the general message in your post is that you don't have the time or are not motivated to follow through with your aspirations.
There are more than a million help pages on the great WWW that can guide you...
Are you that lazy you won't find time to read? Because it is necessary for the sake of "Learning" how to do it yourself.
This is a sign...
You say you want to learn and do it on your own, but the general message in your post is that you don't have the time or are not motivated to follow through with your aspirations.
There are more than a million help pages on the great WWW that can guide you...
Are you that lazy you won't find time to read? Because it is necessary for the sake of "Learning" how to do it yourself.
No. That's precisely why I'm coming over to this forum.
There's a difference between computing freedom and wanting to configure some things the way I want them to and having things stay the way they are without breaking due to an errant update. Debian minimal has been the best combination of the two so far. I'm not saying that I don't have time to learn stuff, I'm saying that I don't have time to fix problems on-demand. Like, I can mess around with a programming library or a new terminal program or Linux utility over the weekend because I have the time to do so then, but if my computer croaks in the middle of class, that's a different story altogether because I didn't seek out that scenario and I didn't get any say in when it happens, and my grades or work can be adversely affected as a result.
I really enjoyed setting up my Debian install, I just don't enjoy it when a random package comes along that says "Hey, all that time you put into getting these things set up the way you like them? Do it again, meanwhile there's an English paper you have to finish up on due tonight, and more work due tomorrow." I'm more than willing to learn how to configure and fix my system, but I don't want it to croak at random intervals, and Debian was presented to me as a system that does not croak at random intervals while having a robust package manager and all the options and freedoms that Linux affords me, hence why I picked it over something like Arch.
All that said, I'm not sure this is Debian's fault. I made a post about this on Reddit as well, and someone suggested that my SSD might be failing. I ran smartCTL on it, and I got this result:
The maxed out reallocated sector count, power-on hours, and power cycles really doesn't inspire much confidence, so I think they might be right. Sort of a shame too, as I only bought this SSD back in October of 2019 for around $50. I thought I was getting a good deal that would last me a while. Guess I'll just replace it with a hard drive instead.
This is most likely your problem, the /boot partition is full. Try removing some of the older kernels.
Good call. I hadn't realized up to this point (and no one ever told me up to this point) that there's a boot partition that fills up over time as you update your system and it leaves the old kernels behind. I mean, I noticed they were there as an option, but I always thought it auto-deletes the ones you don't use after a certain time frame and auto-sizes the boot partition upon install to the point that you'll never notice it actually get full. However, by manually deleting a few of the older kernels in the boot partition (after I searched online and found this helpful little article), I was able to run a sudo apt update and upgrade like before and it actually installed the newer kernel without any fuss. Then I rebooted, and everything is fine! The bootloader was there the same as usual, I booted in like usual, and I was on the newer kernel (I ran uname -sr before and after reboot and noticed my kernel identifier tick up by 1).
I did already order that hard drive, as well as some USB flash drives for backing up my data and otherwise just chucking around, but I guess I won't need to install that new hard drive if my SSD isn't imminently failing like I thought it was. I'll back up my data regularly and continue using this computer as is until something more serious happens with my SSD.
Who would of thunk it! Same issue here.
Which has me wondering why? Does Debian and derivatives not set a limit on installed kernels. Anyways, avoid bashing the Debian folks who give you the opportunity to learn by letting you install a minimal system.
Quote:
"Hey, all that time you put into getting these things set up the way you like them? Do it again"
The quote above, part of the learning process, eventually you can get rid of all errors in dmesg. I learned that building Gentoo. Must of took a month to get a nice stable setup.
I don't think the op would have had this issue if the boot partition was at least 500MB instead of 255MB
edit: Did a check in a vm, debian istaller defaults to the smaller boot partition size when lvm or encryption is selected.
That is what I noticed in the other thread, if you don't remember creating a separate /boot partition that potentially can get plugged with excess kernels, suggests you selected default LVM partitioning. I don't recall any Debian derivative that creates a /boot partition with default setup other than LVM partition scheme "and/or encryption apparently".
In which case, there should be a very verbose warning of sort if you are installing an OS above "Stable/LTS" status that will see many kernel upgrades.
Or an "Install limit" like the DNF package management type systems that default to maximum of 3 kernels installed.
So...
Hate to say it but this is definitely a flaw in Debian base strategy.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.