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

Previous Next

Package: parted;

Reported by: Adam Baxter <voltagex <at> voltagex.org>

Date: Tue, 28 Jul 2015 15:22:01 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Adam Baxter <voltagex <at> voltagex.org>
To: 21151 <at> debbugs.gnu.org
Subject: bug#21151: Strange behaviour when using interactive vs non-interactive mode - is this a bug?
Date: Tue, 28 Jul 2015 08:20:59 -0700
[Message part 1 (text/plain, inline)]
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
[Message part 2 (text/html, inline)]

This bug report was last modified 9 years and 327 days ago.

Previous Next


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