[Solved] rEFInd won't boot - what to do?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
phosphene

[Solved] rEFInd won't boot - what to do?

Post by phosphene »

Hey guys,

I just did a fresh install of Linux Mint on a new laptop .
I installed refind. It boots using grub anyway.

Here's what I did:
sudo efibootmgr - I discovered refind is the last of my options.
sudo efibootmgr -o - This works until I restart and the original order is automatically restored, making refind last.

Synaptic -> complete removal of grub*.
Reboot.
sudoefibootmgr - I discovered it booted with grub, refind is again my last option. How did it boot with grub when I deleted it?

I created a startup script (refind.sh: efibootmgr -o "my choices").
I edited crontab -e: @reboot pathtoscript/refind.sh.
Reboot.
I got a black screen with a blinking _ in the top left corner. Try to write something, nothing happens. Manual shut off and restart. It boots with grub, presenting me 3 Linux Mint options (that didn't happen before implementing the script).
Reboot again, grub screen appears again.

I really just want rEFInd to work. Any idea how or what's happened for me?

Edited for clarity.

SOLUTION: BIOS -> Boot order -> OS boot -> I see a list of ubuntu and refind. Put rEFInd first by using whatever key changes the value for you.
If that doesn't work, check out the comments here.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
deepakdeshp
Level 20
Level 20
Posts: 12341
Joined: Sun Aug 09, 2015 10:00 am

Re: rEFInd won't boot - what to do?

Post by deepakdeshp »

If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help.
Regards,
Deepak

Mint 21.1 Cinnamon 64 bit with AMD A6 / 8GB
Mint 21.1 Cinnamon AMD Ryzen3500U/8gb
kukamuumuka

Re: rEFInd won't boot - what to do?

Post by kukamuumuka »

It sounds like a mess to me. What tells the next commands?

Code: Select all

sudo parted -l

Code: Select all

inxi -po

Code: Select all

sudo efibootmgr

Code: Select all

sudo os-prober
phosphene

Re: rEFInd won't boot - what to do?

Post by phosphene »

Code: Select all

sudo parted -l
Model: ATA ST1000LM035-1RK1 (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 1000GB 1000GB ntfs Storage msftdata


Model: ATA SanDisk SD9SN8W- (scsi)
Disk /dev/sdb: 128GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 1050MB 1049MB fat32 EFI boot boot, esp
2 1050MB 1060MB 10,5MB BIOS boot bios_grub
3 1060MB 11,5GB 10,5GB linux-swap(v1) Swap
4 11,5GB 34,6GB 23,1GB ext4 OS1
5 34,6GB 57,7GB 23,1GB ext4 OS2
6 57,7GB 80,8GB 23,1GB ext4 OS3
7 80,8GB 104GB 23,1GB ext4 OS4
8 104GB 127GB 23,1GB ext4 OS5
9 127GB 127GB 105MB ext4 extra part
10 127GB 127GB 105MB ext4 extra part
11 127GB 128GB 936MB ext4 extra part

Code: Select all

inxi -po
Partition: ID-1: / size: 21.02 GiB used: 7.48 GiB (35.6%) fs: ext4 dev: /dev/sdb8
ID-2: /boot/efi size: 998.0 MiB used: 12.9 MiB (1.3%) fs: vfat dev: /dev/sdb1
ID-3: /storage size: 931.51 GiB used: 93.6 MiB (0.0%) fs: ntfs dev: /dev/sda1
ID-4: swap-1 size: 9.77 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sdb3
Unmounted: ID-1: /dev/sdb2 size: 10.0 MiB fs: <root required> label: N/A uuid: N/A
ID-2: /dev/sdb4 size: 21.48 GiB fs: ext4 label: N/A uuid: de1b9820-41bd-4d3d-82ed-9e5ae4fae568
ID-3: /dev/sdb5 size: 21.48 GiB fs: ext4 label: N/A uuid: ff96e186-4727-40dd-9f1a-426858e5dcf4
ID-4: /dev/sdb6 size: 21.48 GiB fs: ext4 label: N/A uuid: 0279fa28-fef2-45c4-bdaf-92519f333f47
ID-5: /dev/sdb7 size: 21.48 GiB fs: ext4 label: N/A uuid: 04bec2de-7f76-4c55-b616-f460bd29ff41
ID-6: /dev/sdb9 size: 100.0 MiB fs: ext4 label: N/A uuid: 177be405-af42-43a2-9bdb-a642a7caf69d

Code: Select all

sudo efibootmgr
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 2001,0002,3002,0000,2002,2004
Boot0000* rEFInd Boot Manager
Boot0002* ubuntu
Boot2001* EFI USB Device
Boot3002* Internal Hard Disk or Solid State Disk

Code: Select all

sudo os-prober
sudo: os-prober: command not found

(note: I think I deleted os prober with the complete removal of grub)

Also, I came here after exhausting the refind instructions linked above, including the sections on troubleshooting.

Some info that may be relevant: I've been following this to set up multiple OS. I mounted /storage to my 1TB hard drive.
Side line, I cannot for the life of me install the full Linux Peach because grub will not install no matter the workaround. I installed it sans boot loader, which is another reason I want refind to work. I wouldn't need grub to be able to use it then.

Thank you so much for being willing to help! <3
kukamuumuka

Re: rEFInd won't boot - what to do?

Post by kukamuumuka »

Change order like

Code: Select all

sudo efibootmgr -o 0000,2001,0002,3002,0000,2002,2004
https://www.linuxbabe.com/command-line/ ... r-examples
2. Changing Boot Order
First, copy the current boot order. For example, my boot order is:

0013,0012,0014,0000,0001,0002,0003,000D,0011,0007,0008,0009,000A,000B,000C,000E
Then type in the following command

sudo efibootmgr -o
And append the boot order to the above command.

sudo efibootmgr -o 0013,0012,0014,0000,0001,0002,0003,000D,0011,0007,0008,0009,000A,000B,000C,000E
Let’s say you want 0012 to be the first boot entry. All you have to do is move it to the left of 0013 and press Enter.

sudo efibootmgr -o 0012,0013,0014,0000,0001,0002,0003,000D,0011,0007,0008,0009,000A,000B,000C,000E
phosphene

Re: rEFInd won't boot - what to do?

Post by phosphene »

Yes but I did that. First, it tells me the last two are undefined, so I omit them. That works - until I actually reboot. It's automatically changed back. Hence I implemented it in a startup script that got me weird results (as described above).

I edited my beginning post to make everything a little clearer.
kukamuumuka

Re: rEFInd won't boot - what to do?

Post by kukamuumuka »

How about if you make an order change via systemd? An example:
1. make a script

Code: Select all

sudo nano /etc/BOOTORDER
... a contents

Code: Select all

#! /bin/sh
sleep 60
efibootmgr -o 0000,2001,0002,3002,0000,2002,2004
.... make it executable

Code: Select all

sudo chmod a+x /etc/BOOTORDER
2. Add the script to the systemd

Code: Select all

sudo nano /etc/systemd/system/bootorder.service
… the contents

Code: Select all

[Unit]
Description=to set rEFInd as the first bootable app
After=network.target

[Service]
Type=oneshot
ExecStart=/etc/BOOTORDER

[Install]
WantedBy=multi-user.target
…. save, quit and enable process

Code: Select all

sudo systemctl daemon-reload
sudo systemctl enable bootorder.service
phosphene

Re: rEFInd won't boot - what to do?

Post by phosphene »

Thank you so much for these detailed instructions! It must have taken quite a bit to come up with the code and to type it all out. Thank you.
Unfortunately, nothing changed from it. I got upset and instead of booting straight into LM from my damned grub boot screen, went into the system settings. I could manually select to boot from refind.

Another restart, another grub screen. I went into my BIOS, turns out I could change the boot order of my OS in there. I put refind above ubuntu and now it works!
I apologize, that's something so simple I should have looked at it first. Thank you so much for all your help though, oddly enough, I don't think I would be at this point without it (seeing I already gave up on this twice).
fabien85
Level 7
Level 7
Posts: 1877
Joined: Tue Mar 11, 2014 4:30 pm

Re: [Solved] rEFInd won't boot - what to do?

Post by fabien85 »

Probably the firmware is buggy and does not accept orders from efibootmgr.
One thing to bear in mind is that if you get a shim/grub update, grub will very probably come back as first in the boot order. One way to deal with this is to put the shim package on hold (apt hold, or with synaptic or the update manager).
Locked

Return to “Installation & Boot”