Skip to content

Commit a160a7c

Browse files
authored
Fix (#4)
* Modify xfs_growfs <path> * Change the partition of raw img * Change fdisk to parted * change parted unInteractive model * Modify the way to get partation number * Modify % to %%
1 parent 1d20255 commit a160a7c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

builder/qemu/chroot/step_prepare_source_image.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ func (s *StepPrepareSourceImage) prepareSourceImage(state multistep.StateBag) er
8383
arr := strings.Split(content, "\n")
8484
lastPartNumber := strings.Split(arr[len(arr)-1], ":")[0]
8585

86-
if _, err := RunCommand(state, fmt.Sprintf("parted -m %s resizepart %s 100%", device, lastPartNumber)); err != nil {
86+
87+
if _, err := RunCommand(state, fmt.Sprintf("parted -m %s resizepart %s 100%%", device, lastPartNumber)); err != nil {
8788
return fmt.Errorf("resizepart error : %s", err)
8889
}
8990
if _, err := RunCommand(state, fmt.Sprintf("losetup -d %s", device)); err != nil {

0 commit comments

Comments
 (0)