Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-21503

Anaconda write boggus option in fstab when specifying /dev/shm in kickstart file

    • Icon: Story Story
    • Resolution: Duplicate
    • Icon: Undefined Undefined
    • None
    • rhel-9.3.0
    • anaconda
    • None
    • sst_installer
    • ssg_front_door
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • x86_64
    • None

      What were you trying to do that didn't work?

      I'm currently experimenting with a RHEL9 derivative (Alamalinux) and kickstart with the CIS server workstation level 2 set.

      This requires some mount-points (including /dev/shm) to be on a different partition.

      /dev/shm is by default on a tmpfs (and should stay like that I guess) and is automounted by default during boot (even if not defined in the fstab)

      The CIS profiles REQUIRES that /dev/shm is defined in the fstab. So here is the 1st question, as it's automounted, should that really be the case?

      I've added `part /dev/shm --fstype="tmpfs" --size=1024` to the kickstart file and the CIS profile is happy, but

      1. the `--size` option is mandatory, otherwise anaconda fails with a python trace
      2. `tmpfs`is not documented in RH documentation as being a supported fstype
      3. The fstab entry on the installed machine seems boggus:

      `tmpfs                   /dev/shm                tmpfs   defaults,size=1024m,size=1024m,nodev,noexec,nosuid,size=1024m,size=1024m,size=1024m,size=1024m,size=1024m 0 0`

      Please provide the package NVR for which bug is seen:

      How reproducible:

      Always

      Steps to reproduce

      1. Create a kickstart file that enable CIS server L2 hardening
      2. Add `part /dev/shm --fstype="tmpfs" --size=1024` so anaconda is happy to install
      3. look at the /etc/fstab on the resulting machine

      Expected results

      `tmpfs                   /dev/shm                tmpfs   defaults,size=1024m,nodev,noexec,nosuid 0 0`

      Actual results

      `tmpfs                   /dev/shm                tmpfs   defaults,size=1024m,size=1024m,nodev,noexec,nosuid,size=1024m,size=1024m,size=1024m,size=1024m,size=1024m 0 0`

       

      I can open other bugs for the other problem if you want

        1. fstab.txt
          1 kB
        2. ks.cfg
          2 kB

            anaconda-maint-list anaconda-maint-list
            bigon-1 Laurent Bigonville (Inactive)
            anaconda-maint-list anaconda-maint-list
            Release Test Team Release Test Team
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: