why didn't I have to $ sudo update-grub2?

Chat about Linux in general
Forum rules
Do not post support questions here. Before you post read the forum rules. Topics in this forum are automatically closed 6 months after creation.
Locked
oldgranola
Level 5
Level 5
Posts: 564
Joined: Fri Sep 05, 2014 1:39 am

why didn't I have to $ sudo update-grub2?

Post by oldgranola »

Hello,
Kernel hopping, distro hopping, and running Arch alongside LM19. Two grub things are different than expected.
1. after getting rid of a kernel in LM19

Code: Select all

remove --purge linux-unsigned-image-4.17.0-generic
I should have to

Code: Select all

sudo update-grub2
But I don't seem to have to. It appears to now be a part of the purge. Boot menu seems to already be updated. Cool. Did something change?

2. Arch documentation says it has to own grub (or whatever boot controler) to boot; that updating debian/ubuntu/mint grub will wipe out the Arch grub and one must go back to the arch live install media, chroot, mount to the arch install and repair its grub to have arch in the boot menu and to work. Prior, I did have my Monjaro at the top of the boot menu. After purging the mainline kernel as in 1 while in LM19, and the apparent auto updating of grub2, I still see Manjaro but it is now at the bottom. That makes me believe it was indeed the ubuntu grup2 that did the work. Yet I can still boot to the Arch distro.

Is the dogma now incorrect? Did the Arch grub actually get updated (while running LM19) even if it appears the grub version is ubuntu?

Code: Select all

grub-install --version
grub-install (GRUB) 2.02-2ubuntu8.3
Not a big deal but I like to know whats going on
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
comadore, pcDOS, hpux, solaris, vms-vax ....blah blah blah..
Yet I'm still a fn nooob
ajgringo619

Re: why didn't I have to $ sudo update-grub2?

Post by ajgringo619 »

Code: Select all

ls /usr/sbin/update-grub*
-rwxr-xr-x 1 root root  64 Jul 13 06:21 /usr/sbin/update-grub
lrwxrwxrwx 1 root root  11 Jul 13 06:21 /usr/sbin/update-grub2 -> update-grub
-rwxr-xr-x 1 root root 301 Mar 27  2015 /usr/sbin/update-grub-gfxpayload
Same difference...
oldgranola
Level 5
Level 5
Posts: 564
Joined: Fri Sep 05, 2014 1:39 am

Re: why didn't I have to $ sudo update-grub2?

Post by oldgranola »

Code: Select all

ls /usr/sbin/update-grub*
-rwxr-xr-x 1 root root 64 Jul 13 06:21 /usr/sbin/update-grub
lrwxrwxrwx 1 root root 11 Jul 13 06:21 /usr/sbin/update-grub2 -> update-grub
-rwxr-xr-x 1 root root 301 Mar 27 2015 /usr/sbin/update-grub-gfxpayload

Same difference...
Not sure how that answers the questions posed. Please elaborate
comadore, pcDOS, hpux, solaris, vms-vax ....blah blah blah..
Yet I'm still a fn nooob
gm10

Re: why didn't I have to $ sudo update-grub2?

Post by gm10 »

1. The removal script includes update-grub and you needed to sudo the removal.
2. I have never heard of Ubuntu's GRUB package being unable to boot Arch so you probably just misunderstood something.
Last edited by gm10 on Sat Aug 25, 2018 4:19 pm, edited 1 time in total.
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: why didn't I have to $ sudo update-grub2?

Post by Flemur »

oldgranola wrote: Sat Aug 25, 2018 3:44 pmI should have to

Code: Select all

sudo update-grub2
But I don't seem to have to. It appears to now be a part of the purge. Boot menu seems to already be updated. Cool. Did something change?
Removing a kernel has always resulted in a an updated grub menu as far as I know.
that updating debian/ubuntu/mint grub will wipe out the Arch grub and one must go back to the arch live install media, chroot, mount to the arch install and repair its grub to have arch in the boot menu and to work.
Depends what you mean by "updating" - "update-grub" won't wipe out another grub install, it just updates your grub.cfg menu. "grub-install" will wipe out another OSs grub MBR.
Prior, I did have my Monjaro at the top of the boot menu. After purging the mainline kernel as in 1 while in LM19, and the apparent auto updating of grub2, I still see Manjaro but it is now at the bottom. That makes me believe it was indeed the ubuntu grup2 that did the work. Yet I can still boot to the Arch distro.
"update-grub" looks for the other OSs and adds them to the grub menu.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
JeremyB
Level 21
Level 21
Posts: 13880
Joined: Fri Feb 21, 2014 8:17 am

Re: why didn't I have to $ sudo update-grub2?

Post by JeremyB »

Because of the file /etc/kernel/postrm.d/zz-update-grub
oldgranola
Level 5
Level 5
Posts: 564
Joined: Fri Sep 05, 2014 1:39 am

Re: why didn't I have to $ sudo update-grub2?

Post by oldgranola »

I see. Its only grub-install that does.
Here is a reference, one among many that arch needs its grub to be in charge.
https://ingbrief.wordpress.com/2018/04/ ... u-upgrade/
comadore, pcDOS, hpux, solaris, vms-vax ....blah blah blah..
Yet I'm still a fn nooob
Locked

Return to “Chat about Linux”