GNU bug report logs - #21877
[parted-Bugs][313055] fdisk -l is not as read-only as I'd hoped

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: parted-bugs@HIDDEN; dated Wed, 11 Nov 2015 16:41:01 UTC; Maintainer for parted is bug-parted@HIDDEN.

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


Received: (at 21877) by debbugs.gnu.org; 11 Nov 2015 22:34:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 11 17:34:07 2015
Received: from localhost ([127.0.0.1]:33678 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1Zwdxv-0004Q7-F4
	for submit <at> debbugs.gnu.org; Wed, 11 Nov 2015 17:34:07 -0500
Received: from eggs.gnu.org ([208.118.235.92]:50193)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rgm@HIDDEN>) id 1Zwdxb-0004PD-He
 for 21877 <at> debbugs.gnu.org; Wed, 11 Nov 2015 17:34:05 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rgm@HIDDEN>) id 1Zwdx1-0007fM-GY
 for 21877 <at> debbugs.gnu.org; Wed, 11 Nov 2015 17:33:47 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34277)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <rgm@HIDDEN>)
 id 1Zwdx1-0007fB-DA
 for 21877 <at> debbugs.gnu.org; Wed, 11 Nov 2015 17:33:11 -0500
Received: from rgm by fencepost.gnu.org with local (Exim 4.82)
 (envelope-from <rgm@HIDDEN>)
 id 1Zwdx0-0005P3-Od; Wed, 11 Nov 2015 17:33:10 -0500
From: Glenn Morris <rgm@HIDDEN>
To: 21877 <at> debbugs.gnu.org
Subject: Re: bug#21877: fdisk -l is not as read-only as I'd hoped
References: <E1ZwVU5-0008P6-QZ@HIDDEN>
X-Spook: underground Airport TTP Service disruption Freeh Swine
X-Ran: sFv\S6*aSPj$E[+1]#VE8sL;b9kq`xSfA[G,qhO4PUY9uu2jR21AN3].,(k[!^4GmU$-$/
X-Hue: black
X-Attribution: GM
Date: Wed, 11 Nov 2015 17:33:10 -0500
In-Reply-To: <E1ZwVU5-0008P6-QZ@HIDDEN>
 (parted-bugs@HIDDEN's message of "Wed, 11 Nov 2015 13:30:45
 +0000")
Message-ID: <3zlha4415l.fsf@HIDDEN>
User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.3 (-----)
X-Debbugs-Envelope-To: 21877
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: -5.3 (-----)


This bug report, and also #21878, arrived from alioth via BCC.
This confuses debbugs, since it has no idea which package to assign the
report to. I've reassigned them to parted, but basically having one bug
tracker talk to another is never a good idea, so I'd recommend that you
make your (?) alioth tracker send things to a different address.





Information forwarded to bug-parted@HIDDEN:
bug#21877; Package parted. Full text available.
bug reassigned from package 'debbugs.gnu.org' to 'parted'. Request was from Glenn Morris <rgm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 11 Nov 2015 16:40:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 11 11:40:16 2015
Received: from localhost ([127.0.0.1]:33480 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZwYRT-0006ez-Ud
	for submit <at> debbugs.gnu.org; Wed, 11 Nov 2015 11:40:16 -0500
Received: from eggs.gnu.org ([208.118.235.92]:38279)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <parted-bugs@HIDDEN>) id 1ZwVUW-0002G7-1N
 for submit <at> debbugs.gnu.org; Wed, 11 Nov 2015 08:31:12 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <parted-bugs@HIDDEN>) id 1ZwVUL-0002Vi-G3
 for submit <at> debbugs.gnu.org; Wed, 11 Nov 2015 08:31:11 -0500
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 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:43108)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <parted-bugs@HIDDEN>) id 1ZwVUL-0002Ve-DW
 for submit <at> debbugs.gnu.org; Wed, 11 Nov 2015 08:31:01 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:48171)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <parted-bugs@HIDDEN>) id 1ZwVUF-00048o-3Q
 for bug-parted@HIDDEN; Wed, 11 Nov 2015 08:31:01 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <parted-bugs@HIDDEN>) id 1ZwVUD-0002T0-AR
 for bug-parted@HIDDEN; Wed, 11 Nov 2015 08:30:55 -0500
