Skip to content

A way to label the filesystems created in the image? #3

@Chad-ll

Description

@Chad-ll

Hi --

I found your boot file generator script and am absolutely floored! Thank you for creating it! It has already saved me so many headaches in a project that I have been working on for a while.

That being said, is there a way to pass in labels for the filesystems that are created within the image? (mkfs.xfs -L "FOO")

I think this is the code where something like that would be present/added as an option to type_mkfs(?), but Python is not my first language:

        # For RAW partitions a filesystem is not needed
        if(type_mkfs == None):
            return

        cmd =""
        if(type_mkfs in "mkfs.vfat"):
            os.system('sudo mkfs.vfat -M 0xF8 -F 32 '+loopdevice)
        else:
            process = subprocess.Popen(["sudo", type_mkfs, loopdevice],
                            stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

            process.wait()
            out, err = process.communicate()
            output_str = out.decode('utf-8')
            #print(output_str)

        self.__print(diagnosticOutput,'   Execution is done')

My use-case is I am building a RHEL Kickstart. Given the large number of types of systems I have to support, I have no way of knowing what the device tree is going to look like, so I am attempting to have Anaconda search for the media and KS files in filesystems known labels.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions