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

Previous Next

Package: parted;

Reported by: parted-bugs <at> alioth.debian.org

Date: Wed, 11 Nov 2015 16:41:01 UTC

Severity: normal

To reply to this bug, email your comments to 21877 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to help-debbugs <at> gnu.org:
bug#21877; Package debbugs.gnu.org. (Wed, 11 Nov 2015 16:41:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to parted-bugs <at> alioth.debian.org:
New bug report received and forwarded. Copy sent to help-debbugs <at> gnu.org. (Wed, 11 Nov 2015 16:41:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: <parted-bugs <at> alioth.debian.org> 
To: noreply <at> alioth.debian.org
Subject: [parted-Bugs][313055] fdisk -l is not as read-only as I'd hoped
Date: Wed, 11 Nov 2015 13:30:45 +0000
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




bug reassigned from package 'debbugs.gnu.org' to 'parted'. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Wed, 11 Nov 2015 18:10:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-parted <at> gnu.org:
bug#21877; Package parted. (Wed, 11 Nov 2015 22:35:02 GMT) Full text and rfc822 format available.

Message #10 received at 21877 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 21877 <at> debbugs.gnu.org
Subject: Re: bug#21877: fdisk -l is not as read-only as I'd hoped
Date: Wed, 11 Nov 2015 17:33:10 -0500
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.





This bug report was last modified 8 years and 79 days ago.

Previous Next


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