util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* cfdisk wipes out partition table when trying to replace a single logical partition
@ 2014-08-25 18:29 Michał Górny
  2014-08-26 14:58 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Michał Górny @ 2014-08-25 18:29 UTC (permalink / raw)
  To: util-linux

[-- Attachment #1: Type: text/plain, Size: 1070 bytes --]

(please CC me on replies)

Hello,

I'm afraid I've hit a bug that has been introduced in 2.25 and still
not fixed in current git.

I start with the following disk layout:

  Device     Boot    Start       End   Sectors  Size Id Type
  /dev/sdb1  *          63  93755339  93755277 44.7G  7 HPFS/NTFS/exFAT
  /dev/sdb2       93755392 234439534 140684143 67.1G  5 Extended
  /dev/sdb5       93757440 135700479  41943040   20G 83 Linux

Now I start cfdisk and remove sdb5, and create a larger partition on
top of it. At this point, cfdisk shows correct disk layout (sdb1, sdb2
and new sdb5), so I save it. However, the partition table written to
disk is incorrect:

  Device     Boot    Start       End  Sectors Size Id Type
  /dev/sdb1       93757440 146186239 52428800  25G 83 Linux

As far as I can see, cfdisk removed both the primary and extended
partitions, and wrote my new logical partition as primary. As you can
guess, this is rather unexpected and undesired.

I can consistently reproduce the issue.

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 949 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: cfdisk wipes out partition table when trying to replace a single logical partition
  2014-08-25 18:29 cfdisk wipes out partition table when trying to replace a single logical partition Michał Górny
@ 2014-08-26 14:58 ` Karel Zak
  0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2014-08-26 14:58 UTC (permalink / raw)
  To: Michał Górny; +Cc: util-linux

On Mon, Aug 25, 2014 at 08:29:46PM +0200, Michał Górny wrote:
> I'm afraid I've hit a bug that has been introduced in 2.25 and still
> not fixed in current git.

 Yep, it's pretty ugly bug. Fixed. We need 2.25.1 really ASAP.

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-26 14:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-25 18:29 cfdisk wipes out partition table when trying to replace a single logical partition Michał Górny
2014-08-26 14:58 ` Karel Zak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).