linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bug 220288] New: A typo Leads to loss of all data on disk
@ 2025-06-27 22:22 bugzilla-daemon
  2025-06-28  2:48 ` Theodore Ts'o
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: bugzilla-daemon @ 2025-06-27 22:22 UTC (permalink / raw)
  To: linux-ext4

https://bugzilla.kernel.org/show_bug.cgi?id=220288

            Bug ID: 220288
           Summary: A typo Leads to loss of all data on disk
           Product: File System
           Version: 2.5
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P3
         Component: ext4
          Assignee: fs_ext4@kernel-bugs.osdl.org
          Reporter: martin.vahi@softf1.com
        Regression: No

I wanted to run 

    fsck.ext4 /dev/sdc1

but accidentally missed the "1" at the end by typing

    fsck.ext4 /dev/sdc

and lost all data on /dev/sdc

My suggestion is that there should be some regex based test to see, if the
partition name candidate ends with a base 10 digit and if it does not, then a
confirmation prompt, possibly with red text, should be displayed that explains
the consequences and asks for confirmation. For non-interactive use of the

    fsck.ext4 /dev/sdc

there could be an extra parameter, "--skip_warning_prompts", which should be
mentioned at the text of all interactive warnings so that people, who stumble
on those interactive warnings do not need to look it up form fsck.ext4 man
page. A temporary workaround for myself is a Bash alias that wraps the
fsck.ext4, but in my opinion that's a dirty workaround and such critical
warnings should be part of the tool itself, specially given how common the
fsck.ext4 usage is with USB-HDDs and USB memory sticks. 

Thank You for reading this bug report.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

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

end of thread, other threads:[~2025-07-02 19:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-27 22:22 [Bug 220288] New: A typo Leads to loss of all data on disk bugzilla-daemon
2025-06-28  2:48 ` Theodore Ts'o
2025-06-28  2:48 ` [Bug 220288] " bugzilla-daemon
2025-06-28  8:47 ` bugzilla-daemon
2025-06-28  8:57 ` bugzilla-daemon
2025-06-28  9:37 ` bugzilla-daemon
2025-06-28 21:32 ` bugzilla-daemon
2025-06-28 21:39 ` bugzilla-daemon
2025-07-02 19:36 ` bugzilla-daemon

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).