NAME
Tapper::Installer::Precondition::Image
SYNOPSIS
use Tapper::Installer::Precondition::Image;
NAME
Tapper::Installer::Precondition::Package - Install a package to a given location
FUNCTIONS
get_partition_number
Get the partition part of grub notation of a given device file eg. /dev/hda1.
@param string - partition number
@return int - grub device notation
get_grub_device
Get the disc part of grub notation of a given device file eg. /dev/hda1.
@param string - device file name
@return success - (0, grub device notation) @return eror - (1, error string)
configure_fstab
Write fstab on installed system based upon the installed images and partitions.
@return success - 0 @return error - error string
generate_user_grub_conf
Generate grub config file menu.lst based upon user provided precondition.
@param string - name of the root partition
@return success - 0 @return error - error string
generate_grub_menu_lst
Create a grub config file (menu.lst) based on the options in the configuration hash.
@return success - 0 @return error - error string
prepare_boot
Make installed system ready for boot from hard disk.
@return success - 0 @return error - error string
get_device
Return device name (i.e. /dev/$device) for a given device-id, partition label or $device name (with or without preceding /dev/). Doesn't work with dev-mapper.
@param string - device or reference to array with device ids @param string - base dir prepended to all paths (testing purpose)
@returnlist success - ( 0, device name string) @returnlist error - ( 1, error string)
get_partition_label
Get the label of a partition to be able to set it again at mkfs.
@param string - device file
@returnlist success - ( 0, partition label string) @returnlist error - ( != 0, error string)
generate_pxe_grub
Generate a simple PXE grub config that forwards to local grub.
@return success - 0 @return error - error string
copy_menu_lst
Copy menu.lst to NFS. We need the grub config file menu.lst on NFS because thats where PXE grub expects it. Still we create the file on the local hard drive because it's faster and allows users to boot with this config without using PXE grub.
@return success - 0 @return error - error string
write_menu_lst
Write content to grub file. This encapsulates writing to improve readability and testability.
@param string - what to write @param bool - true = truncate ('>'), false = append ('>>') (append is default)
@return success - 0 @return error - error string
install
Install a given image. This function is a wrapper for image installer functions so the caller doesn't need to care for preparations.
@param hash reference - containing image name (image), mount point (mount) and partition name (partition)
@return success - 0 @return error - error string
install_image
Install an image on a given device and mount it to a given mount point. Make sure to set partition label reasonably.
@param string - image file name @param string - device file name @param string - mount point relative to future test system
@return success - 0 @return error - error string
install_image_iso
Install an image of type iso.
@param string - image file name @param int - size of the target partition @param string - device name of the target partition @param string - directory to mount the installed image to
@return success - 0 @return error - error string
install_image_tar
Install an image of type tar.
@param string - image file name @param int - size of the target partition @param string - device name of the target partition @param string - directory to mount the installed image to @param string - partition label
@return success - 0 @return error - error string
install_image_gz
Install an image of type tar.gz.
@param string - image file name @param int - size of the target partition @param string - device name of the target partition @param string - directory to mount the installed image to @param string - partition label
@return success - 0 @return error - error string
install_image_bz2
Install an image of type tar.bz2.
@param string - image file name @param int - size of the target partition @param string - device name of the target partition @param string - directory to mount the installed image to @param string - partition label
@return success - 0 @return error - error string
copy_image
Install an image to a given partition and mount it to a given mount point.
@param string - device name @param string - image file @param string - mount point
@return success - 0 @return error - error string
unmount
Umounts all images that were mounted during installation in reverse order.
@return success - 0 @return error - error string
AUTHORS
AMD OSRC Tapper Team <tapper@amd64.org>
Tapper Team <tapper-ops@amazon.com>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2024 by Advanced Micro Devices, Inc.
This is free software, licensed under:
The (two-clause) FreeBSD License