Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[SOLVED] Unable to boot sda1 after upgrade to sdc1

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
User avatar
ticojohn
Posts: 1284
Joined: 2009-08-29 18:10
Location: Costa Rica
Has thanked: 21 times
Been thanked: 44 times

[SOLVED] Unable to boot sda1 after upgrade to sdc1

#1 Post by ticojohn »

I have three (3) drives in my desktop computer. The BIOS boot order is sda1 (Buster), sdb1 (Bullseye) and sdc1 (Bullseye). The first two drives, sda and sdb, are SSD's and sdc is a HDD. I updated and upgraded all three drives today and restarted the computer after each upgrade. After upgrading sdc1, and restarting, the grub menu was from drive sdc1, not from sda1 as expected. I then restarted and went into the BIOS to verify that the boot order was still as expected (sda1,sdb1,sdc1), and it was. So I disabled sdc1, saved, and restarted. I got a message that a file system could not be found and was presented with the GRUB prompt. I re-enabled drive sdc1, restarted and selected sda1 at the grub menu. Once I got to the desktop I opened a terminal and did a grub-install on /dev/sda. After that the boot process worked as expected.

I had the same thing happen, maybe 6 months ago. I don't recall exactly but I think this and the previous upgrade to sdc1 both had an upgrade to the kernel. I know that today's upgrade had a new kernel, just not sure about the previous upgrade that caused the boot problem. Oh, one other thing. After the upgrade to sdc1 I did an autoremove of an old kernel and might have done the same thing on the previous occurrence of the boot issue.

Has anybody else seen a similar problem? Not sure why it would appear to happen only when upgrading the HDD, but wonder if this might be some kind of bug. Or maybe I'm just lucky. :roll:

UPDATE:Additional Info
All three drives are legacy boot devices, just in case that is important to know.
Last edited by ticojohn on 2021-06-05 19:45, edited 1 time in total.
I am not irrational, I'm just quantum probabilistic.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Unable to boot sda1 after upgrade to sdc1

#2 Post by p.H »

ticojohn wrote:I had the same thing happen, maybe 6 months ago.
And it will happen after each grub* package update until you fix the cause which is : you told grub-pc on sdc to install GRUB's boot image on sda. The consequences are :
- When sda boots, it's sdc's GRUB's boot image which boots.
- This boot image is related to GRUB in sdc, so boot fails when sdc is missing.
- If you force boot on sdc (with the boot image on sdc), boot may fail too because if a version mismatch between the boot image in sdc (which has not been updated, as the new boot image was written to sda) and the contents of /boot/grub.

To check :
- boot the system on sdc
- check the target of grub-pc with

Code: Select all

debconf-show grub-pc | grep install_devices
The result should be a symlink in /dev/disk/by-id. Check which drive it is. If it is not correct, run

Code: Select all

dpkg-reconfigure grub-pc
and select the proper drive.

User avatar
ticojohn
Posts: 1284
Joined: 2009-08-29 18:10
Location: Costa Rica
Has thanked: 21 times
Been thanked: 44 times

Re: Unable to boot sda1 after upgrade to sdc1

#3 Post by ticojohn »

p.H wrote:
ticojohn wrote:I had the same thing happen, maybe 6 months ago.
And it will happen after each grub* package update until you fix the cause which is : you told grub-pc on sdc to install GRUB's boot image on sda.
Oh wow. I never imagined that could be happening. I looked at sdc using the commands you gave. Sure enough sdc was installing its grub image to sda. I corrected that as per your solution and everything now seems to be cool. Interestingly, I looked at sdb and it was configured properly. So why the heck was sdc (the HDD) not configured correctly to begin with but sdb was configured correcctly? Not likely to find out why I suppose. But at least it seems to be okay now. I will copy those commands from your response to have as future reference. Thanks a lot. Kudos!

By the way,when I ran the command

Code: Select all

dpkg-reconfigure grub-pc
it took a real long time to respond and allow me to select the target drive. Maybe because it was the HDD and was really SLOOOOOW! :roll:
I am not irrational, I'm just quantum probabilistic.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: [SOLVED] Unable to boot sda1 after upgrade to sdc1

#4 Post by p.H »

ticojohn wrote:So why the heck was sdc (the HDD) not configured correctly to begin with but sdb was configured correcctly?
This is defined during the installation when you are prompted to select the location for GRUB, unless you change it later like you just did. Maybe you selected the wrong drive.

User avatar
ticojohn
Posts: 1284
Joined: 2009-08-29 18:10
Location: Costa Rica
Has thanked: 21 times
Been thanked: 44 times

Re: [SOLVED] Unable to boot sda1 after upgrade to sdc1

#5 Post by ticojohn »

p.H wrote:
ticojohn wrote:So why the heck was sdc (the HDD) not configured correctly to begin with but sdb was configured correcctly?
This is defined during the installation when you are prompted to select the location for GRUB, unless you change it later like you just did. Maybe you selected the wrong drive.
The HDD was the first drive that I installed in the computer and the SSD's came later. I can't imagine that I later changed the configuration on the HDD to somehow point to the SSD. In any case I now have some knowledge about what happened and how to prevent the same thing from happening in the future, although at 72 years of age this may well be the last system I ever build so I'm not likely to have the issue again. But I will keep all this in mind if I experience the same problem again. I really do appreciate your help. Thanks dude.
I am not irrational, I'm just quantum probabilistic.

Post Reply