Restore Manjaro GRUB entry to UEFI menu

Hello everyone,
I just installed majaro deepin. I have been using Ubuntu from 2 years and wanted to shift. First of all when i tried to install i simply selected replace partition in installation window and replaced my Ububtu installation. After doing that i couldn’t boot into Deepin. I tried everything like using chroot to restore grub and all that stuff but my computer either could directly boot into Windows or Ubunut(which leaded to Ubuntu grub as there was no ubuntu anymore)
Then i installed again and this time i manually partitioned to create boot/efi also. This time also it booted to ubuntu grub but when i type exit this time i could see efi of deepin also and hence i could boot. But i want to remove that ubuntu grub and want that Deepi’s grub should appear there.
I tried updating Grub from terminal but it didnt do it.

When i turn on the computer what i get is shown in image 3

what i get when i type exit int ubuntu grub , is shown in image 2(I just select the third one to boot to deepin )

Even when i try to change boot order there also ubuntu is still showing and no option for deepin(Image 1)
Sorry for uploading combined images being a new user i could only insert single image image

Please kindly Help

Step 4 of https://wiki.manjaro.org/index.php/Restore_the_GRUB_Bootloader#For_UEFI_Systems should work.

Note that “manjaro” in --bootloader-id=manjaro specifies what text will appear in the UEFI boot menu.

gohlip is the resident expert on all things boot. I’m pretty sure they’ll be along shortly. :slight_smile:

The best Tutorial in town:

My pc is currently updating and i will reboot as soon as it is over. But would this remove Ubuntu option which is still shown in boot menu ? (i dont knw why is it shown if i completely removed ubuntu though ) What i am able to configure is this would add manjaro into boot menu but how to remove ption of ubuntu?

I did try this earlier. But my output showed a lot of hd1, hd2 … ans many more and i got confused which would be for manjaro hence i didnt risk it up. Anyway i can boot to deepin.

Use the tutorial to see how you can manually (no matter the UEFI menu) boot to your system.
If you don’t feel confident, boot to your USB-ISO Manjaro installer and provide the output of the commands as pointed out in the tutorial.
Use proper wrapping for the output text </>

Edit:

efibootmgr -v
sudo parted -l
sudo blkid
findmnt -s
findmnt /boot/efi

boot into windows, hit <win>+<x>, and start an Admin Powershell. Then:

$ mountvol s: /s
$ s:
$ cd EFI
$ ls

Do you see your Manjaro directory? The Ubuntu directory is probably still there. You can delete it after your fixed your problem. Let us know.

1 Like

Really sorry… i made a typo there… I meant i can boot into deepin. The only problem is that i am still gettin the grub of ubuntu and its deepin doesnt shows into boot manager options so that i can set its order as shown in attached picture.

