You are not logged in.

#1 2021-02-20 03:11:10

AndreyTarkovsky
Member
Registered: 2017-03-26
Posts: 75

[Solved] Refind without entries after a reboot

Accidentally I rebooted my laptop while pacman was updating my whole system and looks like something affected my refind, because there is no entries anyomre.

Below my refind_linux.conf - I'm using a boot partition(sda1).

"Arch Linux" "root=UUID=9041ce7a-6432-4734-a4e4-133910a63719 rw add_efi_memmap initrd=boot\intel-ucode.img initrd=boot\amd-ucode.img initrd=boot\initramfs-%v.img"
"Arch Linux Fallback" "root=UUID=9041ce7a-6432-4734-a4e4-133910a63719 rw add_efi_memmap initrd=boot\intel-ucode.img initrd=boot\amd-ucode.img initrd=boot\initramfs-%v-fallback.img"
"Arch Linux Terminal" "root=UUID=9041ce7a-6432-4734-a4e4-133910a63719 rw add_efi_memmap initrd=boot\intel-ucode.img initrd=boot\amd-ucode.img initrd=boot\initramfs-%v.img systemd.unit=multi-user.target

The UUID above is my sda3 which is my Arch root partition.

I did try in chroot:

1: "refind-install"
2: "refind-install --usedefault /dev/sda1"

(yes, I know from the archwiki that doing this on chroot is not a good idea.... but then what could I do?)

Can someone help me?

Last edited by AndreyTarkovsky (2021-02-24 00:54:00)

Offline

#2 2021-02-20 07:58:59

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,568

Re: [Solved] Refind without entries after a reboot

First things first. Is this legit?

initrd=boot\initramfs-%v.img

I'm not entirely sure about the %v part as I'm not sure how the %v part is read by rEFInd.  Did you write refind_linux.conf yourself or was this auto-generated?
I would edit this to the actual names of the images for a start.

Offline

#3 2021-02-20 16:45:34

AndreyTarkovsky
Member
Registered: 2017-03-26
Posts: 75

Re: [Solved] Refind without entries after a reboot

d_fajardo wrote:

First things first. Is this legit?

initrd=boot\initramfs-%v.img

I'm not entirely sure about the %v part as I'm not sure how the %v part is read by rEFInd.  Did you write refind_linux.conf yourself or was this auto-generated?
I would edit this to the actual names of the images for a start.

I did change my refind_linux.conf and some stuff on my refind.conf. please take a look, I can not see what is wrong here sad

refind_linux.conf
https://pastebin.com/QamjcGh4

refind.conf
https://pastebin.com/b26XdiVH

Offline

#4 2021-02-20 18:37:09

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,568

Re: [Solved] Refind without entries after a reboot

"Arch Linux" "root=UUID=9041ce7a-6432-4734-a4e4-133910a63719 rw add_efi_memmap initrd=boot\intel-ucode.img initrd=boot\amd-ucode.img initrd=boot\initramfs-linux.img"
"Arch Linux Fallback" "root=UUID=9041ce7a-6432-4734-a4e4-133910a63719 rw add_efi_memmap initrd=boot\intel-ucode.img initrd=boot\amd-ucode.img initrd=boot\initramfs-linux-fallback.img"
"Arch Linux Terminal" "root=UUID=9041ce7a-6432-4734-a4e4-133910a63719 rw add_efi_memmap initrd=boot\intel-ucode.img initrd=boot\amd-ucode.img initrd=boot\initramfs-linux.img systemd.unit=multi-user.target

This is what I meant. The one you had from the first post is fine. You just have to fill in the %v variable. Then just create another entry for the zen kernel.

Offline

#5 2021-02-20 19:32:17

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,568

Re: [Solved] Refind without entries after a reboot

I updated my own reading of rEFInd and it did indeed say you can use your %v variable provided you set the extra_kernel_version_strings in refind.conf with the names of your kernels.

Offline

#6 2021-02-21 00:17:03

AndreyTarkovsky
Member
Registered: 2017-03-26
Posts: 75

Re: [Solved] Refind without entries after a reboot

d_fajardo wrote:

"Arch Linux" "root=UUID=9041ce7a-6432-4734-a4e4-133910a63719 rw add_efi_memmap initrd=boot\intel-ucode.img initrd=boot\amd-ucode.img initrd=boot\initramfs-linux.img"
"Arch Linux Fallback" "root=UUID=9041ce7a-6432-4734-a4e4-133910a63719 rw add_efi_memmap initrd=boot\intel-ucode.img initrd=boot\amd-ucode.img initrd=boot\initramfs-linux-fallback.img"
"Arch Linux Terminal" "root=UUID=9041ce7a-6432-4734-a4e4-133910a63719 rw add_efi_memmap initrd=boot\intel-ucode.img initrd=boot\amd-ucode.img initrd=boot\initramfs-linux.img systemd.unit=multi-user.target

