Mailing List Archive

Anybody using refind?
Is there andbody using refind? Especially in Germany?
I have some questions about.

--
Regards Klaus
Re: Anybody using refind? [ In reply to ]
On Thursday, February 2, 2023 10:42:40 AM CET Klaus Dittrich wrote:
> Is there andbody using refind? Especially in Germany?
> I have some questions about.

If you have questions, feel free to ask on this list.
I am sure I am not the only one using it.

--
Joost
Re: Anybody using refind? [ In reply to ]
On 02.02.23 10:51, J. Roeleveld wrote:
> On Thursday, February 2, 2023 10:42:40 AM CET Klaus Dittrich wrote:
>> Is there andbody using refind? Especially in Germany?
>> I have some questions about.
>
> If you have questions, feel free to ask on this list.
> I am sure I am not the only one using it.
>
> --
> Joost
>
>
>
>
Joost,

my current system boots from bios(mbr) not uefi.

My knowlege of uefi is poor and uefi is still confusing me.
So it may be some of my questions will looking silly for you.

I now have prepared a gpt disk with two partitions,
one efi (fat32) and one for my system (ext4) with my existing
system already copied (dd'ed) on it.
This existing system was one partition only, no separate boot partition.

Now I want to know how the efi partition has to look after
I have installed refind.

refind can read ext4 so where have I to put the kernels?

Into /boot of the ext4 partition, where they already are,
or on /boot/efi/EFI/? which gets mounted after the kernel
has read /etc/fstab.

Can you post a tree of /boot with the esp-partition already mounted
of your refind booted system?


refind can only boot kernels compiled with CONFIG_EFI_STUB=y.

Can refind find and boot such kernels if the exist on a second disk?

I always copied my running (mbr/bios) system to a second disk,
so if something went wrong I switched the bootdisk in bios to
the backup disk and was up again a minute later.

I did this with a simple script that edited /etc/fstab and did
the copy by ddpt so only the differences since the last copy
were written.So saving a fine running system before changing
something critical on it was done in less than two minutes
using nvme-disks which can read very fast.

I will try to achieve the same with uefi, but uefi does not show
me devices to switch to like bios did.
How to brand the system- and the backup-disk so refind can distinguish
between them?


Will it be possible to have refind at an usb-stick and let it
boot one of the two identical systems from of two different disks?

The goal is to be prepared against disk failures and system failures
and to have always have a running system to boot from and to repair
the one that failed or to clone it to a new disk in case one of the
disks failed.
So the only failure able to set me offline will be a hardware failure
on motherboard or powersupply.

--
Regards Klaus
Re: Anybody using refind? [ In reply to ]
Please only send mails to the list.
There is no need to add me to the TO or CC lists.

On Thursday, February 2, 2023 12:22:49 PM CET Klaus Dittrich wrote:
> On 02.02.23 10:51, J. Roeleveld wrote:
> > On Thursday, February 2, 2023 10:42:40 AM CET Klaus Dittrich wrote:
> >> Is there andbody using refind? Especially in Germany?
> >> I have some questions about.
> >
> > If you have questions, feel free to ask on this list.
> > I am sure I am not the only one using it.
> >
> > --
> > Joost
>
> Joost,
>
> my current system boots from bios(mbr) not uefi.
>
> My knowlege of uefi is poor and uefi is still confusing me.
> So it may be some of my questions will looking silly for you.

Did you read the well-written howto on the Gentoo website?

https://wiki.gentoo.org/wiki/Refind[1]



--------
[1] https://wiki.gentoo.org/wiki/Refind
Re: Anybody using refind? [ In reply to ]
On 02.02.23 12:33, J. Roeleveld wrote:
> Please only send mails to the list.
> There is no need to add me to the TO or CC lists.
>
> On Thursday, February 2, 2023 12:22:49 PM CET Klaus Dittrich wrote:
>> On 02.02.23 10:51, J. Roeleveld wrote:
>>> On Thursday, February 2, 2023 10:42:40 AM CET Klaus Dittrich wrote:
>>>> Is there andbody using refind? Especially in Germany?
>>>> I have some questions about.
>>>
>>> If you have questions, feel free to ask on this list.
>>> I am sure I am not the only one using it.
>>>
>>> --
>>> Joost
>>
>> Joost,
>>
>> my current system boots from bios(mbr) not uefi.
>>
>> My knowlege of uefi is poor and uefi is still confusing me.
>> So it may be some of my questions will looking silly for you.
>
> Did you read the well-written howto on the Gentoo website?
>
> https://wiki.gentoo.org/wiki/Refind[1]
>
>
>
> --------
> [1] https://wiki.gentoo.org/wiki/Refind
>
Joost,

no. Thanks for the hint, I had just a short look into at it.

There is presupposed that one is at a uefi system already.

I have to install refind to a disk mounted to my mbr-booted-system,
make all necessary adjustments there and then put it to the uefi-only
machine and boot it there.

So I cannot call efibootmanger to pin refind to nvram of the uefi-system.

--
Klaus
Re: Anybody using refind? [ In reply to ]
On Thursday, February 2, 2023 1:15:51 PM CET Klaus Dittrich wrote:
> On 02.02.23 12:33, J. Roeleveld wrote:
> > Please only send mails to the list.
> > There is no need to add me to the TO or CC lists.
> >
> > On Thursday, February 2, 2023 12:22:49 PM CET Klaus Dittrich wrote:
> >> On 02.02.23 10:51, J. Roeleveld wrote:
> >>> On Thursday, February 2, 2023 10:42:40 AM CET Klaus Dittrich wrote:
> >>>> Is there andbody using refind? Especially in Germany?
> >>>> I have some questions about.
> >>>
> >>> If you have questions, feel free to ask on this list.
> >>> I am sure I am not the only one using it.
> >>>
> >>> --
> >>> Joost
> >>
> >> Joost,
> >>
> >> my current system boots from bios(mbr) not uefi.
> >>
> >> My knowlege of uefi is poor and uefi is still confusing me.
> >> So it may be some of my questions will looking silly for you.
> >
> > Did you read the well-written howto on the Gentoo website?
> >
> > https://wiki.gentoo.org/wiki/Refind[1]
> >
> >
> >
> > --------
> > [1] https://wiki.gentoo.org/wiki/Refind
>
> Joost,
>
> no. Thanks for the hint, I had just a short look into at it.
>
> There is presupposed that one is at a uefi system already.
>
> I have to install refind to a disk mounted to my mbr-booted-system,
> make all necessary adjustments there and then put it to the uefi-only
> machine and boot it there.
>
> So I cannot call efibootmanger to pin refind to nvram of the uefi-system.

Use a USB boot-stick with EFI image, like the gentoo one. See the relevant section in the
Gentoo installguide:

https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Media[1]


--------
[1] https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Media
Re: Anybody using refind? [ In reply to ]
On 02.02.23 13:31, J. Roeleveld wrote:
> On Thursday, February 2, 2023 1:15:51 PM CET Klaus Dittrich wrote:
>> On 02.02.23 12:33, J. Roeleveld wrote:
>>> Please only send mails to the list.
>>> There is no need to add me to the TO or CC lists.
>>>
>>> On Thursday, February 2, 2023 12:22:49 PM CET Klaus Dittrich wrote:
>>>> On 02.02.23 10:51, J. Roeleveld wrote:
>>>>> On Thursday, February 2, 2023 10:42:40 AM CET Klaus Dittrich wrote:
>>>>>> Is there andbody using refind? Especially in Germany?
>>>>>> I have some questions about.
>>>>>
>>>>> If you have questions, feel free to ask on this list.
>>>>> I am sure I am not the only one using it.
>>>>>
>>>>> --
>>>>> Joost
>>>>
>>>> Joost,
>>>>
>>>> my current system boots from bios(mbr) not uefi.
>>>>
>>>> My knowlege of uefi is poor and uefi is still confusing me.
>>>> So it may be some of my questions will looking silly for you.
>>>
>>> Did you read the well-written howto on the Gentoo website?
>>>
>>> https://wiki.gentoo.org/wiki/Refind[1]
>>>
>>>
>>>
>>> --------
>>> [1] https://wiki.gentoo.org/wiki/Refind
>>
>> Joost,
>>
>> no. Thanks for the hint, I had just a short look into at it.
>>
>> There is presupposed that one is at a uefi system already.
>>
>> I have to install refind to a disk mounted to my mbr-booted-system,
>> make all necessary adjustments there and then put it to the uefi-only
>> machine and boot it there.
>>
>> So I cannot call efibootmanger to pin refind to nvram of the uefi-system.
>
> Use a USB boot-stick with EFI image, like the gentoo one. See the relevant section in the
> Gentoo installguide:
>
> https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Media[1]
>
>
> --------
> [1] https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Media
>
Joost,

I installed refind to the esp partition of my disk according to what I
have understood so far from https://wiki.gentoo.org/wiki/Refind and the
meanwhile up again site https://www.rodsbooks.com/refind/installing.html

The disk is a nvme disk put into an nvme-to-usb adapter, so I can easily
move it between my existing (mbr) machine and the new uefi-machine.

The efi partition looks like this now:

.
??? EFI
??? BOOT
?   ??? BOOT.CSV
?   ??? bootx64.efi
?   ??? icons
?   ?
?   ??? refind.conf
?   ??? refind.conf-sample
?   ??? refind.log
?   ??? refind.log-old
?   ??? vars
?   ??? PreviousBoot
??? myBackup
?   ??? System.map-6.1.9
?   ??? vmlinuz-6.1.9
??? mySystem
?   ??? System.map-6.1.9
?   ??? vmlinuz-6.1.9
??? refind
??? tools

I left out the numerous contents of icons.
refind is installed to teh default BOOT/bootx64.efi as I have no access
to nvram up to now.

The disk looks like this:( gdisk /dev/sda)
Number Start (sector) End (sector) Size Code Name
1 2048 452607 220.0 MiB EF00 PEFI
2 452608 461826047 220.0 GiB 8300 PSYS



My EFI/BOOT/refind.conf has this entry:

menuentry Linux {
icon EFI/refind/icons/os_linux.png
volume PSYS
loader vmlinuz-6.1.9
options "root=LABEL=PSYS ro rootfstype=ext4 mds=full"
}

And /etc/fstab :(the essential parts only)

LABEL=PSYS / ext4 defaults,noatime,nodiscard 1 1
LABEL=PEFI /boot/efi vfat umask=00755 0 0
efivarfs /sys/firmware/efi/efivars efivarfs nosuid,nodev,noexec,noatime
0 0

When I am trying to boot this (uefi-machine) I get

/dev/root can't open block device

or

please append correct root=boot option.


The kernel is compiled with all necessary drivers built in not using
modules. I don't like initrd or intramfs.

I decided to use the partition label PSYS because I cannot see
(like in legacy bios) to which device my disk got connected.
So I relay on refind which can pass partition labels to the "root="
option of the kernel as I have read.

Do you or anyone reading this thread know what mistake I have made
in this configuration of refind.

--
Regards Klaus
Re: Anybody using refind? [ In reply to ]
It is not possible to mount with LABEL only with kernel only. See https://superuser.com/a/1625723. I would create a small initramfs using https://wiki.gentoo.org/wiki/Custom_Initramfs#Mount_by_UUID_or_label and build it into the kernel with CONFIG_INITRAMFS_SOURCE

Abhinav Praveen
________________________________
From: Klaus Dittrich <kladit@t-online.de>
Sent: 02 February 2023 15:10
To: gentoo-user@lists.gentoo.org <gentoo-user@lists.gentoo.org>; J. Roeleveld <joost@antarean.org>
Subject: Re: [gentoo-user] Anybody using refind?

On 02.02.23 13:31, J. Roeleveld wrote:
> On Thursday, February 2, 2023 1:15:51 PM CET Klaus Dittrich wrote:
>> On 02.02.23 12:33, J. Roeleveld wrote:
>>> Please only send mails to the list.
>>> There is no need to add me to the TO or CC lists.
>>>
>>> On Thursday, February 2, 2023 12:22:49 PM CET Klaus Dittrich wrote:
>>>> On 02.02.23 10:51, J. Roeleveld wrote:
>>>>> On Thursday, February 2, 2023 10:42:40 AM CET Klaus Dittrich wrote:
>>>>>> Is there andbody using refind? Especially in Germany?
>>>>>> I have some questions about.
>>>>>
>>>>> If you have questions, feel free to ask on this list.
>>>>> I am sure I am not the only one using it.
>>>>>
>>>>> --
>>>>> Joost
>>>>
>>>> Joost,
>>>>
>>>> my current system boots from bios(mbr) not uefi.
>>>>
>>>> My knowlege of uefi is poor and uefi is still confusing me.
>>>> So it may be some of my questions will looking silly for you.
>>>
>>> Did you read the well-written howto on the Gentoo website?
>>>
>>> https://wiki.gentoo.org/wiki/Refind[1]
>>>
>>>
>>>
>>> --------
>>> [1] https://wiki.gentoo.org/wiki/Refind
>>
>> Joost,
>>
>> no. Thanks for the hint, I had just a short look into at it.
>>
>> There is presupposed that one is at a uefi system already.
>>
>> I have to install refind to a disk mounted to my mbr-booted-system,
>> make all necessary adjustments there and then put it to the uefi-only
>> machine and boot it there.
>>
>> So I cannot call efibootmanger to pin refind to nvram of the uefi-system.
>
> Use a USB boot-stick with EFI image, like the gentoo one. See the relevant section in the
> Gentoo installguide:
>
> https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Media[1]
>
>
> --------
> [1] https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Media
>
Joost,

I installed refind to the esp partition of my disk according to what I
have understood so far from https://wiki.gentoo.org/wiki/Refind and the
meanwhile up again site https://www.rodsbooks.com/refind/installing.html

The disk is a nvme disk put into an nvme-to-usb adapter, so I can easily
move it between my existing (mbr) machine and the new uefi-machine.

The efi partition looks like this now:

.
??? EFI
??? BOOT
? ??? BOOT.CSV
? ??? bootx64.efi
? ??? icons
? ?
? ??? refind.conf
? ??? refind.conf-sample
? ??? refind.log
? ??? refind.log-old
? ??? vars
? ??? PreviousBoot
??? myBackup
? ??? System.map-6.1.9
? ??? vmlinuz-6.1.9
??? mySystem
? ??? System.map-6.1.9
? ??? vmlinuz-6.1.9
??? refind
??? tools

I left out the numerous contents of icons.
refind is installed to teh default BOOT/bootx64.efi as I have no access
to nvram up to now.

The disk looks like this:( gdisk /dev/sda)
Number Start (sector) End (sector) Size Code Name
1 2048 452607 220.0 MiB EF00 PEFI
2 452608 461826047 220.0 GiB 8300 PSYS



My EFI/BOOT/refind.conf has this entry:

menuentry Linux {
icon EFI/refind/icons/os_linux.png
volume PSYS
loader vmlinuz-6.1.9
options "root=LABEL=PSYS ro rootfstype=ext4 mds=full"
}

And /etc/fstab :(the essential parts only)

LABEL=PSYS / ext4 defaults,noatime,nodiscard 1 1
LABEL=PEFI /boot/efi vfat umask=00755 0 0
efivarfs /sys/firmware/efi/efivars efivarfs nosuid,nodev,noexec,noatime
0 0

When I am trying to boot this (uefi-machine) I get

/dev/root can't open block device

or

please append correct root=boot option.


The kernel is compiled with all necessary drivers built in not using
modules. I don't like initrd or intramfs.

I decided to use the partition label PSYS because I cannot see
(like in legacy bios) to which device my disk got connected.
So I relay on refind which can pass partition labels to the "root="
option of the kernel as I have read.

Do you or anyone reading this thread know what mistake I have made
in this configuration of refind.

--
Regards Klaus