GNU bug report logs -
#21560
bug-parted Digest, Vol 154, Issue 8
Previous Next
To reply to this bug, email your comments to 21560 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-parted <at> gnu.org
:
bug#21560
; Package
parted
.
(Fri, 25 Sep 2015 17:12:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Rod Smith <rodsmith <at> rodsbooks.com>
:
New bug report received and forwarded. Copy sent to
bug-parted <at> gnu.org
.
(Fri, 25 Sep 2015 17:12:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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 <at> ubuntu.com>
>
> 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 <at> rodsbooks.com
http://www.rodsbooks.com
Information forwarded
to
bug-parted <at> gnu.org
:
bug#21560
; Package
parted
.
(Fri, 25 Sep 2015 17:47:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 21560 <at> debbugs.gnu.org (full text, mbox):
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.
This bug report was last modified 9 years and 268 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.