You leave the custom configuration at that point since you are only looking for some other tests for automating selection and enforcing it with tests and the error keyword. Instead of using error, using warning might alert the user to choose the selection when the tests fail (for example, to use it on an rp7410 instead.)

Example Three (be careful what you ask for, you just might get it)

This example disk layout asks for something that just can’t be done. It’s a cautionary example to show the errors displayed if you attempt to implement an impossible configuration. This is not a complete configuration, just part of one.

#

#Test configuration

release="B.11.23"

...

init _hp_pri_swap = disk[_hp_root_disk].size

...

_hp_disk_layout = { "My Customised LVM" }

init _hp_disk_layout = disk[_my_second_disk_path].model init _hp_disk_layout = "My Customised LVM" _hp_group_name visible_if FALSE

...

(_hp_disk_layout == "My Customised LVM") {

volume_group "vg00" { physical_volume disk[_hp_root_disk]

physical_volume disk[_my_second_disk_path] usage = LVM

...

logical_volume { usage = SWAP_DUMP mount_point = "primary"

#Map it to the root disk to ensure it is considered primary

#without this the secondary swap gets sorted first and considered

#primary.

vgdisk[0]

contiguous_allocation = true

bad_block_relocate = false size = _hp_pri_swap

}

...

In the definition above, the primary swap size is set to _hp_pri_swap, which was initialized to the size of the disk with “init _hp_pri_swap = disk[_hp_root_disk].size

Because we’ve explicitly set the size of primary swap, it cannot be changed. This causes a problem given the small amount of overhead for LVM disk structures, and because the root and boot file systems must be on the disk _hp_root_disk as well as primary swap. They simply cannot fit, and this will give errors.

During installation those errors would look like:

ERROR: There is not enough disk space to allocate for volume: "primary" (short by 28Mb). For more information run "instl_dbg –D <clientdir> -d".

ERROR: There is not enough disk space to allocate for volume: "/" (short by

138