GNU bug report logs - #21151
Strange behaviour when using interactive vs non-interactive mode - is this a bug?

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: parted; Reported by: Adam Baxter <voltagex@HIDDEN>; dated Tue, 28 Jul 2015 15:22:01 UTC; Maintainer for parted is bug-parted@HIDDEN.

Message received at 21151 <at> debbugs.gnu.org:


Received: (at 21151) by debbugs.gnu.org; 28 Jul 2015 22:40:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 28 18:40:38 2015
Received: from localhost ([127.0.0.1]:33060 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZKDY5-0005n3-N4
	for submit <at> debbugs.gnu.org; Tue, 28 Jul 2015 18:40:37 -0400
Received: from mx1.redhat.com ([209.132.183.28]:53996)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <bcl@HIDDEN>) id 1ZKDY3-0005mu-K5
 for 21151 <at> debbugs.gnu.org; Tue, 28 Jul 2015 18:40:36 -0400
Received: from int-mx10.intmail.prod.int.phx2.redhat.com
 (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
 by mx1.redhat.com (Postfix) with ESMTPS id 9DE2DA4A15;
 Tue, 28 Jul 2015 22:40:34 +0000 (UTC)
Received: from lister.brianlane.com (ovpn-113-168.phx2.redhat.com
 [10.3.113.168])
 by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id
 t6SMeWfs024466
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO);
 Tue, 28 Jul 2015 18:40:34 -0400
Date: Tue, 28 Jul 2015 15:40:32 -0700
From: "Brian C. Lane" <bcl@HIDDEN>
To: Adam Baxter <voltagex@HIDDEN>
Subject: Re: bug#21151: Strange behaviour when using interactive vs
 non-interactive mode - is this a bug?
Message-ID: <20150728224032.GI3080@HIDDEN>
References: <CAChFQ9QaaNOEgBpxismWkvN943E0Z5-n1AZm=2Po=fRBaRpA1w@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAChFQ9QaaNOEgBpxismWkvN943E0Z5-n1AZm=2Po=fRBaRpA1w@HIDDEN>
User-Agent: Mutt/1.5.23 (2014-03-12)
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
X-Spam-Score: -6.4 (------)
X-Debbugs-Envelope-To: 21151
Cc: 21151 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.4 (------)

On Tue, Jul 28, 2015 at 08:20:59AM -0700, Adam Baxter wrote:
> Hi all,
> With the following script and parted 3.2
> 
> #!/bin/bash
> image=blank.img
> dd if=/dev/zero of=$image bs=1M count=32
> sync
> cat <<-EOF | parted -s $image
>         mklabel msdos
>         mkpart primary ext2 0 100%
>         set 1 boot on
> EOF
> sync
> file $image
> 
> I see different results if parted is invoked with -s or without.
> 
> *With* -s, the call to file results in "blank.img: data" and there's no
> partitions in the disk image.
> *Without* -s,

Don't put the commands on separate lines when using -s:

parted -s $image mklabel msdos mkpart primary ext2 0 100% set 1 boot on

> 
> Welcome to GNU Parted! Type 'help' to view a list of commands.
> (parted)         mklabel msdos
> (parted)         mkpart primary ext2 0 100%
> Warning: The resulting partition is not properly aligned for best
> performance.
> (parted)         set 1 boot on
> (parted) quit
> blank.img: DOS/MBR boot sector; partition 1 : ID=0x83, active, start-CHS
> (0x0,0,2), end-CHS (0x1ff,3,32), startsector 1, 65535 sectors
> 
> Removing the quit command makes no difference.
> 
> The script without -s will crash at least parted 2.3.

That's likely fixed in newer versions.

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)




Information forwarded to bug-parted@HIDDEN:
bug#21151; Package parted. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 28 Jul 2015 15:21:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 28 11:21:14 2015
Received: from localhost ([127.0.0.1]:32895 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZK6gr-0007jt-SC
	for submit <at> debbugs.gnu.org; Tue, 28 Jul 2015 11:21:14 -0400
Received: from eggs.gnu.org ([208.118.235.92]:47881)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <voltagex@HIDDEN>) id 1ZK6go-0007ji-Pp
 for submit <at> debbugs.gnu.org; Tue, 28 Jul 2015 11:21:11 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <voltagex@HIDDEN>) id 1ZK6gn-00059Q-Qg
 for submit <at> debbugs.gnu.org; Tue, 28 Jul 2015 11:21:10 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,HTML_MESSAGE
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:36721)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <voltagex@HIDDEN>) id 1ZK6gn-00059M-Ny
 for submit <at> debbugs.gnu.org; Tue, 28 Jul 2015 11:21:09 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:33147)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <voltagex@HIDDEN>) id 1ZK6gm-0003uJ-PP
 for bug-parted@HIDDEN; Tue, 28 Jul 2015 11:21:09 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <voltagex@HIDDEN>) id 1ZK6gf-00055F-D3
 for bug-parted@HIDDEN; Tue, 28 Jul 2015 11:21:08 -0400
Received: from mail-wi0-f179.google.com ([209.85.212.179]:37863)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <voltagex@HIDDEN>) id 1ZK6gf-00054l-6i
 for bug-parted@HIDDEN; Tue, 28 Jul 2015 11:21:01 -0400
