[Solved] Installation of Manjaro Mate miss EFI grub install?

#1

Hello,

this morning I installed Manjaro MATE 18.04 to a empty used HDD.

I prepared the HDD before with gparted:

  • Created a GPT partition table
  • Created a 100MB filesystem, formatted with fat32 for EFI (/dev/sdc1)
  • Created a 40GB filesystem for Manjaro (/dev/sdc2)

Setup the BIOS of my PC to start in UEFI mode

then I installed from USB stick and it proceeds with some halts. It would be nice if there were a console output with more information a what the PC does. But it helps to switch to a console and use top.

At the end the installer asks me were to install grub and I answered that the installation should go to the new disk. But after the installation I checked my EFI partition and it was empty.

So I had to do the steps from your UEFI - Install Guide inside a manjaro-chroot.

I did a grub-install like described there, got the message:

EFI variables are not supported on this system.

loaded the efivarfs module and by a new try of grub-install got the same message again.
But the grubx64.efi is written now to /boot/efi.

I rebooted and could start Manjaro from my new disk.

But now I checked if my EFI partition is mounted to /boot/EFI and wonder cause /boot/efi is empty.

Is this normal that it will not mounted? What would happen if a grub update arrives?

TIA

#2

What is terminal output

test -d /sys/firmware/efi && echo UEFI || echo BIOS
sudo parted -l
sudo blkid
cat /etc/fstab
ls /boot/efi/
ls /boot/efi/efi/
ls /boot/efi/efi/manjaro/
efibootmgr -v
3 Likes
#3

BIOS

Modell: Maxtor OneTouch (scsi)
Festplatte  /dev/sdc:  500GB
Sektorgröße (logisch/physisch): 512B/512B
Partitionstabelle: gpt
Disk-Flags: 

Nummer  Anfang  Ende    Größe   Dateisystem  Name     Flags
 1      1049kB  106MB   105MB   fat32        EFI      boot, esp
 2      106MB   42,0GB  41,9GB  ext4         Manjaro
/dev/sdc1: LABEL_FATBOOT="EFI" LABEL="EFI" UUID="9F1E-BE9A" TYPE="vfat" PARTLABEL="EFI" PARTUUID="f50e442a-60c5-41fd-a08e-915e6934f653"
/dev/sdc2: UUID="faa46f6e-600a-4fa6-8249-22009248b65a" TYPE="ext4" PARTLABEL="Manjaro" PARTUUID="ed967ebc-e003-4647-a64d-e6f9bbd9d516"
 /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=33ce6228-bc65-47df-a4c3-e02ba1c83045 swap           swap    defaults,noatime 0 2
UUID=faa46f6e-600a-4fa6-8249-22009248b65a /              ext4    defaults,noatime 0 1
/dev/sdc1                                 /boot/efi      vfat    defaults         0 2 

I had added /dev/sdc1 by hand.

[peter@monastir ~]$ ls /boot/efi/
EFI
[peter@monastir ~]$ ls /boot/efi/EFI/
manjaro
[peter@monastir ~]$ ls /boot/efi/EFI/manjaro/
grubx64.efi
[peter@monastir ~]$ efibootmgr -v
EFI variables are not supported on this system.

So for my understanding I have GPT partitioning scheme without working EFI so I use BIOS, right?
Should I care for that???

#4

Yes.

Yes.
If you want to keep this setup (I would suggest you either re-install on UEFI, if BIOS can do it, or reformat the drive in MBR and re-install on MSDOS/Legacy), you need to implement GUID Partition Table (GPT) specific instructions. In short, grub (if using grub) needs a special bios_grub type partition as "fake MBR", to save grub core image (what is normaly saved at MBR partition tables).

So, choose your poison!... :wink:

2 Likes
#5

I don't have your full parted -l, you only provide for sdc.
This is important as what we do next may affect OS's in other disks.
You should care for that.
I don't know why I have to keep saying 'all disks, do not omit or truncate'.

And where is your blkid? For all drives!

Now, since I'm not too available and we are on different time zones, you will have to wait.
Meantime, while booted up, make sure you install, if not installed, the follwoing packages

    efibootmgr
    dosfstools
    efivar

And... change your fstab of /boot/efi to that of UUID, not '/dev/sdc1' and make that '0 0' not '0 2'
AND swap entry must be '0 0'

After doing all these, provide again 'cat /etc/fstab' together with the full data.
And just to be sure, your HDD is in internal drive, not external drive?
If you want to take the risk and I cannot be sure when I'll reply, do this, after all above is done.
But I assume all is well, unless you provide all data, the risk is on you alone.

