SD's, fsck, dmesg, freezing, and the Corrupt FAT-fs


 
Thread Tools Search this Thread
Operating Systems Linux Fedora SD's, fsck, dmesg, freezing, and the Corrupt FAT-fs
# 1  
Old 02-20-2017
Error SD's, fsck, dmesg, freezing, and the Corrupt FAT-fs

Up until today I haven't had a problem using an SD card with Fedora ( 25 ) but when I went to insert the SD adapter with the micro-sd card this time, the computer froze. It has frozen every time since. It is still reading the card, and after a minute or two of losing control of the GUI and terminal it mounts and I can access the files within the card. It used to mount the card with grace and ease and even performed the kindness of letting me know that the card was mounted successfully at the top of the screen. So what caused this? I don't know. It began today and today I:

Code:
sudo dnf upgrade

And from there I just modified a couple .brs files and ran them so I could go bug-hunting, and, on a side-note, enabled RPM-fusion on my system.

I don't know why any of those would cause the SD card to be read or mounted any differently, so I decided to call dmesg after inserting the card to see what I could find out.

"FAT-fs (mmcblk0p1) Volume was not properly unmounted. Some data may be corrupt. Please run fsck.". Oh so that's the problem. Well problem one led to problem two and three as when I tried to run fsck or e2fsck I got a rather cryptic warning.

/dev/mapper/fedora-root, /dev/sda1, /dev/mapper/fedora-home is mounted
Code:
WARNING!!! The filesystem is mounted. If you continue you ***WILL*** cause ***SEVERE*** filesystem damage.

Well I don't want that, abort... abort!!! When trying to unmount these filesystems so that I could run fsck and see if I could fix the corrupt filesystem I would either get:

umount: /home: ( or /root: ) umount failed: Operation not permitted ( or the target is busy )

and /dev/sda1 flat out doesn't show up.

I'm at a loss. Can anyone explain to me how I would go about fixing the sd card and preventing the temporary full system lock-up? It would be preferred if I didn't have to perform cmd gymnastics or unmount everything on the system to do so, but if it's necessary then I'll do what I must.

Last edited by Beta_OmegaAdinf; 02-20-2017 at 04:18 PM.. Reason: Title missing comma.
# 2  
Old 02-20-2017
Hi,

As a first step, what do you see in the output of df and mount, when run as 'root' or via 'sudo' ? Do you see the SD card device (which I'm guessing from the messages given earlier is going to be something like /dev/mmcblk0p1) ?

As a next step, if you don't see any traces of the SD card device being mounted, and you're sure that it isn't to the best of your knowldge, what happens when you try an fsck /dev/mmcblk0p1 as 'root' ?
# 3  
Old 02-20-2017
Error

@drysdalk

Mount:
Code:
/dev/mmcblk0p1 on /run/media/USER/UNTITLED type vfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,showexec,utf8,flush,errors=remount-ro,uhelper=udisks2)

df:
Code:
/dev/mmcblk0p1           15629312      352  15628960   1% /run/media/USER/UNTITLED/

So the problem is that it is freezing everything while it trys to mount which seems to take a while. Like I said, it successfully mounts but only after consuming 1-2 minutes of time, during which the GUI and Terminal are completely inaccessible. That's annoying and it has not done that before, so it's not so much "How do I fix the SD" though that is useful/helpful but more "What happened to cause the change in performance?"
# 4  
Old 02-20-2017
Hi,

It could still be filesystem corruption that's the issue, and so that might be an avenue that's still worth exploring. As root or via sudo can you umount /run/media/USER/UNTITLED (first ensuring you're not in that directory in any shell session, and don't have any file manager windows open showing the card contents), and then try the fsck /dev/mmcblk0p1 command as root or via sudo ? Note that as always fsck could potentially cause data loss as well as fixing issues, so ideally you'd want to have a backup of the card contents (if possible) before beginning.
This User Gave Thanks to drysdalk For This Post:
# 5  
Old 02-20-2017
Bug