I tried point 4 but it doesnt works :’(

We have to use a common language, so we understand the meanings.
Deepin is not your system.
Your system (which you are booting into) is Manajro.
Another system is Ubuntu and also Windows.
Deepin is your Desktop Environment.

  1. Does your system boot to Manjaro Grub menu?
  2. Do you always have to enter UEFI/BIOS menu to select the proper boot system? What happens if you don’t get into UEFI/BIOS?
  3. If you select Ubuntu from UEFI/BIOS, which Grub menu do you get? Manjaro or Ubuntu (which is the first option in the menu)?

After trying mountvol s: /s ,
i get this
The parameter is incorrect

Sorry for using wrong terms

  1. Yes it does but not directly. When i boot i see Ubuntu command line Grub, there i type exit and and then i get 3 options to select from (as shown in image 2) I select the 3rd option EFI hard drive and then i get manjaro grub menu can be seen having three options boot to manjaro, advanced, and boot to windows.
  2. I don’t go to UEFI/BIOS every time. Ubuntu is set at the top of the boot order there. I want to set Manajro at the top but as stated earlier there is no option of manjaro there.
  3. I get Ubuntu grub which is not menu but like a command line

Start your terminal and run these commands:

efibootmgr -v
sudo parted -l
sudo blkid
findmnt -s
findmnt /boot/efi

Paste them here, using proper wrapping with code tags button in post editor </>

[luv@luv-pc Desktop]$ efibootmgr -v
BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 0000,3000,0001,0003,2001,2002,2004
Boot0000* ubuntu	HD(1,GPT,683fd01a-2241-46b8-8dad-8a9c2436d706,0x800,0x82000)/File(\EFI\ubuntu\shimx64.efi)
Boot0001* Windows Boot Manager	HD(1,GPT,683fd01a-2241-46b8-8dad-8a9c2436d706,0x800,0x82000)/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.}....................
Boot0003* EFI Hard Drive (HGST HTS541010A9E680)	PciRoot(0x0)/Pci(0x17,0x0)/Sata(0,0,0)/HD(8,GPT,161702b7-fab0-4360-8b49-ab9924bbb31a,0x3bed3000,0x96000)RC
Boot2001* EFI USB Device	RC
Boot2002* EFI DVD/CDROM	RC
Boot3000* Internal Hard Disk or Solid State Disk	RC

[luv@luv-pc Desktop]$ sudo parted -l
[sudo] password for luv: 
Model: ATA HGST HTS541010A9 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name  Flags
 1      1049kB  274MB   273MB   fat32           EF    boot, esp
 2      274MB   408MB   134MB                   Mi    msftres
 3      408MB   192GB   191GB   ntfs            Ba    msftdata
 4      192GB   515GB   323GB   ntfs                  msftdata
 8      515GB   515GB   315MB   fat32                 msftdata
 9      515GB   624GB   109GB   ext4
10      624GB   632GB   8457MB  linux-swap(v1)
 5      632GB   972GB   340GB   ntfs                  msftdata
 6      972GB   973GB   767MB   ntfs            Ba    hidden, diag
 7      973GB   1000GB  27.7GB  ntfs            Ba    hidden, diag

[luv@luv-pc Desktop]$ sudo blkid
/dev/sda1: LABEL="SYSTEM" UUID="42F7-1173" TYPE="vfat" PARTLABEL="EF" PARTUUID="683fd01a-2241-46b8-8dad-8a9c2436d706"
/dev/sda2: PARTLABEL="Mi" PARTUUID="85d93528-e2ab-493d-85c1-6b110d773308"
/dev/sda3: LABEL="Windows" UUID="74DEE1F4DEE1AF14" TYPE="ntfs" PARTLABEL="Ba" PARTUUID="d73c53e1-b046-42a9-a192-80c5898788fa"
/dev/sda4: LABEL="Personal" UUID="01D1FBD928559F30" TYPE="ntfs" PARTUUID="e516450d-2ba0-e5c7-a642-4181f912b8a8"
/dev/sda5: LABEL="Movies" UUID="06F647A6F6479539" TYPE="ntfs" PARTUUID="0265de75-2d41-10a0-17ed-d84138b0645f"
/dev/sda6: LABEL="WINRE" UUID="307C2F1B7C2EDB7C" TYPE="ntfs" PARTLABEL="Ba" PARTUUID="5a198314-f149-4941-858f-54f8a1ab6637"
/dev/sda7: LABEL="RECOVERY" UUID="980632B5063293EA" TYPE="ntfs" PARTLABEL="Ba" PARTUUID="920288d3-9d26-46a9-ad07-4a85e54e1730"
/dev/sda8: UUID="A71D-F057" TYPE="vfat" PARTUUID="161702b7-fab0-4360-8b49-ab9924bbb31a"
/dev/sda9: UUID="f4c1f1b6-f1e4-4be6-8834-25091ab3fe55" TYPE="ext4" PARTUUID="8d0a0caa-2604-4318-8bbc-969936fb8e8b"
/dev/sda10: UUID="b77591df-fe7a-4595-b9c4-53549e0eac2d" TYPE="swap" PARTUUID="a29680ef-f55b-4703-a274-6f3ffbcbebca"

