The officially official Devuan Forum!

You are not logged in.

#1 2023-08-26 09:29:41

Duke Nukem
Registered: 2018-11-07
Posts: 23  

[SOLVED] update-grub not working

I updated Chimaera to Daedalus with the "apt-get upgrade" and "apt-get dist-upgrade" commands. I also have an Ascii installation on a different partition on the same HDD, and Windows and DOS on two further different HDDs. With Chimera I had the ability to boot into all those and I want to keep that ability.

For safety during the Daedalus upgrade I unmounted the Ascii partition, my data partitions, and physically disconnected the Windows HDD. I left the DOS HDD connected because it was too hard to reach.

As expected after the installation the Grub menu did not show Ascii or Windows, nor (surprisingly) DOS. So after reconnecting everything and mounting the Ascii partition I tried to run "update-grub" and it said "Command not found". So I tried "apt-get install update-grub" and it said "Unable to locate package update-grub". I'm using root of course. I then tried "grub-mkconfig" with the same result. Yet I can see the man pages of these commands. My sources.list is as recommended by Devuan's upgrade-to-daedalus page.

So is "update-grub" no longer avaiable and if so is there a replacement? According to aptitude I have grub-common, grub-pc, grub-pc-bin and grub2-common installed.  How do I get out of this fix other than wiping the Daedalus partition and doing a fresh installation of it?

Last edited by Duke Nukem (2023-08-26 09:33:54)


#2 2023-08-26 11:13:17

Registered: 2017-11-25
Posts: 884  

Re: [SOLVED] update-grub not working

Assumptions: you use an older PC without UEFI, all disks use MBR partition scheme, none a GPT partition scheme. Please confirm.

To the "Command not found" issue: most likely you have used su to become root, don't you? That is the problem. Do it again and issue an

# echo $PATH

then repeat the procedure using

su -

That is a change dripping down from Debian into Devuan, I think since Beowulf. Do a web search with the keywords "debian command not found". When using su - update-grub will be found again.
Nevertheless, there is another change with Daedalus. os-prober isn't executed automatically any more, refer to the release notes. You need to enable it again in /etc/default/grub.


#3 2023-08-26 15:47:01

Duke Nukem
Registered: 2018-11-07
Posts: 23  

Re: [SOLVED] update-grub not working

Thanks for that, now solved. Assumptions confirmed BTW.
As I had been using Ascii day-to-day until now (I had only installed Chimaera experimentally) I had not previously encountered the new need to add a dash suffix to the su command to get root's environment settings, and hence get the system apps in the path.  I fail to see the point of this change, but still ...

I also needed to enable os-prober in grub (for the benefit of other readers, the file /etc/default/grub), by uncommenting the existing "false" line :

# If your computer has multiple operating systems installed, then you
# probably want to run os-prober. However, if your computer is a host
# for guest OSes installed via LVM or raw disk devices, running
# os-prober can cause damage to those guest OSes as it mounts
# filesystems to look for things.

Shame that update-grub interpreted my DOS FAT partition as a Windows7 installation, but I guess you can't have everything, and I suppose I could change the name if I edited /boot/grub/grub.cfg, despite the dire warning at the top not to do so.

Last edited by Duke Nukem (2023-08-26 15:48:05)


Board footer