Failed to use customized bios boot option in HP notebook?

I have promoted customized boot option to the highest level and set it to /EFI/refind/refind_x64.efi because when I boot it manually from efi file, it the efi file locate at this place. But it failed to boot(message “found no bootable image…”), so I have to still del to find efi and boot manually.

I also tried find the refind folder:

/usr/share/refind >>> locate x64 | grep efi                                                                                                                                                           
/usr/lib/systemd/boot/efi/linuxx64.efi.stub
/usr/lib/systemd/boot/efi/systemd-bootx64.efi
/usr/share/refind/drivers_x64
/usr/share/refind/refind_x64.efi
/usr/share/refind/tools_x64
/usr/share/refind/drivers_x64/btrfs_x64.efi
/usr/share/refind/drivers_x64/ext2_x64.efi
/usr/share/refind/drivers_x64/ext4_x64.efi
/usr/share/refind/drivers_x64/hfs_x64.efi
/usr/share/refind/drivers_x64/iso9660_x64.efi
/usr/share/refind/drivers_x64/ntfs_x64.efi
/usr/share/refind/drivers_x64/reiserfs_x64.efi
/usr/share/refind/tools_x64/gptsync_x64.efi

Then I have no ideas(I really not familiar with bios/grub/refind). thanks for advance.

What’s your $esp mounted? /boot or /boot/efi?
Check at Manjaro terminal

findmnt -s
findmnt /boot
findmnt /boot/efi
ls /boot/efi/

Note your refind efi file is in /boot/efi/refind/refind_x64.efi

So you should use this path in your HP bios path.
But depends on whether your $esp is /boot or /boot/efi.
The path for (any) bios follows the partition (not the root).

So if $esp is /boot/efi, the path should be
/refind/refind_x64.efi not /EFI/refind/refind_x64.efi

ps: but of course, for efistub boots (which you are trying to do), $esp should be /boot
ps: try systemd-boot, it’s purely efistub and simple (and make sure $esp is /boot).

1 Like
~ >>> findmnt -s                                                                                                                                                                                      
~ >>> findmnt /boot                                                                                                                                                                                [1]
~ >>> findmnt /boot/efi                                                                                                                                                                            [1]
~ >>> ls /boot/efi/                                                                                                                                                                                [1]
~ >>> ls /boot                                                                                                                                                                                        
efi  grub  initramfs-4.18-x86_64-fallback.img  initramfs-4.18-x86_64.img  intel-ucode.img  linux418-x86_64.kver  memtest86+  refind_linux.conf	vmlinuz-4.18-x86_64
~ >>>                                                                                                                                                                                                 

The four lines have nothing to output, is it wired?

Try

lsblk
cat /etc/fstab
1 Like
/boot/efi >>> lsblk                                                                                                                                                                                   
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 167.7G  0 disk 
├─sda1   8:1    0   300M  0 part 
├─sda2   8:2    0 154.6G  0 part /
└─sda3   8:3    0  12.8G  0 part [SWAP]
sdb      8:16   0 447.1G  0 disk 
├─sdb1   8:17   0   200M  0 part 
├─sdb2   8:18   0    50G  0 part 
├─sdb3   8:19   0    50G  0 part 
├─sdb4   8:20   0   4.9G  0 part 
└─sdb5   8:21   0   293G  0 part 
/boot/efi >>> cat /etc/fstab                                                                                                                                                                          
# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>                  
1 Like

奇怪。(Strange) You have nothing at all in fstab.
Boot up a livecd or better if you can , boot up the installed manjaro using this
It will work even if you don’t have grub or anything.
Then check using file manager the root partition (which is sda2) if /etc/fstab is really empty.
Then provide

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

or /etc/fstab of sda2 if from livecd.

I think you have something there.
I just think when you boot up using the HP efi path, it does not need anything. Like efistub boots.

@petsam, any comment?
refind on /boot/efi. Strange things happen.

1 Like

@czxyl
I’ll be away for 2 hours.
Your $esp (/boot/efi) is empty.
We can make your system with grub 2 bootloader easily without reinstalling Manjaro (if your fstab has /).
We can also make it refind with $esp as /boot/efi
But much more complicated if you want systemd-boot with $esp as /boot.

First need to confirm if your fstab has / and $esp (most likely sda1) entries
Then if $esp is mounted as /boot/efi
To reinstall refind…

sudo pacman -Sy refind-efi 
sudo refind-install

To install grub

sudo pacman -S grub
sudo grub-install
sudo update-grub

To install systemd-boot , make sure you have $esp as /boot (and / ) in fstab.
Use this

