[PATCH 1/1] UBUNTU: SAUCE: autotest: sfdisk: let sfdisk decide the first available sector
Paolo Pisati
paolo.pisati at canonical.com
Wed Mar 4 12:15:23 UTC 2020
Using 0 as a fixed starting sector causes an error:
>>> Created a new DOS disklabel with disk identifier 0x9b4a9cf7.
/dev/loop1p1: Start sector 0 out of range.
Failed to add #1 partition: Numerical result out of range
Leaving.
Fix it by letting sfdisk pick the first available sector instead of
using a fixed value.
Signed-off-by: Paolo Pisati <paolo.pisati at canonical.com>
---
client/partition.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/client/partition.py b/client/partition.py
index bec7a37f..727cf806 100644
--- a/client/partition.py
+++ b/client/partition.py
@@ -909,7 +909,7 @@ class virtual_partition:
"""
logging.debug('Creating single partition on %s', loop_path)
try:
- single_part_cmd = '0,,c\n'
+ single_part_cmd = ',,c\n'
sfdisk_file_path = '/tmp/create_partition.sfdisk'
sfdisk_cmd_file = open(sfdisk_file_path, 'w')
sfdisk_cmd_file.write(single_part_cmd)
--
2.25.1
More information about the kernel-team
mailing list