findmnt /boot/efi

make sure output shows sdc1 or corresponding to it in lsblk -f
Then only do

sudo mkdir /boot/efi/efi/boot
sudo grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck --debug 
sudo update-grub
sudo cp /boot/grub/x86_64-efi/core.efi /boot/efi/EFI/boot/bootx64.efi
sudo efibootmgr -c -d /dev/sdc -p 1 -L "manjaro" -l "\EFI\Manjaro\grubx64.efi"

Last command - '/dev/sdc' if device is not sdc as in lsblk -f, use the right device.
When done, provide

efibootmgr -v
3 Likes
#6

I thought to myself that something goes wrong.

So I learned that I have not that big interest to use UEFI for my storage devices. My Mainboard is a actual from Gigabyte with colored and animated graphics and Linux does not depend on UEFI cause it controls the hardware itself.

But I prefer to use GPT, at least on this device, cause this allows me more than 15 partitions.

So I setup my BIOS to Legacy mode for storage devices, wrote a new GPT partition table with gdisk, created a 1MB unformatted partition, flagged it with EF02 and reinstalled Manjaro on a new 40GB partition.

#7

So everything is fine now?

#8

Thanks for your engagement.

As you could read in my answer of the previous post I prefer now to use GPT with BIOS/Legacy. I see no favor in using UEFI.

Modell: ATA ST500DM002-1BD14 (scsi)
Festplatte  /dev/sda:  500GB
Sektorgröße (logisch/physisch): 512B/4096B
Partitionstabelle: msdos
Disk-Flags: 

Nummer  Anfang  Ende   Größe   Typ       Dateisystem     Flags
 1      1049kB  106MB  105MB   primary   ntfs
 2      106MB   105GB  105GB   primary   ntfs
 3      105GB   105GB  200MB   primary   fat32           esp
 4      105GB   500GB  395GB   extended                  lba
 5      105GB   155GB  50,0GB  logical   ext4
 6      155GB   198GB  42,2GB  logical   ext4
 7      198GB   240GB  42,1GB  logical   ext4
 8      240GB   282GB  42,0GB  logical   ext4
 9      282GB   324GB  42,3GB  logical   ext4
10      324GB   366GB  42,0GB  logical   ext4
11      366GB   408GB  41,9GB  logical   ext4
12      408GB   448GB  40,0GB  logical   ext4
13      448GB   495GB  46,8GB  logical   ext4
14      495GB   500GB  5348MB  logical   linux-swap(v1)

Modell: Maxtor OneTouch (scsi)
Festplatte  /dev/sdc:  500GB
Sektorgröße (logisch/physisch): 512B/512B
Partitionstabelle: gpt
Disk-Flags: 

Nummer  Anfang  Ende    Größe   Dateisystem  Name                 Flags
 1      1049kB  2097kB  1049kB               BIOS boot partition  bios_grub
 2      2097kB  41,9GB  41,9GB  ext4

Modell: Hitachi HDS721010CLA332 (scsi)
Festplatte  /dev/sdd:  1000GB
Sektorgröße (logisch/physisch): 512B/512B
Partitionstabelle: msdos
Disk-Flags: 

Nummer  Anfang  Ende   Größe   Typ      Dateisystem  Flags
 1      32,3kB  385GB  385GB   primary  ntfs
 2      385GB   437GB  52,4GB  primary  ext4
 3      437GB   479GB  41,9GB  primary  ext4
