Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

action image-partition: Failed to create msdos extended partition table #480

Open
piotr-maker opened this issue Feb 8, 2024 · 0 comments

Comments

@piotr-maker
Copy link

If i try to create more than 4 partitions in msdos partition table i've got error:

2024/02/08 07:54:37 parted | Error: You requested a partition from 8912MB to 9226MB (sectors 17405952..18020351).
2024/02/08 07:54:37 parted | The closest location we can manage is 8912MB to 9226MB (sectors 17405953..18020351).

The error occures, because debos don't leave space for EBR (1 sector). In file: actions/image_partition_action.go in function Verify() the start of extended partition is assigned to same value as next partition:

if idx == 3 && len(i.Partitions) > 4 {
	var name string
	var part Partition

	name = "extended"
	part.number = idx + 1
	part.Name = name
	part.Start = p.Start
	tmp_n := len(i.Partitions) - 1
	tmp := &i.Partitions[tmp_n]
	part.End = tmp.End
	part.FS = "none"

	i.Partitions = append(i.Partitions[:idx+1], i.Partitions[idx:]...)
	i.Partitions[idx] = part

	num := 1
	for idx, _ := range i.Partitions {
		p := &i.Partitions[idx]
		p.number = num
		num++
	}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant