From patchwork Wed Mar 4 12:15:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Pisati X-Patchwork-Id: 1248977 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48XXs34tL0z9sQt; Wed, 4 Mar 2020 23:15:33 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1j9Svv-0000fF-43; Wed, 04 Mar 2020 12:15:27 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1j9Svs-0000ew-O9 for kernel-team@lists.ubuntu.com; Wed, 04 Mar 2020 12:15:24 +0000 Received: from 1.general.ppisati.uk.vpn ([10.172.193.134] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1j9Svs-0001yh-EE for kernel-team@lists.ubuntu.com; Wed, 04 Mar 2020 12:15:24 +0000 From: Paolo Pisati To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1] UBUNTU: SAUCE: autotest: sfdisk: let sfdisk decide the first available sector Date: Wed, 4 Mar 2020 13:15:23 +0100 Message-Id: <20200304121523.28802-2-paolo.pisati@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200304121523.28802-1-paolo.pisati@canonical.com> References: <20200304121523.28802-1-paolo.pisati@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" 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 --- 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)