Util-Linux Archive mirror
 help / color / mirror / Atom feed
From: Thorsten Glaser <tg@debian.org>
To: util-linux@vger.kernel.org
Subject: fdisk corrupts data on USB stick
Date: Mon, 29 Jan 2024 17:04:12 +0000 (UTC)	[thread overview]
Message-ID: <Pine.BSM.4.64L.2401291659410.19873@herc.mirbsd.org> (raw)

Background: https://github.com/grml/grml/issues/205

Using fdisk 2.36.1-8+deb11u1 from util-linux to create an extra
partition on a USB stick on which I had previously written an
ISO 9660 image does something to the data on the stick to make
klibc fstype not recognise it as ISO 9660 any more. Specifically,
it corrupts some data at some location within the first 4 MiB of
the stick but outside of the first 512 byte of it, as restoring
those first 4 MiB then re-restoring the MBR to the state fdisk
had written makes it work again.

This is a data corruption bug. I expect fdisk to change precisely
the MBR and nothing else unless told so.

Is there a way we can make it not corrupt such media?

Thanks in advance,
//mirabilos
-- 
08:05⎜<XTaran:#grml> mika: Does grml have an tool to read Apple
     ⎜    System Log (asl) files? :)
08:08⎜<ft:#grml> yeah. /bin/rm. ;)       08:09⎜<mrud:#grml> hexdump -C
08:31⎜<XTaran:#grml> ft, mrud: *g*

             reply	other threads:[~2024-01-29 17:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-29 17:04 Thorsten Glaser [this message]
2024-01-29 20:01 ` fdisk corrupts data on USB stick Thomas Weißschuh
2024-01-29 20:27   ` Thorsten Glaser
2024-01-29 20:44     ` Thomas Weißschuh
2024-01-29 20:56       ` Karel Zak
2024-01-29 21:29         ` Thorsten Glaser
2024-01-29 22:11           ` Bill Unruh
2024-01-29 22:27             ` Thorsten Glaser
2024-01-29 22:36               ` Bill Unruh
2024-01-29 22:45                 ` Thorsten Glaser
2024-01-29 20:44     ` Bill Unruh

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=Pine.BSM.4.64L.2401291659410.19873@herc.mirbsd.org \
    --to=tg@debian.org \
    --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 read-only IMAP folder(s) and NNTP newsgroup(s).