Skip to content

image should not contain folders /run /sys /proc /dev #276

@adrelanos

Description

@adrelanos

Image should not contain folders /run /sys /proc /dev. These should be deleted at the end of the build process.

Rationale:

  • These don't belong there. Serve no purpose. Are instantiated during the boot process.
  • Are confusing dracut. Relevant code excerpt:

https://github.com/dracutdevs/dracut/blob/master/modules.d/90dmsquash-live/dmsquash-live-root.sh

    elif [ -d /run/initramfs/squashfs/proc ]; then
        FSIMG=$SQUASHED
        if [ -z "$overlayfs" ] && [ -n "$DRACUT_SYSTEMD" ]; then
            reloadsysrootmountunit=":>/xor_overlayfs;"
        fi
        overlayfs="required"

(Some dracut internals: Folder /run/initramfs/squashfs/proc is inside the LiveOS/squashfs.img, which can be based on grml-debootstrap (and created by mksquashfs). An image containing an already existing /proc folder can be useful for I don't know what. But either the /proc folder should be complete. This is probably for a complex use case we don't know about. Absent of this, best if the /proc folder doesn't exist. There should not be an empty folder /proc inside the image.)

Would a PR deleting these folders be welcome?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions