GNU logs - #21560, boring messages


Message sent to bug-parted@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#21560: bug-parted Digest, Vol 154, Issue 8
Resent-From: Rod Smith <rodsmith@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-parted@HIDDEN
Resent-Date: Fri, 25 Sep 2015 17:12:02 +0000
Resent-Message-ID: <handler.21560.B.14432010934969 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 21560
X-GNU-PR-Package: parted
X-GNU-PR-Keywords: 
To: 21560 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-parted@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.14432010934969
          (code B ref -1); Fri, 25 Sep 2015 17:12:02 +0000
Received: (at submit) by debbugs.gnu.org; 25 Sep 2015 17:11:33 +0000
Received: from localhost ([127.0.0.1]:43698 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZfWWy-0001I5-LU
	for submit <at> debbugs.gnu.org; Fri, 25 Sep 2015 13:11:33 -0400
Received: from eggs.gnu.org ([208.118.235.92]:53437)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <rodsmith@HIDDEN>) id 1ZfWWw-0001Hq-NI
 for submit <at> debbugs.gnu.org; Fri, 25 Sep 2015 13:11:31 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rodsmith@HIDDEN>) id 1ZfWWT-0001Ml-1F
 for submit <at> debbugs.gnu.org; Fri, 25 Sep 2015 13:11:23 -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 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:33693)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <rodsmith@HIDDEN>) id 1ZfWWS-00017w-SY
 for submit <at> debbugs.gnu.org; Fri, 25 Sep 2015 13:11:00 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:60420)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <rodsmith@HIDDEN>) id 1ZfWNc-00018G-AX
 for bug-parted@HIDDEN; Fri, 25 Sep 2015 13:01:53 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <rodsmith@HIDDEN>) id 1ZfWNY-00046k-74
 for bug-parted@HIDDEN; Fri, 25 Sep 2015 13:01:52 -0400
Received: from eastrmfepo202.cox.net ([68.230.241.217]:59019)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <rodsmith@HIDDEN>) id 1ZfWNY-00046Z-2Z
 for bug-parted@HIDDEN; Fri, 25 Sep 2015 13:01:48 -0400
Received: from eastrmimpo306 ([68.230.241.238]) by eastrmfepo202.cox.net
 (InterMail vM.8.01.05.15 201-2260-151-145-20131218) with ESMTP
 id <20150925170146.WGGJ17465.eastrmfepo202.cox.net@eastrmimpo306>
 for <bug-parted@HIDDEN>; Fri, 25 Sep 2015 13:01:46 -0400
Received: from nessus.rodsbooks.com ([98.182.36.23]) by eastrmimpo306 with cox
 id MV1l1r00b0Vxc5u01V1lhc; Fri, 25 Sep 2015 13:01:46 -0400
X-CT-Class: Clean
X-CT-Score: 0.00
X-CT-RefID: str=0001.0A020205.56057DFA.00E6,ss=1,re=0.000,fgs=0
X-CT-Spam: 0
X-Authority-Analysis: v=2.0 cv=Ao4wKpBP c=1 sm=1
 a=5/GQi7ztvdfnmBZvbhqgsw==:17 a=28bguoTQAAAA:8 a=ff-B7xzCdYMA:10
 a=8pif782wAAAA:8 a=fxJcL_dCAAAA:8 a=onCKLALDZOuPHLMfoNQA:9 a=pILNOxqGKmIA:10
 a=5/GQi7ztvdfnmBZvbhqgsw==:117
X-CM-Score: 0.00
Authentication-Results: cox.net; none
Received: from [192.168.1.2] (nessus.rodsbooks.com [192.168.1.2])
 by nessus.rodsbooks.com (Postfix) with ESMTP id C5FF82A04CE
 for <bug-parted@HIDDEN>; Fri, 25 Sep 2015 13:01:45 -0400 (EDT)
References: <mailman.177.1443196875.20173.bug-parted@HIDDEN>
From: Rod Smith <rodsmith@HIDDEN>
X-Enigmail-Draft-Status: N1110
Message-ID: <56057DF9.5040302@HIDDEN>
Date: Fri, 25 Sep 2015 13:01:45 -0400
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101
 Thunderbird/38.2.0
MIME-Version: 1.0
In-Reply-To: <mailman.177.1443196875.20173.bug-parted@HIDDEN>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 8bit
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
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-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.0 (-----)

