apt full-upgrade - DKMS error - Grub Error

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
User avatar
@ajaxStardust
Posts: 106
Joined: Thu Sep 23, 2021 2:18 am

Re: apt full-upgrade - DKMS error - Grub Error

#31 Post by @ajaxStardust »

Thank you for the follow-up. I didn't edit the output that I recall. it starts with the rename / copy commands to save the grub.old. maybe i missed an instruction!

Code: Select all

user@mxlinux-21:~
$ sudo debconf-show grub-pc
[sudo] password for xiola:
  grub2/linux_cmdline_default: quiet splash
  grub-pc/kopt_extracted: false
  grub-pc/install_devices_empty: false
  grub2/kfreebsd_cmdline:
  grub-pc/mixed_legacy_and_grub2: true
  grub-pc/postrm_purge_boot_grub: false
  grub-pc/install_devices_failed: false
  grub-pc/timeout: 5
  grub2/linux_cmdline:
  grub2/kfreebsd_cmdline_default: quiet
* grub-pc/install_devices: /dev/disk/by-id/ata-KINGSTON_SA400S37240G_50026B72829A5371-part1
  grub-pc/disk_description:
  grub2/update_nvram: true
  grub-pc/install_devices_disks_changed:
  grub-pc/partition_description:
  grub-pc/install_devices_failed_upgrade: true
  grub2/force_efi_extra_removable: false
  grub-pc/hidden_timeout: false
  grub-pc/chainload_from_menu.lst: true
user@mxlinux-21:~
$
Edit: i went back to look, and it wasn't there for me either (the shell commands at the top, but I was looking at the wrong one.)
https://forum.mxlinux.org/viewtopic.php ... 10#p696610
Check some old recordings feat me on guitar (acct is dude censored face) at: SoundCloud com /ajaxStardust+
on the Don: vivaldi social /@ajaxStardust

User avatar
fehlix
Developer
Posts: 12903
Joined: Wed Apr 11, 2018 5:09 pm

Re: apt full-upgrade - DKMS error - Grub Error

#32 Post by fehlix »

@ajaxStardust wrote: Fri Sep 23, 2022 3:33 pm

Code: Select all

$ sudo debconf-show grub-pc
...
* grub-pc/install_devices: /dev/disk/by-id/ata-KINGSTON_SA400S37240G_50026B72829A5371-part1
$
OK, thanks.
This "grub-pc/install_devices" is what was probably already "registered" within debconf.
before you made the last "apt update / apt full-upgrade" combo.

When grub packages get upgraded, it checks whether the user had already made a decision
about installing the GRUB boot loader into and won't asked again, b/c the assumption
is made it was a "wise" user decision already taken.

This "/dev/disk/by-id/ata-KINGSTON_SA400S37240G_50026B72829A5371-part1"
translates to /dev/sda1, which is the partition root is installed on.

So, the warning about grub-loader installing onto a partition was issued.
and no GRUB loader was installed into the MBR.

As already explained, the GRUB bootloader needs to go into MBR of the drive - not a partition -
to allow BIOS to load the grub-loader.

Now, to avoid any future grub-package upgrade and stumble accross the wrongly registered location
we need to correct the registered entry within debconf.

Please do run this - but I'm not not sure whether it will work from ssh-terminal:

Code: Select all

sudo dpkg-reconfigure grub-pc
And select /dev/sda as the boot drive.
If this is not show up any debconf interface even not the Dialog interface.
Do run this command:
the set /dev/sda as you boot drive

Code: Select all

echo grub-pc grub-pc/install_devices multiselect /dev/sda | sudo debconf-set-selections
And finall again to verify /dev/sda is registered properly
do run this

Code: Select all

sudo debconf-show grub-pc
So next time grub get upgrade it knows now where to install the grub-bootloader into and won't asked again.

gor9

Re: apt full-upgrade - DKMS error - Grub Error

#33 Post by gor9 »

to add my 2 cents worth for a MBR user where grub is installed in sda with the normal dir of /boot.....before shutdown or reboot...

From now on, irrespective of what my previous selections were, if I see a grub package update I will run

Code: Select all

sudo su
grub-install --boot-directory=/boot /dev/sda
reboot

User avatar
@ajaxStardust
Posts: 106
Joined: Thu Sep 23, 2021 2:18 am

Re: apt full-upgrade - DKMS error - Grub Error

#34 Post by @ajaxStardust »

gor9 wrote: Sat Sep 24, 2022 8:52 am

Code: Select all

sudo su
grub-install --boot-directory=/boot /dev/sda
reboot
I trust you are correct, but is there a particular reason you're doing

Code: Select all

sudo su
? i'll have to reference that. i know it does behave differently than sudo [ command ], but i don't recall the key significance.

to ALL:
After following @fehlix advice specifically (which was about as simple as you can get, "copy / paste", so thank ou for that! i'm sure the several others who experienced any issues are thankful as well!), and the others' thoughtful, useful, and practical feedback, my system is right as rain. I don't know why i get terrified of grub issues. but thank you all. I think we can mark this resolved now.
@fehlix: i will revisit to see what you addressed just above.
Best wishes!
Check some old recordings feat me on guitar (acct is dude censored face) at: SoundCloud com /ajaxStardust+
on the Don: vivaldi social /@ajaxStardust

gor9

Re: apt full-upgrade - DKMS error - Grub Error

#35 Post by gor9 »

is there a particular reason you're doing
I am lazy....the reboot command is already got root powers.

User avatar
siamhie
Global Moderator
Posts: 3775
Joined: Fri Aug 20, 2021 5:45 pm

Re: apt full-upgrade - DKMS error - Grub Error

#36 Post by siamhie »

@ajaxStardust wrote: Sun Sep 25, 2022 8:46 pm
gor9 wrote: Sat Sep 24, 2022 8:52 am

Code: Select all

sudo su
grub-install --boot-directory=/boot /dev/sda
reboot
I trust you are correct, but is there a particular reason you're doing

Code: Select all

sudo su
? i'll have to reference that. i know it does behave differently than sudo [ command ], but i don't recall the key significance.

There is a difference.

https://phoenixnap.com/kb/sudo-vs-su-differences
This is my Fluxbox . There are many others like it, but this one is mine. My Fluxbox is my best friend. It is my life.
I must master it as I must master my life. Without me, my Fluxbox is useless. Without my Fluxbox, I am useless.

User avatar
@ajaxStardust
Posts: 106
Joined: Thu Sep 23, 2021 2:18 am

Re: apt full-upgrade - DKMS error - Grub Error

#37 Post by @ajaxStardust »

Thank you, bearded kitty! i love that, @sian !
That's a nice, succinct article. best regards!

Edit: but, after reading, i'm still uncertain as to specifically why su was used in this instance, vs sudo. Was there something that su was granted permissions to do, Vs the "one time" nature of sudo?

it's not extremely important. i already did the fix, and my system is fine now. just tryin' to learn. ;)
Check some old recordings feat me on guitar (acct is dude censored face) at: SoundCloud com /ajaxStardust+
on the Don: vivaldi social /@ajaxStardust

Post Reply

Return to “MX Help”