From: Karel Zak <kzak@redhat.com>
To: Mike Fleetwood <mike.fleetwood@googlemail.com>
Cc: util-linux@vger.kernel.org
Subject: Re: fdisk not wiping sector 0 before writing new MBR
Date: Wed, 17 Jul 2019 12:26:53 +0200 [thread overview]
Message-ID: <20190717102653.esdmaidgsjwtypwu@ws.net.home> (raw)
In-Reply-To: <20190717101625.vz657vj5g2ir5gcy@ws.net.home>
On Wed, Jul 17, 2019 at 12:16:28PM +0200, Karel Zak wrote:
> On Thu, Jul 04, 2019 at 10:55:16PM +0100, Mike Fleetwood wrote:
> > Hi,
> >
> > This is a bit more of a speculative than my other recent one, but I saw
> > this quote in aix.c:
> > "All fdisk-like programs has to properly wipe the first sector.
> > Everything other is a bug."
> >
> > Using fdisk to create an MBR over the top of a whole disk FAT32 (and
> > probably FAT16) file system doesn't clear any of the FAT32 boot record
> > (aka super block). Blkid and wipefs report this as just an MBR, but
> > because the boot record is intact, GNU parted reports this still as a
> > whole disk FAT32 file system.
>
> This is bug. MBR probing code in fdisk is weak and it does not check for
> false positives like blkid, so FAT32 is interpreted as MBR and the bootbits
> are not wiped (fdisk wipes first sector only if it creates a new
> partition table).
Ah, I've forgot... it's fixed now :-)
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
prev parent reply other threads:[~2019-07-17 10:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-04 21:55 fdisk not wiping sector 0 before writing new MBR Mike Fleetwood
2019-07-17 10:16 ` Karel Zak
2019-07-17 10:26 ` Karel Zak [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=20190717102653.esdmaidgsjwtypwu@ws.net.home \
--to=kzak@redhat.com \
--cc=mike.fleetwood@googlemail.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).