distro/*: allow /boot to be customized
Since the LVM support was added to all distros, our disk related code is adaptive, i.e. we will set the correct BLS and grub2 prefix if there a `boot` partiton is present in the layout after all customizations happen, which includes LVMification. One thing that was not yet fully working was layouts that do not yet have a `/boot` partition but allow LVMification. In that case `NewPartitionTable` and if `/boot` was the first (or only) customization, would LVMify the partition which in turn would create the `/boot` partition; but after `newPT.ensureLVM()` the call to `newPT.createFilesystem` with `/boot` would try to create another `/boot` mountpoint. In order to deal with this situation correctly we are now using a two phase approach: 1) enlarge existing mountpoints and collect new ones. 2) if there are new ones and LMVify was allowed, switch to LVM layout. Do a second pass and now create or enlarge existing partitions, handling `/boot` in the process.
This commit is contained in:
parent
3c3f1b4969
commit
b562d144ca
9 changed files with 70 additions and 17 deletions
|
|
@ -553,7 +553,7 @@ func TestComposeUnsupportedMountPointV0(t *testing.T) {
|
|||
description="TestComposeUnsupportedMountPointV0"
|
||||
version="0.0.1"
|
||||
[[customizations.filesystem]]
|
||||
mountpoint = "/boot"
|
||||
mountpoint = "/etc"
|
||||
size = 4294967296
|
||||
`
|
||||
resp, err := PostTOMLBlueprintV0(testState.socket, bp)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue