Announcement

Collapse
No announcement yet.

Kernel panic - SSD not mounting, "wrong fs type, bad option, bad superblock" etc

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Kernel panic - SSD not mounting, "wrong fs type, bad option, bad superblock" etc

    Hi all,

    Got a desktop crash, and now one of my SSDs plugged to the motherboard won't mount. I can't seem to figure out how to remount it, though I'm not opposed to reformatting it if that's what's needed. I'll run through the events that led up to it below, and do let me know if you need more info:

    My desktop runs Kubuntu 25.04 as its only OS (recently switched from Win10). I have installed the OS itself on an SSD, and I have two other drives mounted internally on my computer: a HDD where I save all my documents and files, and an SSD just for games. Those two were first installed on my Win10, and they still were easy to access when I got Kubuntu up and running, so I've left them as-is. This HDD and SSD are never mounted at startup, for some reason I haven't dug into, but I just open Dolphin, click on them to mount, and I'm good to go.

    However, today I started Steam and tried to launch a game without first having mounted the SSD, which I believe might be the cause of my odd troubles. Steam showed no games installed, but I automatically clicked the "Play" button for my game, not registering before after clicking that it now said "Install". Steam immediately started downloading the game for installation. However, since I have directed it to install games on an SSD that wasn't mounted, it froze. I tried closing Steam, mounting the SSD, which worked, and re-launched Steam. This is when the Kernel panic set in, displaying the following text:
    KERNEL PANIC!
    Please reboot your computer.
    stack-protector: Kernel stack is corrupted in: __blk_flush_plug+0x136/0x140


    I rebooted the computer. I successfully mounted my HDD on startup, but when I tried to mount the SSD with the games, I got the following message:

    An error occurred while accessing 'Games', the system responded: The requested operation has failed: Error mounting /dev/sdb2 at /media/[Username]/Games: wrong fs type, bad option, bad superblock on /dev/sdb2, missing codepage or helper program, or other error.


    I right-clicked the drive, chose "reformat or edit with partition manager", found /dev/sbd2 (type ntfs), right-clicked to run the Check and repair, and that was a no-go, I got this error message:
    ​​Check and repair partition ‘/dev/sdb2’ (1,82 TiB, ntfs)

    Job: Check file system on partition ‘/dev/sdb2’

    Command: ntfsresize --no-progress-bar --info --force --verbose /dev/sdb2
    Check file system on partition ‘/dev/sdb2’: Error
    Check and repair partition ‘/dev/sdb2’ (1,82 TiB, ntfs): Error


    I've tried looking around online for possible solutions to this issue, but those things I've found either seem above my skill level or commands I'm not sure I feel comfortable trying, since I don't quite know what they do. Since I have no important files on this drive and am fine with reinstalling games, I'm not opposed to wiping it, but ideally I'd prefer if there was a less nuclear option first. I feel like there should be a simple command to check the disk, remove bad superblocks or other issues, and remount it, though I may of course be off here. Any help is appreciated, and if you need more info I'd of course be happy to provide!

    #2
    You could try ntfsfix, which is in the package ntfs-3g.

    But for a comprehensive repair, maybe booting Windows somehow would be best. If you don't have a windows install anywhere, in principle you can use Windows PE; I haven't resorted to that for many years (for which I am thankful).

    If you fail at recovering the volume, the partition manager can remove the partition allowing you to create a new one in its place.
    Regards, John Little

    Comment


      #3
      Originally posted by jlittle View Post
      You could try ntfsfix, which is in the package ntfs-3g.

      But for a comprehensive repair, maybe booting Windows somehow would be best. If you don't have a windows install anywhere, in principle you can use Windows PE; I haven't resorted to that for many years (for which I am thankful).

      If you fail at recovering the volume, the partition manager can remove the partition allowing you to create a new one in its place.
      Thank you! I tried installing the ntfs-3g package and running ntfsfix, but it didn't work. The message I got after running it was:

      ~$ sudo ntfsfix /dev/sdb2
      Mounting volume... $MFTMirr does not match $MFT (record 3).
      FAILED
      Attempting to correct errors...
      Processing $MFT and $MFTMirr...
      Reading $MFT... OK
      Reading $MFTMirr... OK
      Comparing $MFTMirr to $MFT... FAILED
      Correcting differences in $MFTMirr record 3...OK
      Processing of $MFT and $MFTMirr completed successfully.
      Setting required flags on partition... OK
      Going to empty the journal ($LogFile)... OK
      Checking the alternate boot sector... OK
      NTFS volume version is 3.1.
      NTFS partition /dev/sdb2 was processed successfully


      When I tried to mount the disk again, the same error message as in my first post appeared.

      I'm going to make a Win10 installation media and set it up in VirtualBox, but that'd probably be later this week. I'll update the thread as I go.

      ETA: Since the disk is NTFS, is this likely to happen again in the future?

      If it is, I think I might just wanna cut my losses and fully format it. The worst thing I have to do is reinstall some games and that really doesn't bother me, it's just a minor annoyance in the grand scheme of things.
      Last edited by viavenator; Sep 30, 2025, 04:13 AM.

      Comment


        #4
        Okay, I attempted to format the disk, and I likely have done something wrong in the process.

        I went to "Reformat or edit with partition manager", right-clicked the /dev/sbd2 NTFS partition, went into Properties and changed the partition to ext4. Also clicked Delete on a small Windows partition on the drive, which might have been foolish of me, but I thought it was necessary to make sure it'd run on Linux. I then clicked Apply and the disk was formatted. I mounted it and it seemed to be there, however, my system says it ain't so. First I tried to rename it from "Basic data partition" to "Games":

        ~$ sudo e2label /dev/sdb "Games"

        e2label: Bad magic number in super-block while trying to open /dev/sdb
        Found a gpt partition table in /dev/sdb

        ~$ sudo e2label /dev/sbd2 "Games"
        e2label: No such file or directory while trying to open /dev/sbd2
        Couldn't find valid filesystem superblock.​


        I then checked the KDE partition manager again. Now there's a lock symbol on the mount (see attachments) There is this lost+found folder on the drive, and I have to act as admin to access it; however, it's empty. I also tried to save a document to the drive to see if it was working at all and got the error message in the final attachment.

        So, clearly I did something wrong when trying to format the SSD. I'm a bit wary of fiddling more with it; I'm kind of tempted to delete the "lost+found" folder to see what happens then.

        So, how do I properly set up the SSD so it's both fully Linux-compatible and so I can access and save things to it?






        Attached Files

        Comment


          #5
          Possibly the partition table is screwy; if there's nothing else on that volume you need to keep you could get the partition manager to write a new GPT. If there are data you want to keep, ensuring it is backed up would be good.

          But, in general, if a newly created partition is throwing errors like that, I'd expect hardware failure. In theory you could investigate that using journalctl.
          Regards, John Little

          Comment


            #6
            Thank you very much! My SSD's warranty is still valid, so I've opened a claim there to have it checked out in case that's what it is. I'm holding off with further investigations until they're getting back to me, and will update the thread accordingly. Really appreciate your advice so far.

            Comment


              #7
              Okay, I'm back at it, done some reading and testing to learn more about troubleshooting Kubuntu. I've tried a few different things and have run into a roadblock with dmesg. I think that's what I'll need help with, but gonna take you through what I've done so far.

              I ran smartctl -a /dev/sbd and smartctl -t (short/long) /dev/sbd, both the short 2 minute test and the long 160 minute test, and both tests were completed without error. So, I think the hardware itself is fine. Maybe the SATA cable is faulty, who knows?

              In journalctl, I dug up the logs from the time of the kernel panic. I think this excerpt here is from when I clicked "Install" and the Games drive wasn't mounted:

              sep. 29 21:22:47 Desktop systemd-sysv-generator[1418]: SysV service '/etc/init.d/virtualbox' lacks a native systemd unit file, automatically generating a unit file for compatibility.
              sep. 29 21:22:47 Desktop systemd-sysv-generator[1418]: Please update package to include a native systemd unit file.
              sep. 29 21:22:47 Desktop systemd-sysv-generator[1418]: ! This compatibility logic is deprecated, expect removal soon. !
              sep. 29 21:22:47 Desktop kernel: [drm] Fence fallback timer expired on ring sdma0​


              Then the point of the crash itself. I think what's happening at 21:23:07 is when Steam was actually downloading/installing the game, and at 21:23:18 is likely when I realized the SSD wasn't mounted and tried to mount it.

              sep. 29 21:23:07 Desktop kernel: vboxdrv: loading out-of-tree module taints kernel.
              sep. 29 21:23:07 Desktop kernel: vboxdrv: module verification failed: signature and/or required key missing - tainting kernel
              sep. 29 21:23:07 Desktop kernel: vboxdrv: Found 16 processor cores/threads
              sep. 29 21:23:07 Desktop kernel: vboxdrv: TSC mode is Invariant, tentative frequency 3600000000 Hz
              sep. 29 21:23:07 Desktop kernel: vboxdrv: Successfully loaded version 7.0.20_Ubuntu r163906 (interface 0x00330004)
              sep. 29 21:23:07 Desktop kernel: VBoxNetFlt: Successfully started.
              sep. 29 21:23:07 Desktop kernel: VBoxNetAdp: Successfully started.
              sep. 29 21:23:11 Desktop systemd-journald[462]: File /var/log/journal/
              sep. 29 21:23:18 Desktop kernel: ntfs3: Enabled Linux POSIX ACLs support
              sep. 29 21:23:18 Desktop kernel: ntfs3: Read-only LZX/Xpress compression included
              sep. 29 21:23:18 Desktop kernel: ntfs3(sdb2): It is recommened to use chkdsk.
              sep. 29 21:23:18 Desktop kernel: ntfs3(sdb2): volume is dirty and "force" flag is not set!
              sep. 29 21:23:28 Desktop kernel: ntfs3(sdb2): It is recommened to use chkdsk.
              sep. 29 21:23:28 Desktop kernel: ntfs3(sdb2): volume is dirty and "force" flag is not set!
              sep. 29 21:23:46 Desktop kernel: ntfs3(sdb2): It is recommened to use chkdsk.
              sep. 29 21:23:46 Desktop kernel: ntfs3(sdb2): volume is dirty and "force" flag is not set!


              I don't think there's anything more of interest in the crash log, but please let me know if there's something I should be looking out for.

              This brings me back to dmesg. If I try to just run plain dmesg, I get the message dmesg: read kernel buffer failed: Operation not permitted. I saw sudo sysctl kernel.dmesg_restrict=0 suggested as per this thread, but I don't get any different results in dmesg after running it. The only results I get are my Xbox controller disconnecting and reconnecting, and ten thousand lines of AppArmor denying whatever spammy stuff the Discord snap is trying to attempt. I've tried to filter for specific stuff, such as sudo dmesg -k | grep -i amdgpu​. I get absolutely nothing useful

              So, can you fine folks help me gain access to my kernel logs?

              Last edited by viavenator; Oct 03, 2025, 03:03 PM.

              Comment


                #8
                Originally posted by viavenator View Post

                sep. 29 21:23:46 Desktop kernel: ntfs3(sdb2): It is recommened to use chkdsk.
                sep. 29 21:23:46 Desktop kernel: ntfs3(sdb2): volume is dirty and "force" flag is not set!

                Seems obvious you have to deal with this first.

                Please Read Me

                Comment


                  #9
                  Originally posted by oshunluvr View Post

                  Seems obvious you have to deal with this first.
                  Thanks! I was under the faulty assumption that formatting the disk and changing the partition to a format that works better on Linux would be a "clean reset", including for issues. Might not have time to run Windows and chkdsk before sometime next week, but will report back then.

                  Comment


                    #10
                    Originally posted by viavenator View Post

                    Thanks! I was under the faulty assumption that formatting the disk and changing the partition to a format that works better on Linux would be a "clean reset", including for issues. Might not have time to run Windows and chkdsk before sometime next week, but will report back then.
                    Yes, reformatting the disk would remove the ntfs error, but you need to reformat it. Boot to the Live USB and delete the existing partition(s) then run the installer.

                    Please Read Me

                    Comment


                      #11
                      Originally posted by viavenator View Post
                      I was under the faulty assumption that formatting the disk and changing the partition to a format that works better on Linux would be a "clean reset", including for issues. .
                      To get a clean reset, write a new partition table. To get a really clean reset, use dd write zeros to the device before that, being very careful you've got the correct device.
                      Regards, John Little

                      Comment


                        #12
                        Originally posted by oshunluvr View Post

                        Yes, reformatting the disk would remove the ntfs error, but you need to reformat it. Boot to the Live USB and delete the existing partition(s) then run the installer.
                        Thank you! Got some unexpected time on my hands, so I created a Windows live USB and reformatted the SSD (adding the steps I went through at the end of the post) as a first attempt. Not sure I understood exactly how to delete the partitions from a live USB, so I'll have to research that more. It now runs as a NTFS file system again. I have saved some test files to it, installed and booted a game, and there are no issues I can see. Is it fine to keep it like this, or would you recommend changing the file system to ext4? Is the KDE Partition Manager the recommended way to change the file system? This SSD doesn't run any OS, it's just for games.

                        This brings me back to dmesg. At first I got another dmesg: read kernel buffer failed: Operation not permitted, but this time sudo sysctl kernel.dmesg_restrict=0 seems to have worked. However, I once again find nothing of use in there, I only get numerous lines of apparmor="DENIED" about the Discord snap. From the threads I've found online, it seems like running the sysctl command fixed the issue for most users, but it doesn't seem to be the case for me. I can't see anything useful in there at all. I'd like to investigate not only my drive, but also my GPU, since I did find this in the crashlog (quoted earlier in the thread): sep. 29 21:22:47 Desktop kernel: [drm] Fence fallback timer expired on ring sdma0​

                        Though the SSD now works, I don't think I'm quite out of the woods yet, at least not until I can review the info in dmesg and possibly change it to an ext4 file system. I really do appreciate your help and patience with this, both of you! Troubleshooting my first SSD crash ever less than a month into a new OS is admittedly a bit overwhelming, but I'm learning a lot from this.

                        So, just a quick summary of the steps I went through with the live USB:

                        Booted from it. When the Install screen came up, I chose Next -> Repair your computer -> Troubleshoot -> Command prompt. In the command prompt, I entered the following commands:

                        diskpart

                        list volume

                        select volume 1 (the SSD)

                        format fs=ntfs quick


                        After a successful formatting, I shut down the computer, removed the USB, and rebooted.
                        Last edited by viavenator; Oct 05, 2025, 01:26 PM.

                        Comment


                          #13
                          Seriously, unless you're sharing the drive space with a Windows install, get rid of NTFS. Using it with Linux is a pain at best. Lack of tools, minimal driver support, poor performance, etc.

                          Please Read Me

                          Comment

                          Users Viewing This Topic

                          Collapse

                          There are 0 users viewing this topic.

                          Working...
                          X