Skip to content

Latest commit

 

History

History
45 lines (38 loc) · 2.36 KB

README_DiskSetup.md

File metadata and controls

45 lines (38 loc) · 2.36 KB

This script configures the chroot-dev target-disk

./DiskSetup.sh --help
Usage: ./DiskSetup.sh [GNU long option] [option] ...
  Options:
        -B  Boot-partition size (default: 500MiB)
        -d  Base dev-node used for build-device
        -f  Filesystem-type used for root filesystems (default: xfs)
        -p  Comma-delimited string of colon-delimited partition-specs
              Default layout:
                /:rootVol:4\n
                swap:swapVol:2
                /home:homeVol:1
                /var:varVol:2
                /var/tmp:varTmpVol:2
                /var/log:logVol:2
                /var/log/audit:auditVol:100%%FREE
        -r  Label to apply to root-partition if not using LVM (default: root_disk)
        -v  Name assigned to root volume-group (default: VolGroup00)
  GNU long options:
        --boot-size         See "-B" short-option
        --disk              See "-d" short-option
        --fstype            See "-f" short-option
        --partition-string  See "-p" short-option
        --rootlabel         See "-r" short-option
        --vgname            See "-v" short-option

Each of the functionality flag-options may also be specified by using environment variables:

  • BOOTDEVSZ: Stands in for the -B/--boot-size flag-option. Failure to specify a unit (e.g., m/MB - see manpage for parted command) will cause the number to be interpreted as a sector (512Byte).
  • CHROOTDEV: Stands in for the -d/--disk flag-option
  • FSTYPE: Stands in for the -f/--fstype flag-option
  • GEOMETRYSTRING: Stands in for the -p/--partition-string flag-option
  • ROOTLABEL: Stands in for the -r/--rootlabel flag-option (only used for "bare paritioning" operations)
  • VGNAME: Stands in for the -v/--vgname flag-option

Further, additional output/logging can be generated by setting the DEBUG environment variable to "true". Doing so causes information that is normally only directed to syslog to also be printed to STDOUT.

Notes:

1The -r/--rootlabel and -v/--vgname are mutually-exclusive. The former is used when requesting a simple/"bare" disk-formatting (single, primary partition disk-geometry). The latter is used when requesting the root filesystem(s) be placed under control of the LVM2 storage-management system.

2If invoking scripts interactively, the DEBUG value is automatically set to true.