The sda vs sde can and will happen; it's likely that /dev/disk/by-id/<serial of "sda"> is symlinked to sde; What matters it the 'serial' or 'path' key in the structure.
I don;t think that's the issue here.
Adding the first partition (prep) is successful. Then when adding the second partition we fail, sgdisk says:
Could not create partition 2 from 18432 to 69300223
That's *usually* a miscalculation on sizes and offsets and total disk size.
Given that this is prep partitions, maybe we can recheck the values.
Total disk size:
283794997248B
The ending sector of the second partition, 69300223 * 4k is > than the total disk size.
This is what failed.
The offset 18432 looks odd; prep partition is 8MiB, the offset sent is 4MiB, though curtin only applied 1M offset (256.0). None-the less, the next start point should be
1M + 8M, or at most 4M + 8M , we can see the end sector of the prep partition is 2303 from the sgdisk command, so we should see:
2:2304.0:69284096.0
69284096.0 * 4096 = 283787657216.0
283787657216.0 > 283794997248
False
so, it fits.
Now, how did the second partition offset get so far off. curtin reads size and offset from /sys/class/block/<disk>/partition/{start, size}.
So, the questions now are:
1. did we read the correct path?
Yes, we've wiped all drives prior to creating new partitions, so no other disk will have partitions.
Then we see the message: previous partition number for 'sda-part2' found to be '1';
curtin has found /sys/class/block/sde/sde1, and will now read
/sys/class/block/sde/sde1/{size, start}
2. What values were in those fields.
curtin calculates the start of the new partition with:
offset_sectors = previous_start + previous_size
where previous_start is the value in /sys/class/block/sde/sde1/start and
previous_size is the value in /sys/class/block/sde/sde1/size
The sda vs sde can and will happen; it's likely that /dev/disk/ by-id/< serial of "sda"> is symlinked to sde; What matters it the 'serial' or 'path' key in the structure.
I don;t think that's the issue here.
Adding the first partition (prep) is successful. Then when adding the second partition we fail, sgdisk says:
Could not create partition 2 from 18432 to 69300223
That's *usually* a miscalculation on sizes and offsets and total disk size.
Given that this is prep partitions, maybe we can recheck the values.
Total disk size:
283794997248B
The ending sector of the second partition, 69300223 * 4k is > than the total disk size.
This is what failed.
The offset 18432 looks odd; prep partition is 8MiB, the offset sent is 4MiB, though curtin only applied 1M offset (256.0). None-the less, the next start point should be
1M + 8M, or at most 4M + 8M , we can see the end sector of the prep partition is 2303 from the sgdisk command, so we should see:
2:2304.0:69284096.0
69284096.0 * 4096 = 283787657216.0
283787657216.0 > 283794997248
False
so, it fits.
Now, how did the second partition offset get so far off. curtin reads size and offset from /sys/class/ block/< disk>/partition /{start, size}.
So, the questions now are:
1. did we read the correct path?
Yes, we've wiped all drives prior to creating new partitions, so no other disk will have partitions. block/sde/ sde1, and will now read block/sde/ sde1/{size, start}
Then we see the message: previous partition number for 'sda-part2' found to be '1';
curtin has found /sys/class/
/sys/class/
2. What values were in those fields.
curtin calculates the start of the new partition with:
offset_sectors = previous_start + previous_size
where previous_start is the value in /sys/class/ block/sde/ sde1/start and block/sde/ sde1/size
previous_size is the value in /sys/class/