[luv@luv-pc Desktop]$ findmnt -s
TARGET    SOURCE                                    FSTYPE OPTIONS
/boot/efi UUID=A71D-F057                            vfat   defaults,noatime
/         UUID=f4c1f1b6-f1e4-4be6-8834-25091ab3fe55 ext4   defaults,noatime
swap      UUID=b77591df-fe7a-4595-b9c4-53549e0eac2d swap   defaults,noatime
[luv@luv-pc Desktop]$ findmnt /boot/efi
TARGET    SOURCE    FSTYPE OPTIONS
/boot/efi /dev/sda8 vfat   rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors

Also these, please:

ls -la /boot/efi/EFI
ls -la /boot/efi/EFI/Manjaro
[luv@luv-pc Desktop]$ ls -la /boot/efi/EFI
total 16
drwxr-xr-x 4 root root 4096 Jun 22  2018 .
drwxr-xr-x 5 root root 4096 Jan  1  1970 ..
drwxr-xr-x 2 root root 4096 Jun 22  2018 boot
drwxr-xr-x 2 root root 4096 Jun 22  2018 Manjaro
[luv@luv-pc Desktop]$ ls -la /boot/efi/EFI/Manjaro
total 132
drwxr-xr-x 2 root root   4096 Jun 22  2018 .
drwxr-xr-x 4 root root   4096 Jun 22  2018 ..
-rwxr-xr-x 1 root root 123904 Jun 22 01:59 grubx64.efi

Your installer has created a second /boot/efi @esp partition, instead of using the existing one.
There is some work to do it right :

sudo mkdir /mnt/efi
sudo mount /dev/sda1 /mnt/efi
sudo grub-install --target=x86_64-efi --efi-directory=/mnt/efi --bootloader-id=manjaro
sudo grub-install --target=x86_64-efi --efi-directory=/mnt/efi --bootloader-id=manjaro --recheck

Run the above commands and then post the output of these, so I help you edit fstab:

efibootmgr -v
cat /etc/fstab
[luv@luv-pc Desktop]$ efibootmgr -v
BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 0000,3000,0001,0003,2001,2002,2004
Boot0000* ubuntu	HD(1,GPT,683fd01a-2241-46b8-8dad-8a9c2436d706,0x800,0x82000)/File(\EFI\ubuntu\shimx64.efi)
Boot0001* Windows Boot Manager	HD(1,GPT,683fd01a-2241-46b8-8dad-8a9c2436d706,0x800,0x82000)/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.}....................
Boot0003* EFI Hard Drive (HGST HTS541010A9E680)	PciRoot(0x0)/Pci(0x17,0x0)/Sata(0,0,0)/HD(8,GPT,161702b7-fab0-4360-8b49-ab9924bbb31a,0x3bed3000,0x96000)RC
Boot2001* EFI USB Device	RC
Boot2002* EFI DVD/CDROM	RC
Boot3000* Internal Hard Disk or Solid State Disk	RC
[luv@luv-pc Desktop]$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=A71D-F057                            /boot/efi      vfat    defaults,noatime 0 2
UUID=f4c1f1b6-f1e4-4be6-8834-25091ab3fe55 /              ext4    defaults,noatime 0 1
UUID=b77591df-fe7a-4595-b9c4-53549e0eac2d swap           swap    defaults,noatime 0 2

Also this, please:

ls /mnt/efi/EFI/Manjaro
ls /mnt/efi/EFI
[luv@luv-pc Desktop]$ ls /mnt/efi/EFI/Manjaro
grubx64.efi
[luv@luv-pc Desktop]$ ls /mnt/efi/EFI
Boot  HP  Manjaro  Microsoft  ubuntu