Received: from moszumanska.debian.org ([2001:41c8:1000:21::21:21]:46187)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <parted-bugs@HIDDEN>) id 1ZwVUD-0002P0-4Y
 for bug-parted@HIDDEN; Wed, 11 Nov 2015 08:30:53 -0500
Received: from www-data by moszumanska.debian.org with local (Exim 4.80)
 (envelope-from <parted-bugs@HIDDEN>)
 id 1ZwVU5-0008P6-QZ; Wed, 11 Nov 2015 13:30:45 +0000
To: noreply@HIDDEN
From: <parted-bugs@HIDDEN> 
Subject: [parted-Bugs][313055] fdisk -l is not as read-only as I'd hoped
Content-type: text/plain; charset=UTF-8
Message-Id: <E1ZwVU5-0008P6-QZ@HIDDEN>
Date: Wed, 11 Nov 2015 13:30:45 +0000
X-SA-Exim-Connect-IP: <locally generated>
X-SA-Exim-Mail-From: parted-bugs@HIDDEN
X-SA-Exim-Scanned: No (on moszumanska.debian.org);
 SAEximRunCond expanded to false
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
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: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Wed, 11 Nov 2015 11:40:14 -0500
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
Reply-To: parted-bugs@HIDDEN
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: -5.0 (-----)

parted-Bugs item #313055 was changed at 2015-11-11 13:30 by Gareth Randall
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=410685&aid=313055&group_id=30287

Status: Open
Priority: 3
Submitted By: Edward Welbourne (eddy-guest)
Assigned to: Nobody (None)
Summary: fdisk -l is not as read-only as I'd hoped 
Category: Unspecified
Group: Version &lt; 1.6.25
Resolution: None


Initial Comment:
I have a partition I made ages ago, that I've not been using - and I've forgotten which file-system type I put on it (if any).  I initially supposed I'd used ext3 (since that's what I used for all the *other* partitions created at the same time) but mounting it as such failed, saying it wasn't an ext3 partition.
So I googled and found http://nst.sourceforge.net/nst/docs/user/ch04s03.html which suggested using fdisk -l; the man page said it lists the partition table on a device - which sounded promising.
However (once I'd duly logged in as root to have sufficient privilege ...), when I ran fdisk -l on it, (after its copyright preamble) it said: <quote>

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

Disk /dev/dm-1: 740 GB, 740135370240 bytes
255 heads, 63 sectors/track, 89983 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot      Start         End      Blocks   Id  System
</quote>
... and "Building a new DOS disklabel." definitely comes under the heading of unwanted behaviour vigorously in conflict with the principle of least surprise.  I thought I was running a read-only command - I do not have delusions of knowing what I'm doing, so I start by gathering information using commands that won't mess with things, until I've satisfied myself that I have enough of a clue that it's not entirely stupid to try what I think I should do next.  Having one of my information-gathering commands make changes was a scary shock.

Now, OK, it's only made changes in memory, so it hasn't *really* changed the device, but all the same it's not really appropriate for a "list the contents" command to *modify* the thing it's meant to be listing.
Being a complete innocent, as concerns disk partitioning, I'm left in the unpleasant situation of not knowing what to do about the "in memory" disk label that I don't want and probably (but I don't know) need to get rid of if I want to find out what's actually there.  So the fact that it's only in memory is *not* entirely harmless !  (The message could beneficially be expanded to say what I need to do to tell fdisk to undo the in-memory changes, i.e. restore the status quo ante, in whatever situations it *is* appropriate for it to take this action and produce this message.)

(... and, of course, producing the headers for a table, when there's no data to put under them as a table, is a waste of output.  But that really is harmless.)

fdisk -v says: <quote>
GNU Fdisk 1.2.4
</quote>


----------------------------------------------------------------------

Comment By: Gareth Randall (gareth-guest)
Date: 2015-11-11 13:30

Message:
This is the bug list for the parted program, not fdisk, so can this bug be closed?

(However, I agree with your view that fdisk's "Building a new DOS disklabel" is worrying when you first see it.)


----------------------------------------------------------------------

You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=410685&aid=313055&group_id=30287




Acknowledgement sent to parted-bugs@HIDDEN:
New bug report received and forwarded. Copy sent to help-debbugs@HIDDEN. Full text available.
Report forwarded to help-debbugs@HIDDEN:
bug#21877; Package debbugs.gnu.org. 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.