Sorry I forgot to mention that I already followed the steps above. When I ran fsck /dev/mmcblk0p1 It worked and supposedly fixed my SD card, removing 11 dirty bits, but when I unmounted and put it back in, again, the entire screen froze. Mouse functionality? Gone. Keyboard functionality? No sir, I'm afraid that went out the window too. The only thing that seems to work while it's trying to mount is the power button.
Running dmesg the corrupt file system error/warning no longer shows up. Could it be a result of the update or enabling rpm-fusion?

EDIT: Thank you for suggesting a back up. I cp'd * from the card onto the computer before running fsck, after running fsck -p, removing dirty bits, and waiting for the card to load, I saw that file3.brs was missing. Thank god it was saved to the computer.

---------- Post updated at 06:44 PM ---------- Previous update was at 06:00 PM ----------

@drysdalk


Code:
mmc0: card never left busy state
mmc0: error -110 whilst initializing MMC card
mmc0:: error -110 whilst initializing SD card

Someone on StackOverflow is having a similar problem on Ubuntu which of course they very nicely reported and closed ( Seems to happen to all StackOverflow questions ) Turns out it was a bug in the kernel that was causing the SD card to freeze the computer/Not read/mount right the first time. I'm going to see if anyone has reported such a bug for fedora yet.

Last edited by Beta_OmegaAdinf; 02-20-2017 at 07:11 PM.. Reason: Courtesy reasons.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Hardware

Laptop freezing issues

I am having Laptop freezing issues. Whenever I try to use Firfox and vlc, chrome and vlc, firefox and chrome, or anything similar to that my computer freezes. I always have to kill one of the processes before I can use my laptop again. I am guessing this is a hardware issue because when I move... (5 Replies)
Discussion started by: cokedude
5 Replies

2. Solaris

unable to repair the / filesystem. Run fsck manually (fsck -F ufs /dev/rdsk/c1t0d0s0)

What can I fix this issue? I have ran below commands but everything is same.:confused: WARNING: Last shutdown is later than time on time-of-day chip: check date. The / file system (/dev/rdsk/c1t0d0s0) is being checked WARNING - unable to repair the / filesystem. Run fsck manually (fsck -F... (4 Replies)
Discussion started by: getrue
4 Replies

3. UNIX for Advanced & Expert Users

Strange FAT filesystem

My Garmin GPS device has a slot for an SD card. I'm using a 32 GB SD card which holds 22 GB data currently. If I attach my device to a USB port it shows two devices, the internal memory and the SD card. I have no problems with the internal memory which holds only 2 GB of data. I can mount... (2 Replies)
Discussion started by: HJarausch
2 Replies

4. UNIX for Advanced & Expert Users

Thousands of "unattached inode" entries freezing fsck

We have some CentOS systems with ext3 filesystems that (on occasion) experiences long power failures that are longer than the UPS can handle. We run an fsck on the file systems at every boot, and sometimes they will come back on after a power failure, and when fsck runs there are tens of thousands... (0 Replies)
Discussion started by: nothsa
0 Replies

5. UNIX for Advanced & Expert Users

/usr corrupt, can get to fsck (solaris)

I have a solaris 5.8 system, it wont boot because /usr is corrupt, which means i cannot bring up fsck to run a disk check. Any ideas? (3 Replies)
Discussion started by: frankkahle
3 Replies

6. SCO

SCO Unix 5.0.5 freezing

Hie I use SCO Unix 5.0.5 as my operating system and i have been having the following problem for the past couple of days : After every 3 hours or more , my system freezes and all users are locked out .I can not do anything even on the console . Each time i have to press the reset button... (2 Replies)
Discussion started by: babby
2 Replies

7. HP-UX

dmesg error ??

Hi all, I have a very weard error message in my dmesg output, and I cannot find the solution in google. Does anyone know what it might be ? Equivalently mapped reserve pool exhausted; Overall application performance may be improved by increasing the "eqmemsize" tunable parameter (currently... (3 Replies)
Discussion started by: davidg
3 Replies

8. UNIX for Dummies Questions & Answers

CDE freezing

I am running Solaris 8 intel and recently my Common Desktop environment will not load. I enter the root username and password at the prompt, it switches to the CDE screen and the freezes. The OpenWindows environment works fine. I tried with a regular username (not root) and I get the same resutls.... (2 Replies)
Discussion started by: dangral
2 Replies
Login or Register to Ask a Question