Received: by wibud3 with SMTP id ud3so164571104wib.0
 for <bug-parted@HIDDEN>; Tue, 28 Jul 2015 08:21:00 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20130820;
 h=x-gm-message-state:mime-version:date:message-id:subject:from:to
 :content-type;
 bh=kPNFTC2ARo//vkq5sjNQckTGYA+DxhxuNAnAuGLKHYY=;
 b=fyBa6y9FQ86u9bQrznUbFCnLdfWK1VGA10H/wiCY+TtPPhxPCVsR/6+Zm97TXhZ08w
 fEe2wU38HaE2oeN4C4HkkfWuPgkbIZdPXuqAOVliSHV1E4LGgAOGwo/lbDqx4cT60TS2
 6+y99mT/NTcsjZLxWf7aK7ab05Pt1IyP4m72Iax5uOE7YanF7v+CmpPIhIBKpNUDayYa
 1IuWUTmpx+/batT7Usqnvz0/Vbmn6O5knpxZl/ZAzLjRk+LY+0IJu4QrWPtTgP3kn8tv
 W0ENCZ47fD1zZlHXQrMJXERECMzH/fw5YhTg/VbtHsgpd+GD9GuX5CKwsonCGf1hRh5T
 ZNXA==
X-Gm-Message-State: ALoCoQm8WMgHgEjXRo4RPUxTkrDi7hDZ3c9lydJvHQTDpfZ7ln3pKT6kREPwnm7czUhQU4KSkHUn
MIME-Version: 1.0
X-Received: by 10.194.221.71 with SMTP id qc7mr66950678wjc.9.1438096859961;
 Tue, 28 Jul 2015 08:20:59 -0700 (PDT)
Received: by 10.27.153.202 with HTTP; Tue, 28 Jul 2015 08:20:59 -0700 (PDT)
Date: Tue, 28 Jul 2015 08:20:59 -0700
Message-ID: <CAChFQ9QaaNOEgBpxismWkvN943E0Z5-n1AZm=2Po=fRBaRpA1w@HIDDEN>
Subject: Strange behaviour when using interactive vs non-interactive mode - is
 this a bug?
From: Adam Baxter <voltagex@HIDDEN>
To: bug-parted@HIDDEN
Content-Type: multipart/alternative; boundary=001a11c3b7247db430051bf104d3
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

--001a11c3b7247db430051bf104d3
Content-Type: text/plain; charset=UTF-8

Hi all,
With the following script and parted 3.2

#!/bin/bash
image=blank.img
dd if=/dev/zero of=$image bs=1M count=32
sync
cat <<-EOF | parted -s $image
        mklabel msdos
        mkpart primary ext2 0 100%
        set 1 boot on
EOF
sync
file $image

I see different results if parted is invoked with -s or without.

*With* -s, the call to file results in "blank.img: data" and there's no
partitions in the disk image.
*Without* -s,

Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted)         mklabel msdos
(parted)         mkpart primary ext2 0 100%
Warning: The resulting partition is not properly aligned for best
performance.
(parted)         set 1 boot on
(parted) quit
blank.img: DOS/MBR boot sector; partition 1 : ID=0x83, active, start-CHS
(0x0,0,2), end-CHS (0x1ff,3,32), startsector 1, 65535 sectors

Removing the quit command makes no difference.

The script without -s will crash at least parted 2.3.


Thanks,
Adam Baxter

--001a11c3b7247db430051bf104d3
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div><div><div>Hi all,<br></div>With the followi=
ng script and parted 3.2<br><br>#!/bin/bash<br>image=3Dblank.img<br>dd if=
=3D/dev/zero of=3D$image bs=3D1M count=3D32<br>sync<br>cat &lt;&lt;-EOF | p=
arted -s $image<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mklabel msdos=
<br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 mkpart primary ext2 0 100%<b=
r>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 set 1 boot on<br>EOF<br>sync<b=
r>file $image<br><br></div>I see different results if parted is invoked wit=
h -s or without.<br><br>*With* -s, the call to file results in &quot;blank.=
img: data&quot; and there&#39;s no partitions in the disk image.<br></div><=
/div>*Without* -s, <br><br>Welcome to GNU Parted! Type &#39;help&#39; to vi=
ew a list of commands.<br>(parted)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 mklabel msdos<br>(parted)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 mkpart primary ext2 0 100%<br>Warning: The resulting partition is=
 not properly aligned for best performance.<br>(parted)=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 set 1 boot on<br>(parted) quit<br>blank.img:=
 DOS/MBR boot sector; partition 1 : ID=3D0x83, active, start-CHS (0x0,0,2),=
 end-CHS (0x1ff,3,32), startsector 1, 65535 sectors<br><br></div><div>Remov=
ing the quit command makes no difference.<br><br></div><div>The script with=
out -s will crash at least parted 2.3.<br><br><br></div><div>Thanks,<br></d=
iv><div>Adam Baxter<br></div></div>

--001a11c3b7247db430051bf104d3--




Acknowledgement sent to Adam Baxter <voltagex@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-parted@HIDDEN. Full text available.
Report forwarded to bug-parted@HIDDEN:
bug#21151; Package parted. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.