[monastir ~]# blkid
/dev/sda1: LABEL="System-reserviert" UUID="1EEA7D3AEA7D0EF1" TYPE="ntfs"
/dev/sda2: LABEL="Windows" UUID="24104F46104F1DE4" TYPE="ntfs"
/dev/sda3: LABEL_FATBOOT="EFI" LABEL="EFI" UUID="445C-8224" TYPE="vfat"
/dev/sda5: LABEL="Manjaro" UUID="5e00768e-3bbf-4160-b0c9-745b787804db" TYPE="ext4"
/dev/sda6: LABEL="Mint" UUID="ca69a243-09c6-4fb3-bae0-3fa68773c22f" TYPE="ext4"
/dev/sda7: LABEL="Solus" UUID="e2f786cb-1f5a-4635-b445-9f09d7384a71" TYPE="ext4"
/dev/sda8: LABEL="Ubuntu Mate" UUID="219c88de-5386-43c0-9924-10f46d523cef" TYPE="ext4"
/dev/sda9: LABEL="Fedora" UUID="1402933a-19c8-4eb3-a56a-4436616d3632" TYPE="ext4"
/dev/sda10: LABEL="Debian" UUID="0fa5e012-59eb-4f5b-94b3-edf87f79ec2f" TYPE="ext4"
/dev/sda11: LABEL="MX18.2" UUID="4b70663c-b251-4c93-9922-bbe4b8405f36" TYPE="ext4"
/dev/sda12: LABEL="elementary" UUID="ceaed00e-beb8-413a-b718-51d3034e4d19" TYPE="ext4"
/dev/sda13: LABEL="Arch" UUID="90c39417-8290-4b20-a740-4792a3f4defa" TYPE="ext4"
/dev/sda14: UUID="33ce6228-bc65-47df-a4c3-e02ba1c83045" TYPE="swap"
/dev/sdc1: PARTLABEL="BIOS boot partition" PARTUUID="f6c5ba59-6deb-4929-b0e2-945ddbd4474b"
/dev/sdc2: UUID="74d9b1c2-9691-48d8-bb5e-e03bf74e3824" TYPE="ext4" PARTUUID="fea40ee5-4292-4d4a-9999-d410725ec37a"
/dev/sdd1: LABEL="DS_1" UUID="74F4FC89F4FC4EBC" TYPE="ntfs" PARTUUID="bd9b5e5b-01"
/dev/sdd2: LABEL="timeshift" UUID="2a93595c-f658-4de8-b110-b73ccc9066cc" TYPE="ext4" PARTUUID="bd9b5e5b-02"
/dev/sdd3: LABEL="Parrot" UUID="46af0f82-3315-4b3d-b085-64ec9f7976de" TYPE="ext4" PARTUUID="bd9b5e5b-03"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"

I had installed them on my first try, I think, but now reinstalled using GPT with BIOS Boot partition.

I have a new fstab now for the reinstalled system but the UUID of the swap device is not easy to read
and must compared with the blkid-list to know to know which device is meant. In the past I was knowing this direct on the name which disk and which part.

monastir ~]# 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=33ce6228-bc65-47df-a4c3-e02ba1c83045 swap           swap    defaults,noatime 0 2
UUID=74d9b1c2-9691-48d8-bb5e-e03bf74e3824 /              ext4    defaults,noatime 0 1

swap entry must be '0 0'
on all distros?
I usually leaved it on their own decision.

I have three HDD's:
1 intern: sda
2 USB extern: sdc, sdd

[monastir ~]# lsblk -f
NAME    FSTYPE   LABEL             UUID                                 FSAVAIL FSUSE% MOUNTPOINT
loop0   squashfs                                                              0   100% /var/lib/snapd/snap/core/6818
loop1   squashfs                                                              0   100% /var/lib/snapd/snap/gtk-common-themes/1198
loop2   squashfs                                                              0   100% /var/lib/snapd/snap/wonderwall/11
sda                                                                                    
├─sda1  ntfs     System-reserviert 1EEA7D3AEA7D0EF1                                    
├─sda2  ntfs     Windows           24104F46104F1DE4                                    
├─sda3  vfat     EFI               445C-8224                                           
├─sda4                                                                                 
├─sda5  ext4     Manjaro           5e00768e-3bbf-4160-b0c9-745b787804db                
├─sda6  ext4     Mint              ca69a243-09c6-4fb3-bae0-3fa68773c22f                
├─sda7  ext4     Solus             e2f786cb-1f5a-4635-b445-9f09d7384a71                
├─sda8  ext4     Ubuntu Mate       219c88de-5386-43c0-9924-10f46d523cef                
├─sda9  ext4     Fedora            1402933a-19c8-4eb3-a56a-4436616d3632                
├─sda10 ext4     Debian            0fa5e012-59eb-4f5b-94b3-edf87f79ec2f                
├─sda11 ext4     MX18.2            4b70663c-b251-4c93-9922-bbe4b8405f36                
├─sda12 ext4     elementary        ceaed00e-beb8-413a-b718-51d3034e4d19                
├─sda13 ext4     Arch              90c39417-8290-4b20-a740-4792a3f4defa                
└─sda14 swap                       33ce6228-bc65-47df-a4c3-e02ba1c83045                [SWAP]
sdc                                                                                    
├─sdc1                                                                                 
└─sdc2  ext4                       74d9b1c2-9691-48d8-bb5e-e03bf74e3824   27,6G    23% /
sdd                                                                                    
├─sdd1  ntfs     DS_1              74F4FC89F4FC4EBC                      248,7G    31% /run/media/peter/DS_1
├─sdd2  ext4     timeshift         2a93595c-f658-4de8-b110-b73ccc9066cc   16,7G    60% /run/media/peter/timeshift
└─sdd3  ext4     Parrot            46af0f82-3315-4b3d-b085-64ec9f7976de   30,7G    14% /run/media/peter/Parrot
sr0                           
#9