On 9/24/2015 11:56 AM, Brian C. Lane wrote:
>>
>> While parted lays out the disk this way, it doesn't have to be.  The EBR
>> for each chained logical volume can be placed anywhere in the extended
>> partition.  In his case, it looks like both are at the start of the
>> extended partition.  This is perfectly ok and parted should accept it.
>> 
>> Now that I have both EBRs I'm able to reproduce the crash and will try
>> to fix it.
> 
> Are you sure? According to
> https://en.wikipedia.org/wiki/Extended_boot_record the EBR is at the
> start of each logical partition, and chains to the next.

I've seen this type of layout before. I don't know of anything that will
create it if given the choice, but I'm pretty sure that sfdisk will
create such a layout if it's forced to do so. You might try using sfdisk
to create a series of logical partitions with no gaps between them but a
big gap between the start of the extended partition and the first
logical partition to reproduce this behavior.

On hu, 24 Sep 2015 12:33:08, James Ring wrote:

> I wish I could remember exactly how I partitioned the disk. I think I
> resized the NTFS partition using the Windows 7 tools and then let the
> Ubuntu installer partition the rest of the disk.

I wouldn't trust the Windows partitioning tools as far as I could throw
them if they were written to a CD-R made of solid neutronium. I've seen
too many tales over the years of them doing weird things with
partitions, and especially with extended and logical partitions. I
recall a rash of problem reports a few years ago in which the Windows XP
(IIRC) installer was converting a logical partition into a primary
partition but leaving it inside the extended partition. In other words,
it's entirely believable that the Windows tools set things up this way
-- but I certainly don't know that for a fact. Using sfdisk is likely to
be an easier way to reproduce the issue.

> From: Phil Susi <psusi@HIDDEN>
> 
> I've also been looking at the parted code for writing the partition
> table and I'm beating my head against the desk now because I swear, it
> can't possibly work the way it is.  What am I missing here?
> 
> It *should* be writing the EBR for the next logical partition to start -
> 1, or prev->end + 1.  Instead, it does this:
> 
> geom = ped_geometry_new (disk->dev, part->prev->geom.start,
>                          part->geom.end - part->prev->geom.start + 1);
> 
> That says put it in the boot sector of the previous logical partition,
> doesn't it?

I've only looked at this briefly, but this line looks like it might be
something to do with manipulating the extended partition rather than a
logical partition. If part is the logical partition being created and if
part->prev is the extended partition, then this would be passing
ped_geometry_new() the start point of the extended partition and the
required size of the extended partition to hold the logical partition
being created.

Brian's quite right that this code needs more comments; it's clear as mud.

-- 
Rod Smith
rodsmith@HIDDEN
http://www.rodsbooks.com




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.503 (Entity 5.503)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Rod Smith <rodsmith@HIDDEN>
Subject: bug#21560: Acknowledgement (bug-parted Digest, Vol 154, Issue 8)
Message-ID: <handler.21560.B.14432010934969.ack <at> debbugs.gnu.org>
References: <56057DF9.5040302@HIDDEN>
X-Gnu-PR-Message: ack 21560
X-Gnu-PR-Package: parted
Reply-To: 21560 <at> debbugs.gnu.org
Date: Fri, 25 Sep 2015 17:12:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-parted@HIDDEN

If you wish to submit further information on this problem, please
send it to 21560 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
21560: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D21560
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message sent to bug-parted@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#21560: bug-parted Digest, Vol 154, Issue 8
Resent-From: Phil Susi <psusi@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-parted@HIDDEN
Resent-Date: Fri, 25 Sep 2015 17:47:01 +0000
Resent-Message-ID: <handler.21560.B21560.14432031878060 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 21560
X-GNU-PR-Package: parted
X-GNU-PR-Keywords: 
To: Rod Smith <rodsmith@HIDDEN>, 21560 <at> debbugs.gnu.org
Received: via spool by 21560-submit <at> debbugs.gnu.org id=B21560.14432031878060
          (code B ref 21560); Fri, 25 Sep 2015 17:47:01 +0000
Received: (at 21560) by debbugs.gnu.org; 25 Sep 2015 17:46:27 +0000
Received: from localhost ([127.0.0.1]:43719 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ZfX4k-00025v-TX
	for submit <at> debbugs.gnu.org; Fri, 25 Sep 2015 13:46:27 -0400
Received: from mail-yk0-f174.google.com ([209.85.160.174]:36425)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <phillsusi@HIDDEN>) id 1ZfX4j-00025n-1c
 for 21560 <at> debbugs.gnu.org; Fri, 25 Sep 2015 13:46:25 -0400