This is what I meant. The one you had from the first post is fine. You just have to fill in the %v variable. Then just create another entry for the zen kernel.

It does not work, no matter what I edit on refind_linux.conf, it keeps now showing anything. But when I edit the refind.conf as the below, I get the Arch Logo and the boot options for it, but then I get a black screen with an error as shown in the imgur below.

menuentry "Arch Linux" {
    icon     /EFI/refind/icons/os_arch.png
    volume   "Arch Linux"
    loader   /boot/vmlinuz-linux
    initrd   /boot/initramfs-linux.img
    options  "root=PARTUUID=9041ce7a-6432-4734-a4e4-133910a63719 rw add_efi_memmap"
    submenuentry "Boot using fallback initramfs" {
        initrd /boot/initramfs-linux-fallback.img
    }
    submenuentry "Boot to terminal" {
        add_options "systemd.unit=multi-user.target"
    }
    #disabled
}

And the error:
https://i.imgur.com/blnVRdj.jpg

Offline

#7 2021-02-21 08:19:56

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,568

Re: [Solved] Refind without entries after a reboot

There is a big difference between UUID and PARTUUID so let's try to backtrack a bit. The rEFInd wiki tends to prefer the use of PARTUUID.
Please post the outputs of the following commands:

ls /boot
blkid
efibootmgr

The first command tells what images are in your boot partition.
The second command tells the ids of your partition
The last command outputs a list of your bootable devices and should show your Arch entry although for some motherboards (like mine) efibootmgr doesn't work very well. I think this is fine in your setup since you're being dropped to a rEFInd shell but just to check.

Offline

#8 2021-02-21 09:04:01

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 595

Re: [Solved] Refind without entries after a reboot

I don't get why the focus is on rEFInd.

AndreyTarkovsky wrote:

Accidentally I rebooted my laptop while pacman was updating my whole system and looks like something affected my refind, because there is no entries anyomre.

Unless you have a custom pacman hook that updates rEFInd, then this has nothing to do with rEFInd.
The issue most likely is that you are missing the kernel and initramfs images in /boot. The pre-transaction hook /usr/share/libalpm/hooks/60-mkinitcpio-remove.hook removed the files, but since you rebooted, the post-transaction hook /usr/share/libalpm/hooks/90-mkinitcpio-install.hook wasn't run.

Reinstall the linux package from arch-chroot.

Offline

#9 2021-02-21 16:23:39

AndreyTarkovsky
Member
Registered: 2017-03-26
Posts: 75

Re: [Solved] Refind without entries after a reboot

d_fajardo wrote:

There is a big difference between UUID and PARTUUID so let's try to backtrack a bit. The rEFInd wiki tends to prefer the use of PARTUUID.
Please post the outputs of the following commands:

ls /boot
blkid
efibootmgr

The first command tells what images are in your boot partition.
The second command tells the ids of your partition
The last command outputs a list of your bootable devices and should show your Arch entry although for some motherboards (like mine) efibootmgr doesn't work very well. I think this is fine in your setup since you're being dropped to a rEFInd shell but just to check.



Here are the outputs:

ls boot/
initramfs-linux-fallback.img      initramfs-linux-zen.img
initramfs-linux.img               vmlinuz-linux
initramfs-linux-zen-fallback.img  vmlinuz-linux-zen
blkid 
/dev/sdb1: BLOCK_SIZE="2048" UUID="2020-10-20-00-01-33-00" LABEL="Fedora-WS-Live-33-1-2" TYPE="iso9660" PTUUID="1cf9ab0d" PTTYPE="dos" PARTUUID="1cf9ab0d-01"
/dev/sda1: UUID="9239-D215" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="bd082807-50b1-4b36-8c34-721e083d2174"
/dev/sda2: UUID="7d5f2531-b3c5-4aa8-9b2d-347995645f9c" TYPE="swap" PARTUUID="0c4bba62-612a-4778-9668-6c6b0138db0d"
/dev/sda3: UUID="9041ce7a-6432-4734-a4e4-133910a63719" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="025c624c-3024-4dd5-abcb-47e9c6e772c5"
/dev/sda4: UUID="e8945b25-7825-4fa4-aecb-c0e6dbc1c125" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="f409ffca-9d50-9845-9dd0-d0f4f7645e60"
/dev/sdb2: SEC_TYPE="msdos" LABEL_FATBOOT="ANACONDA" LABEL="ANACONDA" UUID="8DBC-AAB9" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="1cf9ab0d-02"
/dev/sdb3: UUID="89a14935-39dd-3c35-bed6-eae9a4d00ffc" BLOCK_SIZE="4096" LABEL="ANACONDA" TYPE="hfsplus" PARTUUID="1cf9ab0d-03"
/dev/loop0: TYPE="squashfs"
/dev/loop1: LABEL="Anaconda" UUID="2b82edc2-4eb2-44a0-8b5b-c71da0de9b3a" BLOCK_SIZE="4096" TYPE="ext4"
/dev/loop2: TYPE="DM_snapshot_cow"
/dev/mapper/live-rw: LABEL="Anaconda" UUID="2b82edc2-4eb2-44a0-8b5b-c71da0de9b3a" BLOCK_SIZE="4096" TYPE="ext4"
/dev/mapper/live-base: LABEL="Anaconda" UUID="2b82edc2-4eb2-44a0-8b5b-c71da0de9b3a" BLOCK_SIZE="4096" TYPE="ext4"
/dev/zram0: UUID="9aef8f43-e3cf-4da3-a615-70dc039d0a97" TYPE="swap"
efibootmgr
BootCurrent: 0004
Timeout: 0 seconds
BootOrder: 0004,0005
Boot0000* ubuntu
Boot0001* Manjaro
Boot0004* refind
Boot0005* UEFI: KingstonDataTraveler 2.01.00, Partition 1
Boot0006* rEFInd Boot Manager