Yes, it seems okay so far.

#10

You should be aware that having swap on internal, means you can't use the external drive (with Manjaro) on another PC.
I'm marking my post as the solution (Discource forum rules).

1 Like
#11

Do you have a bios_grub partition as petsam mentioned?
Remember the rules for it.
unallocated
very small, cannot be big
first partition
flagged

You don't ? and it is working ? Won't be... for long.
Solved? Not quite.

1 Like
#12

Do you mean this?

#13

Oh yeah.. I came back to this forum and first check my pings.
I did not see his post above yours. Thought it is older posts that I've gone through.

Right , that should work.
Thanks for pointing this out.

1 Like
#14

Maybe you missed something?

Modell: ATA ST500DM002-1BD14 (scsi)
Festplatte  /dev/sda:  500GB
Sektorgröße (logisch/physisch): 512B/4096B
Partitionstabelle: msdos
Disk-Flags: 

Nummer  Anfang  Ende   Größe   Typ       Dateisystem     Flags
 1      1049kB  106MB  105MB   primary   ntfs
 2      106MB   105GB  105GB   primary   ntfs            boot
 3      105GB   105GB  200MB   primary   fat32           esp
 4      105GB   500GB  395GB   extended                  lba
 5      105GB   155GB  50,0GB  logical   ext4
 6      155GB   198GB  42,2GB  logical   ext4
 7      198GB   240GB  42,1GB  logical   ext4
 8      240GB   282GB  42,0GB  logical   ext4
 9      282GB   324GB  42,3GB  logical   ext4
10      324GB   366GB  42,0GB  logical   ext4
11      366GB   408GB  41,9GB  logical   ext4
12      408GB   448GB  40,0GB  logical   ext4
13      448GB   495GB  46,8GB  logical   ext4
14      495GB   500GB  5348MB  logical   linux-swap(v1)


Modell: Maxtor OneTouch (scsi)
Festplatte  /dev/sdb:  500GB
Sektorgröße (logisch/physisch): 512B/512B
Partitionstabelle: gpt
Disk-Flags: 

Nummer  Anfang  Ende    Größe   Dateisystem  Name                 Flags
 1      1049kB  2097kB  1049kB               BIOS boot partition  bios_grub
 2      2097kB  41,9GB  41,9GB  ext4


Modell: Hitachi HDS721010CLA332 (scsi)
Festplatte  /dev/sdc:  1000GB
Sektorgröße (logisch/physisch): 512B/512B
Partitionstabelle: msdos
Disk-Flags: 

Nummer  Anfang  Ende   Größe   Typ      Dateisystem  Flags
 1      32,3kB  385GB  385GB   primary  ntfs
 2      385GB   437GB  52,4GB  primary  ext4
 3      437GB   479GB  41,9GB  primary  ext4

Do you see /dev/sdb1?

 1      1049kB  2097kB  1049kB               BIOS boot partition  bios_grub
#15

Well, it was not on last previous output..

So yes, I did not see it.

1 Like
#16

I have only my office-room where my mini-tower-pc with the two external HDD's is and a Laptop in my living room with no space for external HDD's and no intention.

As you might have seen I had and have Manjaro Testing on my internal HDD at /dev/sda5. The external HDD is only for some experiencing. I don't really care about it.

1 Like
#17

Hey, you 2 guys are way beyond your bed times.
Peter, I'll give you a fitting Chinese name.... drum roll...
李馒头

It is as pronounced as your German name.
You can search for the last 2 characters on this forum.
You'll love it.

#18

I 've just landed at Keelung mom!! :rofl:

#19

And for you, Chinese don't really have 's' in pronunciation, and Greek accent is missing.
But best Chinese name and you'll like it too is
百度

Unrivalled (not copied, not stolen - nobody to steal or copy from :joy:) technology company.
Its gps system is more than a gps system btw. heh heh..
hint: it knows where Trump is.. :rofl:

1 Like
#20

I am on vacation and sleep when I am tired and do some work when I am awake.

This chinese name you give to me, what does it mean?
On google translator I found Lǐ mántou and Li Shutou but no explanation.

My german real name is Peter Littmann. I abbreviated it just a bit cause it may be to long to use here.

As you may know Peter derivates from latin Petrus and means english: rock, chinese: 岩石