Whatever, first make sure you have $esp and / in your fstab.
It must not be empty.

1 Like

For some mysterious reason your fstab is empty.
I seems sda1 is $esp. Mount it and check the contents to see if it was used as /boot/efi and if so, you may create a proper fstab with root, $esp, home (if there was one.)
The commands output will help, as @gohlip asked.

~ >>> sudo pacman -S grub                                                                                                                                                                        [130]
warning: grub-2.03.0-7.1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) grub-2.03.0-7.1

Total Download Size:    5.74 MiB
Total Installed Size:  28.94 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 grub-2.03.0-7.1-x86_64                                                                          5.7 MiB   470K/s 00:12 [########################################################################] 100%
(1/1) checking keys in keyring                                                                                          [########################################################################] 100%
(1/1) checking package integrity                                                                                        [########################################################################] 100%
(1/1) loading package files                                                                                             [########################################################################] 100%
(1/1) checking for file conflicts                                                                                       [########################################################################] 100%
(1/1) checking available disk space                                                                                     [########################################################################] 100%
:: Processing package changes...
(1/1) reinstalling grub                                                                                                 [########################################################################] 100%
:: Running post-transaction hooks...
(1/2) Arming ConditionNeedsUpdate...
(2/2) Updating the info directory file...
~ >>> sudo grub-install                                                                                                                                                                               
Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory.
~ >>>                   

Unfortunatelly, there is an error(I have not use livecd and the tool provided by you yet)

Yes:

#mount sda1 in media
...
/media >>> sudo mount /dev/sda1 .                                                                                                                                                                     
mount: /media: /dev/sda1 already mounted on /media.
/media >>> cd ..                                                                                                                                                                                  [32]
/ >>> cd /media                                                                                                                                                                                       
/media >>> ls                                                                                                                                                                                         
EFI
/media >>> cd EFI                                                                                                                                                                                     
/media/EFI >>> ls                                                                                                                                                                                     
boot  manjaro_biu_biu_biu  refind  tools
/media/EFI >>>                
/media/EFI >>> tree | grep efi                                                                                                                                                                        
│   └── grubx64.efi
├── refind
│   │   └── ext4_x64.efi
│   │   ├── os_refind.png
│   │   ├── os_refit.png
│   │   │   ├── os_refind.svg
│   │   │   ├── os_refit.svg
│   ├── refind.conf
│   ├── refind-theme-maia
│   │   │   │   ├── os_refind.png
│   │   │   │   ├── os_refit.png
│   │   │   │   ├── os_refind.png
│   │   │   │   ├── os_refit.png
│   │   │       ├── os_refind.png
│   │   │       ├── os_refit.png
│   └── refind_x64.efi
/media/EFI >>>                  

You mounted $esp (sda1) as /media/EFI ?
You got it all wrong.
As said it must be /boot or /boot/efi in fsab.
Wherre is you contentsof /etc/fstab?
And where is

How can we go on if all these are not given?
If you want help, you need to help yourself.

Reminder:

So give us contents of /etc/fstab (in sda2)
So give us sudo blkid so can correct or fill in your fstab
So give us parted -l so we can check your disks.
So give us efibootmgr to see if your uefi is working
So … and even if your fstab is empty, we can fill this out for you with information provided above

I am going to type ahead and hopefully your disks are okay (I don’t know without parted -l) and fill up fstab (without knowing if it has anything or nothing and don’t know if partitions are already mounted) and use xxxxxxxxxxxxxxxxxx for uuid (as I don’t have blkid)

  1. Boot to installed manajar OS in sda2
  2. Open /etc/fstab and fill in entries
    UUID=xxxxxx /boot/efi vfat defaults,noatime 0 2
    UUID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx / ext4 defaults,noatime 0 1
  3. Mount relevant partitions
    sudo mount /dev/sda1 /boot/efi
  4. To install grub
    sudo grub-install
    sudo update-grub
  5. To install refind
    sudo pacman -Sy refind-efi
    sudo refind-install

Do either (4) or (5), not both.
If your uefi is not booted (don’t know without efibootmgr) , it won’t succeed.
If you have other things mounted in /fstab like “/media/EFI” it wont succeed.
If …you do not have root mounted, that is a very serious offence and nothing will succeed.
Check with “findmnt /” . If nothing is in fstab (you didin’t confirm) and somehow it gets booted up and root is not even mounted. You will have a real story to tell.

1 Like

I’m actually trying the commands provided by you, just have not posted here yet. Anyway, sorry for that, it’s my bad.

I will post them as soon as possible

After the first four steps:

/boot/efi >>> efibootmgr -v                                                                                                                                                                      [130]
                           
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000
Boot0000* manjaro	HD(1,GPT,010d7fd3-b8a5-40e9-9584-0bbddba49759,0x1001,0x96001)/File(\EFI\manjaro\grubx64.efi)
/boot/efi >>> sudo parted -l                                                                                                                                                                          
[sudo] password for firstlove: 
Model: ATA INTEL SSDSC2BF18 (scsi)
Disk /dev/sda: 180GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End    Size    File system     Name  Flags
 1      2098kB  317MB  315MB   fat32                 boot, esp
 2      317MB   166GB  166GB   ext4
 3      166GB   180GB  13.7GB  linux-swap(v1)


Model: ATA TOSHIBA Q300. (scsi)
Disk /dev/sdb: 480GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                  Flags
 1      20.5kB  210MB   210MB   fat32        EFI System Partition  boot, esp
 2      211MB   53.9GB  53.7GB  ntfs         Basic data partition  msftdata
 3      53.9GB  108GB   53.7GB  ntfs         Basic data partition  msftdata
 5      108GB   422GB   315GB   ext4
 4      422GB   427GB   5243MB  fat32                              msftdata


/boot/efi >>> sudo blkid                                                                                                                                                                              
/dev/sdb1: UUID="F553-F682" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="3e3544c6-bd7e-4645-af4a-beb54823d19e"
/dev/sdb2: LABEL="music" UUID="0BF912310BF91231" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="54867988-f7f3-11e7-9c33-a0b3cc1f8c46"
/dev/sdb3: UUID="0C3203E00C3203E0" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="54867db3-f7f3-11e7-9c33-a0b3cc1f8c46"
/dev/sdb4: UUID="5B65-CB09" TYPE="vfat" PARTUUID="7c02ecec-99b8-4655-a6ec-9a005708d3dc"
/dev/sdb5: UUID="5c158684-c459-41f8-9ac0-5682a8380bef" TYPE="ext4" PARTUUID="19a9a9e5-37ee-4d0d-a725-a01615f74e81"
/dev/sda1: UUID="BE89-2F07" TYPE="vfat" PARTUUID="010d7fd3-b8a5-40e9-9584-0bbddba49759"
/dev/sda2: UUID="20329f18-c0a0-4817-8808-c5516b6e657c" TYPE="ext4" PARTUUID="afb277aa-84b8-4e96-bf36-bb77c997aa45"
/dev/sda3: UUID="ae47d7a6-3976-4c97-bc20-9133fc945190" TYPE="swap" PARTUUID="577661c7-a880-4ff0-b973-5038b9d08f09"
/boot/efi >>> findmnt -s                                                                                                                                                                              
TARGET    SOURCE                                  FSTYPE OPTIONS
/boot/efi UUID=xxxxxx                             vfat   defaults,noatime
/         UUID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ext4   defaults,noatime
/boot/efi >>> findmnt /boot/efi                                                                                                                                                                       
TARGET    SOURCE    FSTYPE OPTIONS
/boot/efi /dev/sda1 vfat   rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro
/boot/efi >>> cat /etc/fstab                                                                                                                                                                          
# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
UUID=xxxxxx /boot/efi vfat defaults,noatime 0 2
UUID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx / ext4 defaults,noatime 0 1

I remember, when I installed manjaro with manjaro architect, I installed both grub and refind(It has three options, grub and refind are two of them)

/boot/efi >>> findmnt /                                                                                                                                                                               
TARGET SOURCE    FSTYPE OPTIONS
/      /dev/sda2 ext4   rw,relatime

Forget to say, all the things I did above are neither from livecd nor your tool, because neither usb flash disk nor cd-rom is available at hand.

Okay, you can continue using your method (HP bios) to boot.
But just make sure your root is mounted at sda2 with ‘findmnt /’

  1. Boot up sda2 Manjaro,
  2. at terminal, check and verify root is mounted
    sudo findmnt /
    make sure sda2 is listed with output…
  3. Go to /etc/fstab, correct entries to
    UUID=BE89-2F07 /boot/efi vfat defaults,noatime 0 2
    UUID=20329f18-c0a0-4817-8808-c5516b6e657c / ext4 defaults,noatime 0 1
    save file.
  4. sudo mount /dev/sda1 /boot/efi
  5. To install grub
    sudo grub-install
    sudo update-grub
  6. To install refind
    sudo pacman -Sy refind-efi
    sudo refind-install

Do either (5) or (6)
Don’t worry if any or both are installed.
Reboot normally.

  • mount /dev/sda1
/boot/efi/EFI >>> sudo umount /dev/sda1                                                                                                                                                           [32]
umount: /boot/efi: target is busy.
/boot/efi/EFI >>> sudo umount -l /dev/sda1                                                                                                                                                        [32]
/boot/efi/EFI >>> umount -f /media                                                                                                                                                                    
umount: only root can use "--force" option
/boot/efi/EFI >>> sudo umount -f /media                                                                                                                                                            [1]
/boot/efi/EFI >>> sudo mount /dev/sda1 /boot/efi                                                                                                                                                      
/boot/efi/EFI >>> cd boot/ef                                                                                                                                                                          
cd: no such file or directory: boot/ef
/boot/efi/EFI >>> cd /boot/efi                                                                                                                                                                     [1]
/boot/efi >>> ls                                                                                                                                                                                      
EFI
/boot/efi >>> cd EFI                                                                                                                                                                                  
/boot/efi/EFI >>> ls                                                                                                                                                                                  
boot  manjaro  manjaro_biu_biu_biu  refind  tools
/boot/efi/EFI >>> pwd                                                                                                                                                                                 
/boot/efi/EFI
  • try refind(instead of grup because I prefer its name haha):
/boot/efi/EFI >>> sudo pacman -Sy refind-efi                                                                                                                                                          
                                            
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
warning: refind-efi-0.11.3-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) refind-efi-0.11.3-1

Total Installed Size:  4.17 MiB
Net Upgrade Size:      0.00 MiB

:: Proceed with installation? [Y/n] y
(1/1) checking keys in keyring                                                                                          [########################################################################] 100%
(1/1) checking package integrity                                                                                        [########################################################################] 100%
(1/1) loading package files                                                                                             [########################################################################] 100%
(1/1) checking for file conflicts                                                                                       [########################################################################] 100%
(1/1) checking available disk space                                                                                     [########################################################################] 100%
:: Processing package changes...
(1/1) reinstalling refind-efi                                                                                           [########################################################################] 100%

rEFInd UEFI application has been installed at /usr/share/refind/refind_*.efi

Other UEFI applications have been installed at /usr/share/refind/tools_*/

UEFI drivers have been installed at /usr/share/refind/drivers_*/

Copy the efi application (according to your UEFI ARCH) 
and /usr/share/refind/refind.conf-sample to a sub-directory of <EFISYS>/EFI/
as refind.conf and add an entry to firmware boot menu using efibootmgr
or mactel-boot (for Macs)

rEFInd Icons have been installed at /usr/share/refind/icons/
rEFInd Fonts have been installed at /usr/share/refind/fonts/

HTML Documentation is available at /usr/share/refind/docs/html/

More info: https://wiki.archlinux.org/index.php/rEFInd 

:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
/boot/efi/EFI >>> sudo refind-install                                                                                                                                                                 
ShimSource is none
Installing rEFInd on Linux....
ESP was found at /boot/efi using vfat
Found rEFInd installation in /boot/efi/EFI/refind; upgrading it.
Installing driver for ext4 (ext4_x64.efi)
Copied rEFInd binary files

Notice: Backed up existing icons directory as icons-backup.
Existing refind.conf file found; copying sample file as refind.conf-sample
to avoid overwriting your customizations.

Creating new NVRAM entry
rEFInd is set as the default boot manager.
Existing //boot/refind_linux.conf found; not overwriting.
/boot/efi/EFI >>>                                                                           

Let me reboot now.

After reboot, my notebook still says no bootable image found, then I remember i didn’t modify the boot path from bios:

  • add customized Boot option:
    IMG_20180914_212345-0
  • modify path(I have modified it into the right path according to:
~ >>> locate refind_x64.efi                                                                                                                                                                          
/boot/efi/EFI/refind/refind_x64.efi
/usr/share/refind/refind_x64.efi

(Because I have set previously before take photo, so it is current setting
IMG_20180914_212345-3

  • Then start reboot:
    IMG_20180914_212345-4

Oops, it seems refind_x64.efi is still not foundable. So I have to manually look for efi file again:

IMG_20180914_212345-5

  • Maybe I have installed three os(two manjaro, one deepin, but I have formatted the other two oses so only one manjaro left, which is located at sda2), so there are two folders?
    IMG_20180914_212345-6

  • come into EFI/refind folder and boot
    IMG_20180914_212345-9
    IMG_20180914_212345-10


So, it still have some issue, what more information should I provide? (* 1000 times thank you two, I must sleep now, it is 23:26 now, if I replay 7 hours later if you replay)