util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Fleetwood <mike.fleetwood@googlemail.com>
To: Karel Zak <kzak@redhat.com>
Cc: util-linux@vger.kernel.org
Subject: Re: blkid identifying whole disk ntfs as both ntfs and msdos partition table
Date: Thu, 18 Jul 2019 21:10:26 +0100	[thread overview]
Message-ID: <CAMU1PDgYUdkWE3Vd2hOWT5Rp0Bycq6s0U81=6zxERapsBzqa5Q@mail.gmail.com> (raw)
In-Reply-To: <20190717111611.dfkjvyuvpuipfsmy@ws.net.home>

On Wed, 17 Jul 2019 at 12:16, Karel Zak <kzak@redhat.com> wrote:
>
> On Tue, Jul 02, 2019 at 11:43:34AM +0100, Mike Fleetwood wrote:
> > # mkntfs -Q -F /dev/sdb
> > /dev/sdb is entire device, not just one partition.
> > mkntfs forced anyway.
> > Cluster size has been automatically set to 4096 bytes.
> > Creating NTFS volume structures.
> > mkntfs completed successfully. Have a nice day.
> > # ./blkid --version
> > lt-blkid from util-linux 2.34.24-e3bb9  (libblkid 2.34.24, 14-Jun-2019)
> > # ./blkid /dev/sdb
> > /dev/sdb: UUID="3B64D28A5CF89146" TYPE="ntfs" PTTYPE="dos"
>
> Fixed version:
>
>  # ./blkid -p /dev/sdc
>  /dev/sdc: UUID="18CBAEE61457A850" TYPE="ntfs" USAGE="filesystem"
>
> > # ./wipefs /dev/sdb
> > DEVICE OFFSET TYPE UUID             LABEL
> > sdb    0x3    ntfs 3B64D28A5CF89146
> > sdb    0x1fe  dos
>
> wipefs has a little bit different semantic, it tries to gather as
> much as possible magic strings, so after the bug fix it still reports
> "dos" on 0x1fe. It's expected behavior.
>
> wipefs internally masks previously detected magic string (e.g. "ntfs")
> to avoid any interaction with the next probing. This is because we
> want to see all possibilities. Note wipefs wipes only the magic
> strings (and nothing else), so if you wipe "NTFS" than it will be
> interpreted as MBR ("dos") as there is no more valid NTFS.
>
> > Note that the test ntfs image in util-linux doesn't cause this.  Just file
> > systems created by mkntfs from ntfsprogs.
> >
> > # dd if=/dev/zero bs=1M of=/dev/sdb
> > # xzcat tests/ts/blkid/images-fs/ntfs.img.xz > /dev/sdb
> > # ./blkid /dev/sdb
> > /dev/sdb: LABEL="M-PM-^]M-PM->M-PM-2M-QM-^KM-PM-9 M-QM-^BM-PM->M-PM-<"
> > UUID="09CBB6DE30C87310" TYPE="ntfs"
> > # ./wipefs /dev/sdb
> > DEVICE OFFSET TYPE UUID             LABEL
> > sdb    0x3    ntfs 09CBB6DE30C87310 Новый том
>
> Sounds like we need another test image :-)
>
>
> Thanks for your reports!
>
>     Karel

Thank you for fixing these bugs so quickly.

Mike

      reply	other threads:[~2019-07-18 20:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-02 10:43 blkid identifying whole disk ntfs as both ntfs and msdos partition table Mike Fleetwood
2019-07-02 18:14 ` Theodore Ts'o
2019-07-02 19:06   ` Karel Zak
2019-07-17 11:16 ` Karel Zak
2019-07-18 20:10   ` Mike Fleetwood [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMU1PDgYUdkWE3Vd2hOWT5Rp0Bycq6s0U81=6zxERapsBzqa5Q@mail.gmail.com' \
    --to=mike.fleetwood@googlemail.com \
    --cc=kzak@redhat.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).