Also it's worth to point out that the linux images on /boot are in my root partition(sda3) and my refind_linux.conf and EFI folder are in the sda1, which is a FAT32 partition.

Offline

#10 2021-02-21 16:57:25

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 595

Re: [Solved] Refind without entries after a reboot

refind_linux.conf needs to be in the same directory as the kernel(s).
Your first post said you're using a boot partition, but your refind_linux.conf has "initrd=boot\" and as you say /boot/ on sda3 contains the kernel and initramfs. So it doesn't really look like you're using a separate boot partition.
Try moving your refind_linux.conf to /boot/ where your kernel resides.

Last edited by nl6720 (2021-02-21 16:58:09)

Offline

#11 2021-02-21 18:00:54

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,568

Re: [Solved] Refind without entries after a reboot

As stated your refind_linux.conf should be with your kernels. But another thing that is missing is the location of your EFI directory where refind_x64.efi should reside.
I suggest having a read of the manual installation (from personal experience always works better than using the refind-install script) of the rEFInd wiki.
While at it, can you post the output of:

lsblk
# updatedb && locate refind_x64.efi

The first command will tell the topology of your partition scheme.
The second command will find if and where your refind efi is located.
Also if you are troubleshooting boot problems, it is best to detach other devices and partitions if you are able to do so.

Offline

#12 2021-02-21 18:32:16

AndreyTarkovsky
Member
Registered: 2017-03-26
Posts: 75

Re: [Solved] Refind without entries after a reboot

nl6720 wrote:

refind_linux.conf needs to be in the same directory as the kernel(s).
Your first post said you're using a boot partition, but your refind_linux.conf has "initrd=boot\" and as you say /boot/ on sda3 contains the kernel and initramfs. So it doesn't really look like you're using a separate boot partition.
Try moving your refind_linux.conf to /boot/ where your kernel resides.


Yes, I'm sorry, actually I have a separated EFI partiion with boot flag and all my refind configs are there.
I did put the refind_linux.conf in the /boot/ on my sda3, but didn't work.
sad

It's very strange, cause I have another PC with arch linux and all the configs look the same without any issues.
sad

Last edited by AndreyTarkovsky (2021-02-21 18:32:37)

Offline

#13 2021-02-22 11:48:48

nl6720
The Evil Wiki Admin
Registered: 2016-07-02
Posts: 595

Re: [Solved] Refind without entries after a reboot

Are you mounting the EFI system partition to /boot? If so, then your refind_linux.conf entries with "initrd=boot\" are wrong. See the warning in https://wiki.archlinux.org/index.php/RE … linux.conf .

Please post your fstab, otherwise I find it hard to understand your mountpoints.

Last edited by nl6720 (2021-02-22 11:49:09)

Offline

#14 2021-02-24 00:53:34

AndreyTarkovsky
Member
Registered: 2017-03-26
Posts: 75

Re: [Solved] Refind without entries after a reboot

Well, I "solved" the issue copying all files from /boot that were in my second machine whose the installation was actually a full hdd copy of my laptop using dd, so, it worked. thank you guys for all the help.

Offline

#15 2021-02-24 02:59:58

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,774

Re: [Solved] Refind without entries after a reboot

Um, do they have the same hostname?   Are they on the same network?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#16 2021-02-27 00:10:06

AndreyTarkovsky
Member
Registered: 2017-03-26
Posts: 75

Re: [Solved] Refind without entries after a reboot

ewaller wrote:

Um, do they have the same hostname?   Are they on the same network?

It was cloned months ago, I already changed the hostname in the cloned system to solve network conflicts.

Offline

Board footer

Powered by FluxBB