0

I cannot install grub to my original kdeneon after a second aux Linux install for an Ardour boot. (it likes other settings).

Most instructions say to sudo grub-install /dev/sda However, i don't have those drives and after grub-update it does not go back to the way it was.

What do I type?

lsblk shows this:

$ lsblk -f
NAME        FSTYPE   LABEL    UUID                                 FSAVAIL FSUSE% MOUNTPOINT
nvme0n1                                                                           
├─nvme0n1p1 vfat     ESP      7C8F-092C                              23.7M    75% /boot/efi
├─nvme0n1p2                                                                       
├─nvme0n1p3 ntfs              04106A7F106A7816                                    
├─nvme0n1p4 ntfs     Recovery 44CC9028CC901670                                    
├─nvme0n1p5 ext4              749f67cc-2bca-4a9b-bca0-138ba97b6bc7   52.2G    33% /
├─nvme0n1p6 ext4              fc432fe9-2f83-4973-8675-e53dd8de2258                
└─nvme0n1p7 ntfs     Data     7914628E7BB468B5  

  sudo efibootmgr -v
[sudo] password for bhante: 
BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 0003,0004,0001,0000,0005,2001,2002,2003
Boot0000* yes   PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-26-B7-68-28-F3-73-A5)/HD(1,GPT,82e9aa6b-7b75-49ad-b362-7e51a9085ed9,0x800,0x32000)/File(\EFI\deepin\shimx64.efi)A01 ..
Boot0001* Linpus lite   HD(1,GPT,9a1082c8-b452-4c97-9f3f-3a06ad85773a,0x800,0x32000)/File(\EFI\Boot\grubx64.efi)RC
Boot0003* ubuntu        HD(1,GPT,9a1082c8-b452-4c97-9f3f-3a06ad85773a,0x800,0x32000)/File(\EFI\ubuntu\shimx64.efi)RC
Boot0004* Windows Boot Manager  HD(1,GPT,9a1082c8-b452-4c97-9f3f-3a06ad85773a,0x800,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0005* neon  HD(1,GPT,9a1082c8-b452-4c97-9f3f-3a06ad85773a,0x800,0x32000)/File(\EFI\neon\shimx64.efi)
Boot2001* EFI USB Device        RC
Boot2002* EFI DVD/CDROM RC
Boot2003* EFI Network   RC

Here is the output of the commands:

bhante@subhuntu:~$ sudo grub-install /dev/nvme0n1
Installing for x86_64-efi platform.
Installation finished. No error reported.
bhante@subhuntu:~$ sudo update-grub
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/99_breeze-grub.cfg'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found theme: /boot/grub/themes/breeze/theme.txt
Found linux image: /boot/vmlinuz-5.4.0-65-generic
Found initrd image: /boot/initrd.img-5.4.0-65-generic
Found linux image: /boot/vmlinuz-5.4.0-64-generic
Found initrd image: /boot/initrd.img-5.4.0-64-generic
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Found KDE neon User Edition 5.20 (20.04) on /dev/nvme0n1p6
Warning: Please don't use old title `Neon GNU/Linux (on /dev/nvme0n1p6)' for GRUB_DEFAULT, use `Advanced options for KDE neon User Edition 5.20 (20.04) (on /dev/nvme0n1p6)>Neon GNU/Linux (on /dev/nvme0n1p6)' (for versions before 2.00) or `gnulinux-advanced-fc432fe9-2f83-4973-8675-e53dd8de2258>gnulinux---fc432fe9-2f83-4973-8675-e53dd8de2258' (for 2.00 or later)
Found linux image: /boot/vmlinuz-5.4.0-65-generic
Found initrd image: /boot/initrd.img-5.4.0-65-generic
Found linux image: /boot/vmlinuz-5.4.0-64-generic
Found initrd image: /boot/initrd.img-5.4.0-64-generic
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Found KDE neon User Edition 5.20 (20.04) on /dev/nvme0n1p6
Warning: Please don't use old title `Neon GNU/Linux (on /dev/nvme0n1p6)' for GRUB_DEFAULT, use `Advanced options for KDE neon User Edition 5.20 (20.04) (on /dev/nvme0n1p6)>Neon GNU/Linux (on /dev/nvme0n1p6)' (for versions before 2.00) or `gnulinux-advanced-fc432fe9-2f83-4973-8675-e53dd8de2258>gnulinux---fc432fe9-2f83-4973-8675-e53dd8de2258' (for 2.00 or later)
Found linux image: /boot/vmlinuz-5.4.0-65-generic
Found initrd image: /boot/initrd.img-5.4.0-65-generic
Found linux image: /boot/vmlinuz-5.4.0-64-generic
Found initrd image: /boot/initrd.img-5.4.0-64-generic
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Found KDE neon User Edition 5.20 (20.04) on /dev/nvme0n1p6
Warning: Please don't use old title `Neon GNU/Linux (on /dev/nvme0n1p6)' for GRUB_DEFAULT, use `Advanced options for KDE neon User Edition 5.20 (20.04) (on /dev/nvme0n1p6)>Neon GNU/Linux (on /dev/nvme0n1p6)' (for versions before 2.00) or `gnulinux-advanced-fc432fe9-2f83-4973-8675-e53dd8de2258>gnulinux---fc432fe9-2f83-4973-8675-e53dd8de2258' (for 2.00 or later)
Adding boot menu entry for UEFI Firmware Settings
done

This is the output of the cat /etc/default/grub BTW: all is done in the linux boot of kdeneon i want to be default.

~$ cat /etc/default/grub           
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT="Neon GNU/Linux (on /dev/nvme0n1p6)"
GRUB_TIMEOUT_STYLE="hidden"
GRUB_TIMEOUT="3"
GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL="console"

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE="640x480"

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID="true"

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

GRUB_SAVEDEFAULT="false"
GRUB_THEME="/boot/grub/themes/breeze/theme.txt"

I want this to show up when I boot. (there are two neons). grub-customizer

14/2 update Here is the output of the efibootmgr-v after trying some suggestions..The strange thing is this is AFTER doing the command

sudo efibootmgr -d /dev/nvme0n1 -n 5 -o 0005,0003,0004

so I am not sure what is happening.

bhante@subhuntu:~$ sudo efibootmgr -v
[sudo] password for bhante: 
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0002,0003,0004,0005,0001,2001,2002,2003
Boot0000* yes   PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-26-B7-68-28-F3-73-A5)/HD(1,GPT,82e9aa6b-7b75-49ad-b362-7e51a9085ed9,0x800,0x32000)/File(\EFI\deepin\shimx64.efi)A01 ..
Boot0001* yes   PciRoot(0x0)/Pci(0x1d,0x0)/Pci(0x0,0x0)/NVMe(0x1,00-26-B7-68-28-F3-73-A5)/HD(1,GPT,82e9aa6b-7b75-49ad-b362-7e51a9085ed9,0x800,0x32000)/File(\EFI\deepin\shimx64.efi)A01 ..
Boot0002* Linpus lite   HD(1,GPT,9a1082c8-b452-4c97-9f3f-3a06ad85773a,0x800,0x32000)/File(\EFI\Boot\grubx64.efi)RC
Boot0003* ubuntu        HD(1,GPT,9a1082c8-b452-4c97-9f3f-3a06ad85773a,0x800,0x32000)/File(\EFI\ubuntu\shimx64.efi)RC
Boot0004* Windows Boot Manager  HD(1,GPT,9a1082c8-b452-4c97-9f3f-3a06ad85773a,0x800,0x32000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0005* neon  HD(1,GPT,9a1082c8-b452-4c97-9f3f-3a06ad85773a,0x800,0x32000)/File(\EFI\neon\shimx64.efi)
Boot2001* EFI USB Device        RC
Boot2002* EFI DVD/CDROM RC
Boot2003* EFI Network   RC

This is the same output that I have ran previously.

bhante@subhuntu:~$ sudo efibootmgr -d /dev/nvme0n1 -n 5 -o 0005,0003,0004
BootNext: 0005
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0005,0003,0004
Boot0000* yes
Boot0001* yes
Boot0002* Linpus lite
Boot0003* ubuntu
Boot0004* Windows Boot Manager
Boot0005* neon
Boot2001* EFI USB Device
Boot2002* EFI DVD/CDROM
Boot2003* EFI Network
6
  • It shows grub reinstalled in UEFI boot mode without error. But did not set 0005 as first in boot order. Or did you run the sudo efibootmgr -v before reinstalling grub? – oldfred Feb 14 at 3:37
  • I'm not sure. I ran the efibootmanager a few times.. and booted.. later I ran the grub install too. Nothing seems to work. and setting the order does not "stick" although it displays that it will use #0005 but it does not when I reboot and then shows 0002 as first. – Bhikkhu Subhuti Feb 14 at 5:28
  • Is this an HP? HP and maybe some others do not seem to work with efibootmgr. I think it syncs with BCD. Those with HP have said updating UEFI and from within UEFI changing boot order using tab for boot, not UEFI boot menu. You may also be able to edit BCD in Windows. bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi if for any reason you need to undo that, so Windows is first: bcdedit /set {bootmgr} path \EFI\Microsoft\Boot\bootmgfw.efi Not sure if Neon uses /EFI/Ubuntu, change if required. Some use /EFI/grub or the distribution name. – oldfred Feb 14 at 14:56
  • It is Acer Swift 3 2019 model i5. I will try a few more times.. try the win boot command you suggest. The other thought occurred to me that I could try the boot-repair app running locally. I've only tried to run it by live cd. I have updated my post to show the efibootmgr output – Bhikkhu Subhuti Feb 14 at 15:28
  • time for bed.i'll try in the morning – Bhikkhu Subhuti Feb 14 at 15:52
0

You’re currently booted using the grub2 efi executable from Boot0003, and you want to boot using the executable from Neon (Boot0005), if I’m understanding you correctly?

Then run: sudo efibootmgr -d /dev/nvme0n1 -n 5 to choose to boot into the neon boot manager the next time.

Currently, the boot order has it booting into Ubuntu’s grub2 efi executable by default. You can change the boot order with the -o 0005,0003,0004 (etc.) as a parameter to efibootmgr.

The grub2-install doesn’t really help you, the documentation you are reading probably predates UEFI. You just need to tell your firmware to boot the firefight entry for the appropriate system.

13
  • Sorry, I don’t understand. – jsbillings Feb 14 at 2:13
  • Thanks for both answers. (That was what I meant to say). The first answer gave me the efibootmgr command to give more info for you to help further. – Bhikkhu Subhuti Feb 14 at 2:31
  • It still does not work.. i also added the order. The boot i want is on p6. I added a screenshot to the grub-customizer. Maybe a better solution is how to delete the unnecessary boots? or fix both? – Bhikkhu Subhuti Feb 14 at 5:17
  • when i do the command sudo efibootmgr -v after reboot, it still shows to boot 0002 after I ran your command and also this . Plus installing grub again and update-grub. sudo efibootmgr -d /dev/nvme0n1 -n 5 -o 0005,0003,0004 So it is not "sticking" . Need to remove the old eufis too. – Bhikkhu Subhuti Feb 14 at 5:20
  • There isn’t a Boot0002 entry in your efibootmgr output so I’m not sure what you are saying. The -n option just means “next boot” and doesn’t change the boot order. It helps you get into the OS you want so you can run commands from there. Make sure the grub.cfg that is in the same directory as the efi executable has the correct config too. – jsbillings Feb 14 at 13:56
0

Your drive is a NVMe drive, /dev/nvme0n1.

So if booted into the install you want as default boot.

sudo grub-install /dev/nvme0n1

See also:

man grub-install

Defaults should work, but lots of options with UEFI installs. You do need correct ESP mounted in your fstab. You can confirm with this:

cat /etc/fstab

You can also check UEFI boot entries.

sudo efibootmgr -v

If you want to houseclean old entries. Be sure to only delete obsolete entries.

https://askubuntu.com/questions/1198221/cloning-ssd-also-cloned-boot-options/1198228#1198228

if you cannot boot into the install you want, you typically need to chroot into the install to mount required partitions. For newer users often easier to use Boot-Repair from live installer.

https://help.ubuntu.com/community/Boot-Repair

UEFI Chroot:

http://askubuntu.com/questions/53578/can-i-install-in-uefi-mode-with-the-alternate-installer/57380#57380

To change boot order use efibootmgr and its -o option for order.

https://askubuntu.com/questions/485261/change-boot-order-using-efibootmgr

1
  • First i tried with /dev/sda but although that did not fail, it obviously did not work. Then I sudo grub-install /dev/nvme0n1 (before posting here and again after your comment) and still that did not take effect. My grub is changed from grub-custumizer but still it does not take effect. I edit my original question with adding more info. – Bhikkhu Subhuti Feb 14 at 0:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.