Received: by ykdt18 with SMTP id t18so121935179ykd.3
 for <21560 <at> debbugs.gnu.org>; Fri, 25 Sep 2015 10:46:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
 h=sender:subject:to:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-type:content-transfer-encoding;
 bh=p1zTA4pxdPxB9qBYYNp4MGnLFpbzc9KALh0eROgdrBE=;
 b=PQIzBMgFX5Dv/jEvUXqtmd54eG7cRdCTnCd0GhAlHRayusFmHRujh4QI62GNAAyOdX
 8uTJwrJ9L2dkgnoSB/CQghW8qvPKFRtlI1JFU6MsmMO9xSCSmQE75wJdkOIpQUaiP5Vi
 sb8e23jdOWQoDao01AZh1M1sAfVAlWvg8JwqWy3s2DeN3QeCmhoFyQVHjwuGc5bK9r59
 MAaq7jeRIOqb99Rk4euyMkgrX4fN5JqkqLzPzDzRowktWTUtV3wDeWv9dfYXtE16ezse
 lbcGFYNG3unSVrPvkqE53uNUqVPPmmC9rGk2EvVfTZm1tEJBjFGwKNQifbbyqbK5kTpS
 3mOg==
X-Received: by 10.170.54.197 with SMTP id 188mr5890057ykw.123.1443203184360;
 Fri, 25 Sep 2015 10:46:24 -0700 (PDT)
Received: from [10.1.1.230] (fl-67-77-88-12.sta.embarqhsd.net. [67.77.88.12])
 by smtp.googlemail.com with ESMTPSA id
 c137sm3365389ywa.43.2015.09.25.10.46.23
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Fri, 25 Sep 2015 10:46:23 -0700 (PDT)
References: <mailman.177.1443196875.20173.bug-parted@HIDDEN>
 <56057DF9.5040302@HIDDEN>
From: Phil Susi <psusi@HIDDEN>
X-Enigmail-Draft-Status: N1110
Message-ID: <5605883B.3090000@HIDDEN>
Date: Fri, 25 Sep 2015 13:45:31 -0400
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101
 Thunderbird/38.2.0
MIME-Version: 1.0
In-Reply-To: <56057DF9.5040302@HIDDEN>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
X-Spam-Score: -0.7 (/)
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: -0.7 (/)

On 9/25/2015 1:01 PM, Rod Smith wrote:
> I've seen this type of layout before. I don't know of anything that will
> create it if given the choice, but I'm pretty sure that sfdisk will
> create such a layout if it's forced to do so. You might try using sfdisk
> to create a series of logical partitions with no gaps between them but a
> big gap between the start of the extended partition and the first
> logical partition to reproduce this behavior.

I remember that.  Also, I once had something corrupt my NTFS filesystem
and had to run the chkdsk from the installer cd to try and repair it,
and it decided to replace the boot sector with a FAT one.  Fortunately I
found a hex editor and restored the backup copy from the middle of the
volume.  Windows bad... grr...

> I wouldn't trust the Windows partitioning tools as far as I could throw
> them if they were written to a CD-R made of solid neutronium. I've seen
> too many tales over the years of them doing weird things with
> partitions, and especially with extended and logical partitions. I
> recall a rash of problem reports a few years ago in which the Windows XP
> (IIRC) installer was converting a logical partition into a primary
> partition but leaving it inside the extended partition. In other words,
> it's entirely believable that the Windows tools set things up this way
> -- but I certainly don't know that for a fact. Using sfdisk is likely to
> be an easier way to reproduce the issue.

I tried with fdisk first and it seems to insist on not just one sector
but an entire cylinder ( wtf? ) between the partitions.  I looked at
sfdisk and it seems to only work in cylinders.  Of course that was on my
14.04 system, so maybe I need to check a more recent version.

> I've only looked at this briefly, but this line looks like it might be
> something to do with manipulating the extended partition rather than a
> logical partition. If part is the logical partition being created and if
> part->prev is the extended partition, then this would be passing
> ped_geometry_new() the start point of the extended partition and the
> required size of the extended partition to hold the logical partition
> being created.

The sector argument gives the sector where the EBR it should write is
located.  The initial call gives it the first sector of the extended
partition, i.e. the EBR for partition 5.  Then when it recurses into
itself, it passes the sector of part->prev->geom.start, where part is
partition 6, and so it is passing the first sector of partition 5.






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.