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

blkid detects LUKS on swap partition

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Minor Minor
    • rhel-9.5
    • rhel-9.4
    • util-linux
    • None
    • util-linux-2.37.4-19.el9
    • None
    • None
    • rhel-sst-cs-plumbers
    • ssg_core_services
    • 26
    • 2
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None

      It looks like `blkid` gives a higher priority to LUKS header than to swap header (even if the swap header is at the start of the partition, the detected LUKS header is the secondary one on offset 0x8000) – we have a system for storage testing where a LUKS image saved in memory was swapped out resulting in blkid detecting LUKS header on the swap partition instead. The result is the system isn't booting because the swap partition (referred by UUID in /etc/fstab) now doesn't exist.

      # blkid /dev/vda2
      
      /dev/vda2: UUID="0768e313-748c-46bf-9721-5a126d1cf444" TYPE="crypto_LUKS" PARTUUID="71396e3d-02" 
      # wipefs /dev/vda2
      DEVICE OFFSET TYPE        UUID                                 LABEL
      vda2   0x8000 crypto_LUKS 0768e313-748c-46bf-9721-5a126d1cf444 
      vda2   0xff6  swap        05ef84fa-9140-483f-97a2-20c179f409c2
      

              rhn-engineering-kzak Karel Zak
              vtrefny@redhat.com Vojtěch Trefný
              Karel Zak Karel Zak
              Radka Brychtova Radka Brychtova
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: