Skip to content

rh-ecosystem-edge/preinstall-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

preinstall-utils

A common Go library with some helper functions used before installing OCP operating systems to disk. At the moment it's used to share similar disk cleanup code between the Assisted Installer and the Lifecycle Agent projects.

Disk Cleanup

The preinstall-utils library provides a function to clean up the disk before installing an operating system. This function is used to remove any existing partitions and file systems from the disk, ensuring that the disk is in a clean state before installing the operating system.

Disk Cleanup Usage

    
    import preinstallUtils "github.com/rh-ecosystem-edge/preinstall-utils/pkg"
    ...

    device := "/dev/sda"
    logger := logrus.New()
    cleanupDevice := preinstallUtils.NewCleanupDevice(logger, preinstallUtils.NewDiskOps(logger, executor))
    err := cleanupDevice.CleanupDevice(device)
    if err != nil {
        return err
    }

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published