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

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

    <bug>
          <bug_id>53651</bug_id>
          
          <creation_ts>2025-03-28 14:29:48 +0300</creation_ts>
          <short_desc>Добавление некорректной записи для /boot в fstab при создании образа</short_desc>
          <delta_ts>2025-03-28 15:19:18 +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>alt-rootfs-installer</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="Andrew Gabbasov">agabbasov</reporter>
          <assigned_to name="Антон Мидюков">antohami</assigned_to>
          <cc>agabbasov</cc>
    
    <cc>antohami</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>262015</commentid>
    <comment_count>0</comment_count>
    <who name="Andrew Gabbasov">agabbasov</who>
    <bug_when>2025-03-28 14:29:48 +0300</bug_when>
    <thetext>При создании нового образа с использованием опции --rootfs=..., если не требуется создания отдельного раздела для /boot (отсутствует опция --bootpart), в файл /etc/fstab в созданном образе добавляется некорректная строка вида

UUID= /boot ext4 nodev,nosuid,noexec,relatime 1 2

(с пустым UUID).
При попытке загрузки получившегося образа возникает ошибка, и система входит в emergency режим.

По-видимому, причиной этого некорректного поведения является ошибка/опечатка в функции setup_fstab() в файле socs.d/socs_utils (пропущен $ в использовании значения переменной BOOTPART_UID) и исправление должно выглядеть примерно так:

--- socs-utils.orig     2025-03-24 16:49:04.000000000 +0300
+++ socs-utils  2025-03-28 14:21:47.450438128 +0300
@@ -292,7 +292,7 @@
                if [ -f &quot;$TMPROOT/boot/extlinux/extlinux.conf&quot; ]; then
                        sed -i &quot;s/LABEL=ROOT/UUID=$ROOTPART_UID/&quot; &quot;$TMPROOT/boot/extlinux/extlinux.conf&quot;
                fi
-               if [ -n &quot;BOOTPART_UID&quot; ]; then
+               if [ -n &quot;$BOOTPART_UID&quot; ]; then
                        mkdir -p &quot;$TMPROOT/boot&quot;
                        echo &quot;UUID=$BOOTPART_UID /boot ext4 nodev,nosuid,noexec,relatime 1 2&quot; &gt;&gt; &quot;$TMPROOT/etc/fstab&quot;
                fi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>262022</commentid>
    <comment_count>1</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2025-03-28 15:10:04 +0300</bug_when>
    <thetext>alt-rootfs-installer-0.6.3-alt2 -&gt; sisyphus:

 Fri Mar 28 2025 Anton Midyukov &lt;antohami@altlinux&gt; 0.6.3-alt2
 - socs-utils: fix conditions for add boot part (Closes: 53651)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>262025</commentid>
    <comment_count>2</comment_count>
    <who name="Антон Мидюков">antohami</who>
    <bug_when>2025-03-28 15:19:18 +0300</bug_when>
    <thetext>Спасибо большое! Исправление в Сизифе и p11 будет завтра.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>