<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>49491</bug_id>
          
          <creation_ts>2024-02-22 19:24:17 +0300</creation_ts>
          <short_desc>Не монтируется efivars, из-за этого невозможно загрузиться с IMSM (RAID)</short_desc>
          <delta_ts>2024-02-26 16:28:08 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>make-initrd</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Антон Мидюков">antohami</reporter>
          <assigned_to name="Alexey Gladkov">legion</assigned_to>
          <cc>antohami</cc>
    
    <cc>glebfm</cc>
    
    <cc>klark</cc>
    
    <cc>ldv</cc>
    
    <cc>legion</cc>
    
    <cc>placeholder</cc>
    
    <cc>vt</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>241974</commentid>
    <comment_count>0</comment_count>
    <who name="Антон Мидюков">antohami</who>
    <bug_when>2024-02-22 19:24:17 +0300</bug_when>
    <thetext>Проблема вызвана изменением:
https://github.com/osboot/make-initrd/commit/fc92d96ba563a25111180aa7ee1fccde557d6d7c#diff-1ce701d6fb9ecb3360f2ac05f53d30b626c33c12d0e8bc0017f22d6a40a0d8c7L114

-	modprobe -n efivarfs &amp;&amp;
+	if grep -qsw efivarfs /proc/filesystems; then
		fstab+=(&quot;efivarfs /sys/firmware/efi/efivars efivarfs rw,nosuid,nodev,noexec,relatime 0 0&quot;)
+	fi

efivarfs будет в /proc/filesystems после того, как модуль efivarfs загрузится.
Видимо, нужно, чтобы в features/mdadm/guess/device efivarfs не просто добавлялся, но добавлялся как модуль, который должен быть загружен.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>241997</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Gladkov">legion</who>
    <bug_when>2024-02-23 16:29:47 +0300</bug_when>
    <thetext>Сервис fstab загружается до udev и modules. Поэтому на момент выподнения этого кода модуль efivarfs не кому загрузить. Именно поэтому тут этот modprobe.

Если у вас efivarfs вкомпилирован и поэтому текущий код не работает, то я бы переписал код вот таким образом:

-	modprobe -n efivarfs &amp;&amp;
+	modprobe -q fs-efivarfs 2&gt;/dev/null ||:
+
+	if grep -qsw efivarfs /proc/filesystems; then
		fstab+=(&quot;efivarfs /sys/firmware/efi/efivars efivarfs rw,nosuid,nodev,noexec,relatime 0 0&quot;)
+	fi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>242004</commentid>
    <comment_count>2</comment_count>
    <who name="Антон Мидюков">antohami</who>
    <bug_when>2024-02-23 16:57:57 +0300</bug_when>
    <thetext>(Ответ для Alexey Gladkov на комментарий #1)
&gt; Сервис fstab загружается до udev и modules. Поэтому на момент выподнения
&gt; этого кода модуль efivarfs не кому загрузить. Именно поэтому тут этот
&gt; modprobe.
&gt; 
&gt; Если у вас efivarfs вкомпилирован и поэтому текущий код не работает, то я бы
&gt; переписал код вот таким образом:

Нет, модуль не вкомпилирован. Проблема как раз в том, что modprobe убран. Верните его тогда.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>242007</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Gladkov">legion</who>
    <bug_when>2024-02-23 18:01:57 +0300</bug_when>
    <thetext>Да, это было ошибкой.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>242027</commentid>
    <comment_count>4</comment_count>
    <who name="Антон Мидюков">antohami</who>
    <bug_when>2024-02-24 10:28:31 +0300</bug_when>
    <thetext>(Ответ для Alexey Gladkov на комментарий #3)
&gt; Да, это было ошибкой.

Видимо, нужно так:
+	modprobe -q efivarfs 2&gt;/dev/null
 	if grep -qsw efivarfs /proc/filesystems; then
		fstab+=(&quot;efivarfs /sys/firmware/efi/efivars efivarfs rw,nosuid,nodev,noexec,relatime 0 0&quot;)
 	fi

То есть всегда пробуем грузить, ошибку не показываем. Если модуль загрузился, то  условие выполнится, и запись в fstab добавится.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>242030</commentid>
    <comment_count>5</comment_count>
    <who name="Leonid Krivoshein">klark</who>
    <bug_when>2024-02-24 10:40:15 +0300</bug_when>
    <thetext>(In reply to Антон Мидюков from comment #4)
&gt; Видимо, нужно так:
Без бояна нельзя, вообще уже же вот:
https://bugzilla.altlinux.org/show_bug.cgi?id=49491#c1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>242032</commentid>
    <comment_count>6</comment_count>
    <who name="Антон Мидюков">antohami</who>
    <bug_when>2024-02-24 11:12:32 +0300</bug_when>
    <thetext>(Ответ для Leonid Krivoshein на комментарий #5)
&gt; (In reply to Антон Мидюков from comment #4)
&gt; &gt; Видимо, нужно так:
&gt; Без бояна нельзя, вообще уже же вот:
&gt; https://bugzilla.altlinux.org/show_bug.cgi?id=49491#c1

Точно. Ждём тогда это изменение.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>242114</commentid>
    <comment_count>7</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2024-02-26 16:28:08 +0300</bug_when>
    <thetext>make-initrd-2.44.0-alt1 -&gt; sisyphus:

 Mon Feb 26 2024 Alexey Gladkov &lt;legion@altlinux.ru&gt; 2.44.0-alt1
 - New version (2.44.0).
 - Feature plymouth:
   + Stop plymouth before running rdshell (ALT#49492).
   + Do not start plymouth if using rdshell.
 - Runtime:
   + Try to load efivarfs before mount (ALT#49491).
 - Misc:
   + Improve bug-report generation.
   + Rewrite mi-bug-report.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>