LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux Crashed? (https://www.linuxquestions.org/questions/linux-newbie-8/linux-crashed-4175572069/)

chris_crunch 02-12-2016 04:56 AM

Linux Crashed?
 
When I started the computer up this morning, it said something along the lines of...

Code:

There's an error in the /home directory...
File system check or mount failed. A maintenance shell will now be started...

I'm paraphrasing, but I did something like tell it to check and fix errors, and it's working again.

Umm... what do I do? Is it possible to run hardware diagnostics to try and fix some stuff?

wpeckham 02-12-2016 05:34 AM

Need More Data.
 
That does not sound like a hardware failure, hardware is not fixed by running software.
It sounds like you might have had a slight partition or file system corruption that fsck was able to repair. If that is the case, there may be nothing more to do now. I am more worried about preventing the problem going forward.

Have you seen this before?
What was your shutdown procedure during the preceding session?
How is this machine normally used?

And perhaps most important:
Can you tell us anything about that partition or file system?

jpollard 02-12-2016 07:48 AM

Did you complete a shutdown the previous night?

The errors are typical of what you would see with an incomplete shutdown before powering off.

jefro 02-12-2016 04:42 PM

Usually it's an issue with power down agreed.

Can check smart status on drive.

Ztcoracat 02-12-2016 06:51 PM

https://wiki.archlinux.org/index.php/S.M.A.R.T.

frankbell 02-12-2016 07:51 PM

Sounds as if the computer at boot noted that one or more partitions need to have an fsck (file system check, sort of similar to DOS/Windows checkdisk) run on it. Whatever you did gave permission for the fsck, and not everything is hunky-dory.

See man fsck for more.

chris_crunch 02-17-2016 07:21 AM

Hey guys, was out for a while- busy with personal related issues and what not. Sorry for the late reply.
Okay, back to this issue. Hmmm. Well I tried this and shat my pants a litle. I really am a linux newbie.

Code:

chris@chris-crunch:~/apps/caffe-master$ fsck
fsck from util-linux 2.20.1
e2fsck 1.42.9 (4-Feb-2014)
/dev/sda1 is mounted.



WARNING!!!  The filesystem is mounted.  If you continue you ***WILL***
cause ***SEVERE*** filesystem damage.


Do you really want to continue<n>? no
check aborted.
e2fsck 1.42.9 (4-Feb-2014)
/dev/sdb6 is mounted.



WARNING!!!  The filesystem is mounted.  If you continue you ***WILL***
cause ***SEVERE*** filesystem damage.


Do you really want to continue<n>? no
check aborted.
e2fsck 1.42.9 (4-Feb-2014)
/dev/sdb7 is mounted.



WARNING!!!  The filesystem is mounted.  If you continue you ***WILL***
cause ***SEVERE*** filesystem damage.


Do you really want to continue<n>? no
check aborted.
e2fsck 1.42.9 (4-Feb-2014)
/dev/sdb1 is mounted.



WARNING!!!  The filesystem is mounted.  If you continue you ***WILL***
cause ***SEVERE*** filesystem damage.


Do you really want to continue<n>? no
check aborted.

So I rapidly clicked no, no, ...

At the minute the computer is working fine for the most part. Although it does crash from time to time (not when I'm doing anything specific).

Then when I turn it on I get SIX messages on the desktop saying

Quote:

"A problem with your system was detected. Do you wish to file a report?"
or something like that. At which point I close the boxes and carry on doing what I'm doing...
Currently I'm sitting here googling this stuff to get a better idea of what the heck is going on.
If you need more specific information from me I will provide it.


So... by that message, it looks like the computer is partitioned into 4 drives? That are mounted? Hmmm...so do I need to unmount before performing an fsck...

Yes, it was an incomplete shutdown. I have this bloody 'dell' monitor that sometimes goes into powersave mode for no reason, and the only way to get it working again is to manually shutdown the computer and reboot it. I've no idea how to fix this issue, I've googled it and it seems a lot of people are having it. But I hope the force shutting down (which I regularly have to do, like once a day) won't cause permanent damage to the computer...

chris_crunch 02-17-2016 07:27 AM

This may be useful?
Code:

chris@chris-crunch:~/apps/caffe-master$ mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
/dev/sdb6 on /data1 type ext4 (rw)
/dev/sdb7 on /data2 type ext4 (rw)
/dev/sdb1 on /home type ext4 (rw)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=chris)

(What on earth does this mean... :( :( )

jpollard 02-17-2016 08:39 AM

Quote:

Originally Posted by chris_crunch (Post 5501577)
This may be useful?
Code:

chris@chris-crunch:~/apps/caffe-master$ mount
/dev/sda1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
none on /sys/fs/pstore type pstore (rw)
/dev/sdb6 on /data1 type ext4 (rw)
/dev/sdb7 on /data2 type ext4 (rw)
/dev/sdb1 on /home type ext4 (rw)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=chris)

(What on earth does this mean... :( :( )

This is a list of all filesystems that have been mounted.

The first column is the device the data resides on. Entries:
"proc","sysfs", "none","devpts","tmpfs","systemd", and "gvfsd-fuse" are not disk based filesystems.

proc - mapps a filesystem view into the kernel proc table, and various other kernel data structures.
sysfs - kernel data structures (monitoring and tuning)
"none" - no device is associated. These frequently are identified as "type tmpfs" because tmpfs is memory allocated for use to hold arbitrary data.
devpts - pseudo terminal device tables
tmpfs - used for various things (it is just named tmpfs, it isn't a real device) systemd uses tmpfs for scratch data that is discarded at each shutdown.
systemd - named for systemd usage for CPU scheduling control.

The "on" list is where in the filesystem hierarchy the particular mount is put for access.

The "type" is the filesystem structure being mounted, hence ext4 for some disks. Each different filesystem has a designated name (the list of what is recognized by the kernel is in /proc/filesystems; note not all filesystems are kernel based - thus the "system" and gvfsd-fuse" are not kernel, but provided by a daemon for information/control).

The parts in parenthesis are options passed to the filesystem.

jpollard 02-17-2016 08:46 AM

Now, back to the fsck...

Normally, you would NOT use fsck to repair a mounted filesystem. The problem is that fsck bypasses the kernel filesystem to rebuild things - and a mounted filesystem will have data copied into the kernel. Having two paths that write to the same filesystem WILL cause corruption of that filesystem.

It WORKS if the filesystem is mounted read-only because then, anything copied into the kernel will NOT be modified by the kernel. Thus only one write path would exist. It is also strongly recommended that immediately after fixing such a filesystem that the system be rebooted (using the data the kernel has copied might not work... as the disk resident data may have been modified, and things won't match what the kernel expects).

Normally fsck runs are done at single user mode - where only ONE disk based filesystems is mounted (root), and that one is usually mounted read only (thus can be fixed, with an immediate reboot afterward). If root is mounted read/write, then don't run fsck on it. Fsck will detect when a partition is mounted, and warn you (as you found).

One other thing: Usually a filesystem will not mount if it requires fsck to be run on the disk/partition.

jpollard 02-17-2016 08:49 AM

If a monitor goes into "power save" with no reason, you usually have a video card problem (though a bad cable can do it too).


All times are GMT -5. The time now is 12:17 AM.