1 |
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 |
2 |
|
3 |
Abhinav Praveen |
4 |
________________________________ |
5 |
From: Klaus Dittrich <kladit@××××××××.de> |
6 |
Sent: 02 February 2023 15:10 |
7 |
To: gentoo-user@l.g.o <gentoo-user@l.g.o>; J. Roeleveld <joost@××××××××.org> |
8 |
Subject: Re: [gentoo-user] Anybody using refind? |
9 |
|
10 |
On 02.02.23 13:31, J. Roeleveld wrote: |
11 |
> On Thursday, February 2, 2023 1:15:51 PM CET Klaus Dittrich wrote: |
12 |
>> On 02.02.23 12:33, J. Roeleveld wrote: |
13 |
>>> Please only send mails to the list. |
14 |
>>> There is no need to add me to the TO or CC lists. |
15 |
>>> |
16 |
>>> On Thursday, February 2, 2023 12:22:49 PM CET Klaus Dittrich wrote: |
17 |
>>>> On 02.02.23 10:51, J. Roeleveld wrote: |
18 |
>>>>> On Thursday, February 2, 2023 10:42:40 AM CET Klaus Dittrich wrote: |
19 |
>>>>>> Is there andbody using refind? Especially in Germany? |
20 |
>>>>>> I have some questions about. |
21 |
>>>>> |
22 |
>>>>> If you have questions, feel free to ask on this list. |
23 |
>>>>> I am sure I am not the only one using it. |
24 |
>>>>> |
25 |
>>>>> -- |
26 |
>>>>> Joost |
27 |
>>>> |
28 |
>>>> Joost, |
29 |
>>>> |
30 |
>>>> my current system boots from bios(mbr) not uefi. |
31 |
>>>> |
32 |
>>>> My knowlege of uefi is poor and uefi is still confusing me. |
33 |
>>>> So it may be some of my questions will looking silly for you. |
34 |
>>> |
35 |
>>> Did you read the well-written howto on the Gentoo website? |
36 |
>>> |
37 |
>>> https://wiki.gentoo.org/wiki/Refind[1] |
38 |
>>> |
39 |
>>> |
40 |
>>> |
41 |
>>> -------- |
42 |
>>> [1] https://wiki.gentoo.org/wiki/Refind |
43 |
>> |
44 |
>> Joost, |
45 |
>> |
46 |
>> no. Thanks for the hint, I had just a short look into at it. |
47 |
>> |
48 |
>> There is presupposed that one is at a uefi system already. |
49 |
>> |
50 |
>> I have to install refind to a disk mounted to my mbr-booted-system, |
51 |
>> make all necessary adjustments there and then put it to the uefi-only |
52 |
>> machine and boot it there. |
53 |
>> |
54 |
>> So I cannot call efibootmanger to pin refind to nvram of the uefi-system. |
55 |
> |
56 |
> Use a USB boot-stick with EFI image, like the gentoo one. See the relevant section in the |
57 |
> Gentoo installguide: |
58 |
> |
59 |
> https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Media[1] |
60 |
> |
61 |
> |
62 |
> -------- |
63 |
> [1] https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Media |
64 |
> |
65 |
Joost, |
66 |
|
67 |
I installed refind to the esp partition of my disk according to what I |
68 |
have understood so far from https://wiki.gentoo.org/wiki/Refind and the |
69 |
meanwhile up again site https://www.rodsbooks.com/refind/installing.html |
70 |
|
71 |
The disk is a nvme disk put into an nvme-to-usb adapter, so I can easily |
72 |
move it between my existing (mbr) machine and the new uefi-machine. |
73 |
|
74 |
The efi partition looks like this now: |
75 |
|
76 |
. |
77 |
└── EFI |
78 |
├── BOOT |
79 |
│ ├── BOOT.CSV |
80 |
│ ├── bootx64.efi |
81 |
│ ├── icons |
82 |
│ │ |
83 |
│ ├── refind.conf |
84 |
│ ├── refind.conf-sample |
85 |
│ ├── refind.log |
86 |
│ ├── refind.log-old |
87 |
│ └── vars |
88 |
│ └── PreviousBoot |
89 |
├── myBackup |
90 |
│ ├── System.map-6.1.9 |
91 |
│ └── vmlinuz-6.1.9 |
92 |
├── mySystem |
93 |
│ ├── System.map-6.1.9 |
94 |
│ └── vmlinuz-6.1.9 |
95 |
├── refind |
96 |
└── tools |
97 |
|
98 |
I left out the numerous contents of icons. |
99 |
refind is installed to teh default BOOT/bootx64.efi as I have no access |
100 |
to nvram up to now. |
101 |
|
102 |
The disk looks like this:( gdisk /dev/sda) |
103 |
Number Start (sector) End (sector) Size Code Name |
104 |
1 2048 452607 220.0 MiB EF00 PEFI |
105 |
2 452608 461826047 220.0 GiB 8300 PSYS |
106 |
|
107 |
|
108 |
|
109 |
My EFI/BOOT/refind.conf has this entry: |
110 |
|
111 |
menuentry Linux { |
112 |
icon EFI/refind/icons/os_linux.png |
113 |
volume PSYS |
114 |
loader vmlinuz-6.1.9 |
115 |
options "root=LABEL=PSYS ro rootfstype=ext4 mds=full" |
116 |
} |
117 |
|
118 |
And /etc/fstab :(the essential parts only) |
119 |
|
120 |
LABEL=PSYS / ext4 defaults,noatime,nodiscard 1 1 |
121 |
LABEL=PEFI /boot/efi vfat umask=00755 0 0 |
122 |
efivarfs /sys/firmware/efi/efivars efivarfs nosuid,nodev,noexec,noatime |
123 |
0 0 |
124 |
|
125 |
When I am trying to boot this (uefi-machine) I get |
126 |
|
127 |
/dev/root can't open block device |
128 |
|
129 |
or |
130 |
|
131 |
please append correct root=boot option. |
132 |
|
133 |
|
134 |
The kernel is compiled with all necessary drivers built in not using |
135 |
modules. I don't like initrd or intramfs. |
136 |
|
137 |
I decided to use the partition label PSYS because I cannot see |
138 |
(like in legacy bios) to which device my disk got connected. |
139 |
So I relay on refind which can pass partition labels to the "root=" |
140 |
option of the kernel as I have read. |
141 |
|
142 |
Do you or anyone reading this thread know what mistake I have made |
143 |
in this configuration of refind. |
144 |
|
145 |
-- |
146 |
Regards Klaus |