LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 10-14-2016, 04:39 AM   #16
gairsty
LQ Newbie
 
Registered: Oct 2016
Distribution: bunsenlabs & raspbian
Posts: 13

Original Poster
Rep: Reputation: Disabled

ls -l /dev/root
Quote:
lrwxrwxrwx 1 root root 9 Jul 19 09:17 /dev/root -> mmcblk0p2
 
Old 10-14-2016, 04:48 AM   #17
c0wb0y
Member
 
Registered: Jan 2012
Location: Inside the oven
Distribution: Windows
Posts: 417

Rep: Reputation: 74
Hmm... puzzling but interesting at the same time. Any custom scripts at /etc/rc.local or whatever it is called? crontabs that might be purging something, and also if you can post unredacted output of ps so we can see any strange-looking processes.

I would love to say, don't give up. It's very challenging indeed.
 
Old 10-16-2016, 01:02 PM   #18
gairsty
LQ Newbie
 
Registered: Oct 2016
Distribution: bunsenlabs & raspbian
Posts: 13

Original Poster
Rep: Reputation: Disabled
Challenging? Certainly!
Here's the output from ps aux
Quote:
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.2 2164 1288 ? Ss Oct13 0:11 init [2]
root 2 0.0 0.0 0 0 ? S Oct13 0:00 [kthreadd]
root 3 0.0 0.0 0 0 ? S Oct13 2:54 [ksoftirqd/0]
root 5 0.0 0.0 0 0 ? S< Oct13 0:00 [kworker/0:0H]
root 7 0.0 0.0 0 0 ? S< Oct13 0:00 [khelper]
root 8 0.0 0.0 0 0 ? S Oct13 0:00 [kdevtmpfs]
root 9 0.0 0.0 0 0 ? S< Oct13 0:00 [netns]
root 10 0.0 0.0 0 0 ? S< Oct13 0:00 [perf]
root 11 0.0 0.0 0 0 ? S Oct13 0:00 [khungtaskd]
root 12 0.0 0.0 0 0 ? S< Oct13 0:00 [writeback]
root 13 0.0 0.0 0 0 ? S< Oct13 0:00 [crypto]
root 14 0.0 0.0 0 0 ? S< Oct13 0:00 [bioset]
root 15 0.0 0.0 0 0 ? S< Oct13 0:00 [kblockd]
root 17 0.0 0.0 0 0 ? S< Oct13 0:00 [rpciod]
root 18 0.0 0.0 0 0 ? S Oct13 0:21 [kswapd0]
root 19 0.0 0.0 0 0 ? S Oct13 0:00 [fsnotify_mark]
root 20 0.0 0.0 0 0 ? S< Oct13 0:00 [nfsiod]
root 26 0.0 0.0 0 0 ? S< Oct13 0:00 [kthrotld]
root 27 0.0 0.0 0 0 ? S< Oct13 0:00 [VCHIQ-0]
root 28 0.0 0.0 0 0 ? S< Oct13 0:00 [VCHIQr-0]
root 29 0.0 0.0 0 0 ? S< Oct13 0:00 [VCHIQs-0]
root 30 0.0 0.0 0 0 ? S< Oct13 0:00 [iscsi_eh]
root 31 0.0 0.0 0 0 ? S< Oct13 0:00 [dwc_otg]
root 32 0.0 0.0 0 0 ? S< Oct13 0:00 [DWC Notificatio]
root 34 0.0 0.0 0 0 ? S Oct13 0:00 [VCHIQka-0]
root 35 0.0 0.0 0 0 ? S< Oct13 0:00 [deferwq]
root 38 0.0 0.0 0 0 ? S Oct13 0:32 [mmcqd/0]
root 39 0.0 0.0 0 0 ? S Oct13 0:11 [jbd2/mmcblk0p2-]
root 40 0.0 0.0 0 0 ? S< Oct13 0:00 [ext4-rsv-conver]
root 92 0.0 0.0 0 0 ? S Oct13 0:00 [scsi_eh_0]
root 93 0.0 0.0 0 0 ? S< Oct13 0:00 [scsi_tmf_0]
root 94 0.0 0.0 0 0 ? S Oct13 0:27 [usb-storage]
root 114 0.0 0.0 0 0 ? S Oct13 0:00 [scsi_eh_1]
root 116 0.0 0.0 0 0 ? S< Oct13 0:00 [scsi_tmf_1]
root 117 0.0 0.0 0 0 ? S Oct13 0:14 [usb-storage]
root 141 0.0 0.0 0 0 ? S Oct13 0:00 [scsi_eh_2]
root 142 0.0 0.0 0 0 ? S< Oct13 0:00 [scsi_tmf_2]
root 143 0.0 0.0 0 0 ? S Oct13 0:03 [usb-storage]
root 164 0.0 0.4 3060 2076 ? Ss Oct13 0:00 udevd --daemon
root 300 0.0 0.3 2924 1820 ? S Oct13 0:00 udevd --daemon
root 305 0.0 0.3 2924 1820 ? S Oct13 0:00 udevd --daemon
root 412 0.0 0.0 0 0 ? S< Oct13 0:00 [kworker/0:1H]
root 1557 0.0 0.2 1768 1008 ? S Oct13 3:07 /usr/sbin/ifplugd -i eth0 -q -f -u0 -d10 -w -I
root 1605 0.0 0.2 1768 1088 ? S Oct13 0:39 /usr/sbin/ifplugd -i lo -q -f -u0 -d10 -w -I
root 1858 0.0 0.6 4916 3172 ? Ss Oct13 0:00 dhclient -v -pf /run/dhclient.eth0.pid -lf /var/lib/dhcp/dhclient.eth0.leases eth0
root 1977 0.0 0.5 28380 2660 ? Sl Oct13 1:41 /usr/sbin/rsyslogd -c5
root 2024 0.0 0.3 3816 1712 ? Ss Oct13 0:01 /usr/sbin/cron
root 2029 0.0 0.4 4908 2116 ? S Oct13 0:00 /USR/SBIN/CRON
pi 2040 0.0 0.1 1776 956 ? Ss Oct13 0:00 /bin/sh -c /home/pi/scripts/poke.sh
pi 2049 0.0 0.4 4284 2224 ? S Oct13 0:00 /bin/bash /home/pi/scripts/poke.sh
pi 2060 0.0 0.2 1852 1128 ? S Oct13 0:00 inotifywait -e modify,attrib,move,close_write,create,delete /home/pi/.poke
pi 2066 0.5 3.8 100816 18796 ? Ssl Oct13 25:58 /home/pi/.btsync/btsync --webui.listen 0.0.0.0:8888
104 2082 0.0 0.4 3304 2016 ? Ss Oct13 0:01 /usr/bin/dbus-daemon --system
root 2386 0.0 0.5 30872 2916 ? Sl Oct13 0:00 /usr/sbin/lightdm
root 2410 0.0 1.1 16612 5576 tty7 Ss+ Oct13 0:09 /usr/bin/X :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
root 2424 0.0 0.6 15500 3152 ? Sl Oct13 0:00 lightdm --session-child 11 14
root 2427 0.0 0.8 27752 4388 ? Sl Oct13 0:01 /usr/sbin/console-kit-daemon --no-daemon
root 2494 0.0 0.6 31092 3416 ? Sl Oct13 0:00 /usr/lib/policykit-1/polkitd --no-debug
pi 2513 0.0 0.3 12884 1844 ? Ssl Oct13 0:00 /usr/bin/lxsession -s LXDE -e LXDE
pi 2523 0.0 0.1 3548 792 ? Ss Oct13 0:02 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session x-session-manager
pi 2526 0.0 0.2 3392 1292 ? S Oct13 0:00 /usr/bin/dbus-launch --exit-with-session x-session-manager
pi 2527 0.0 0.3 3172 1536 ? Ss Oct13 0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
pi 2533 0.0 0.8 14972 4180 ? S Oct13 0:03 openbox --config-file /home/pi/.config/openbox/lxde-rc.xml
pi 2535 0.0 1.1 81828 5564 ? S Oct13 0:56 lxpanel --profile LXDE
pi 2536 0.0 1.3 103460 6596 ? Sl Oct13 0:01 pcmanfm --desktop --profile LXDE
pi 2539 0.0 0.7 25800 3740 ? Sl Oct13 0:00 /usr/lib/arm-linux-gnueabihf/lxpolkit
pi 2544 0.0 0.5 8560 2624 ? S Oct13 0:00 /usr/lib/gvfs/gvfsd
pi 2549 0.0 0.5 14820 2824 ? Sl Oct13 0:20 /usr/lib/arm-linux-gnueabihf/libmenu-cache1/libexec/menu-cached
pi 2557 0.0 0.7 42532 3856 ? Sl Oct13 0:08 /usr/lib/gvfs/gvfs-gdu-volume-monitor
root 2560 0.0 0.7 23064 3704 ? Sl Oct13 0:44 /usr/lib/udisks/udisks-daemon
root 2561 0.0 0.3 6356 1692 ? S Oct13 0:00 udisks-daemon: not polling any devices
pi 2564 0.0 0.5 9088 2756 ? S Oct13 0:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
pi 2566 0.0 0.5 19364 2920 ? Sl Oct13 0:49 /usr/lib/gvfs/gvfs-afc-volume-monitor
root 2570 0.0 0.0 0 0 ? S Oct13 0:00 [jbd2/sdb1-8]
root 2571 0.0 0.0 0 0 ? S< Oct13 0:00 [ext4-rsv-conver]
root 2578 0.0 0.0 0 0 ? S Oct13 0:00 [jbd2/sdc1-8]
root 2579 0.0 0.0 0 0 ? S< Oct13 0:00 [ext4-rsv-conver]
root 2583 0.0 0.0 0 0 ? S Oct13 0:00 [jbd2/sda1-8]
root 2584 0.0 0.0 0 0 ? S< Oct13 0:00 [ext4-rsv-conver]
ntp 2599 0.0 0.5 5540 2948 ? Ss Oct13 0:45 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 102:104
root 2705 0.0 0.5 9948 2956 ? Ss Oct13 0:17 /usr/sbin/nmbd -D
root 2707 0.0 0.5 6236 2868 ? Ss Oct13 0:11 /usr/sbin/sshd
root 2731 0.0 1.0 19028 5332 ? Ss Oct13 0:39 /usr/sbin/smbd -D
nobody 2743 0.0 0.2 2036 1448 ? Ss Oct13 0:04 /usr/sbin/thd --daemon --triggers /etc/triggerhappy/triggers.d/ --socket /var/run/thd.socket --pidfile /var/run/thd.pid --user nobody /dev/input/event*
root 2747 0.0 0.6 19440 3224 ? S Oct13 0:00 /usr/sbin/smbd -D
root 2796 0.0 0.3 3764 1512 tty1 Ss+ Oct13 0:00 /sbin/getty --noclear 38400 tty1
root 2797 0.0 0.3 3764 1536 tty2 Ss+ Oct13 0:00 /sbin/getty 38400 tty2
root 2798 0.0 0.2 3764 1472 tty3 Ss+ Oct13 0:00 /sbin/getty 38400 tty3
root 2799 0.0 0.3 3764 1600 tty4 Ss+ Oct13 0:00 /sbin/getty 38400 tty4
root 2800 0.0 0.3 3764 1600 tty5 Ss+ Oct13 0:00 /sbin/getty 38400 tty5
root 2801 0.0 0.3 3764 1580 tty6 Ss+ Oct13 0:00 /sbin/getty 38400 tty6
root 2802 0.0 0.3 2084 1528 ? Ss+ Oct13 0:00 /sbin/getty -L ttyAMA0 115200 vt100
root 3829 0.0 0.0 0 0 ? S 04:15 0:00 [kworker/0:0]
root 10955 0.0 0.0 0 0 ? S 17:15 0:01 [kworker/0:2]
root 11457 0.0 0.0 0 0 ? S 18:19 0:01 [kworker/u2:1]
root 11648 0.0 0.0 0 0 ? S 18:45 0:00 [kworker/u2:0]
root 11668 0.0 0.9 9828 4752 ? Ss 18:48 0:00 sshd: pi [priv]
pi 11679 0.0 0.7 9828 3620 ? S 18:48 0:00 sshd: pi@pts/0
pi 11680 0.3 0.9 6196 4492 pts/0 Ss 18:48 0:01 -bash
pi 11895 0.0 0.4 4476 1988 pts/0 R+ 18:58 0:00 ps aux
root 15171 0.0 1.6 21848 8048 ? S Oct14 0:57 /usr/sbin/smbd -D
 
Old 10-16-2016, 02:18 PM   #19
gairsty
LQ Newbie
 
Registered: Oct 2016
Distribution: bunsenlabs & raspbian
Posts: 13

Original Poster
Rep: Reputation: Disabled
[COLOR="Black"]Now then, whilst comparing and contrasting my two raspis, I spotted this in kern.log,
in my 'faulty' raspi, cat /var/log/kern.log | grep mmc gives me,
Quote:
Jul 19 09:17:17 NASPi1 kernel: [ 0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0xe bcm2708.serial=0xa6645f41 smsc95xx.macaddr=B8:27:EB:64:5F:41 bcm2708_fb.fbswap=1 bcm2708.uart_clock=3000000 vc_mem.mem_base=0x1fa00000 vc_mem.mem_size=0x20000000 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
Jul 19 09:17:17 NASPi1 kernel: [ 1.742618] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
Jul 19 09:17:17 NASPi1 kernel: [ 1.950258] Waiting for root device /dev/mmcblk0p2...
Jul 19 09:17:17 NASPi1 kernel: [ 1.963038] mmc0: host does not support reading read-only switch, assuming write-enable
Jul 19 09:17:17 NASPi1 kernel: [ 1.976551] mmc0: new high speed SDHC card at address 59b4
Jul 19 09:17:17 NASPi1 kernel: [ 1.984652] mmcblk0: mmc0:59b4 NCard 14.7 GiB
Jul 19 09:17:17 NASPi1 kernel: [ 1.992712] mmcblk0: p1 p2
Jul 19 09:17:17 NASPi1 kernel: [ 2.065806] EXT4-fs (mmcblk0p2): INFO: recovery required on readonly filesystem
Jul 19 09:17:17 NASPi1 kernel: [ 2.075039] EXT4-fs (mmcblk0p2): write access will be enabled during recovery
Jul 19 09:17:17 NASPi1 kernel: [ 2.718164] EXT4-fs (mmcblk0p2): orphan cleanup on readonly fs
Jul 19 09:17:17 NASPi1 kernel: [ 2.774527] EXT4-fs (mmcblk0p2): 8 orphan inodes deleted
Jul 19 09:17:17 NASPi1 kernel: [ 2.781917] EXT4-fs (mmcblk0p2): recovery complete

Jul 19 09:17:17 NASPi1 kernel: [ 2.800328] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
Jul 19 09:17:17 NASPi1 kernel: [ 11.035261] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Jul 19 09:17:17 NASPi1 kernel: [ 11.414058] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Jul 19 09:17:17 NASPi1 kernel: [ 17.729118] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
whereas the same command on a normally functioning raspi gives me,
Quote:
Oct 16 19:45:01 NASPi2 kernel: [ 0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0x2 bcm2708.serial=0x249e1c0 smsc95xx.macaddr=B8:27:EB:49:E1:C0 bcm2708_fb.fbswap=1 bcm2708.uart_clock=3000000 vc_mem.mem_base=0xfa00000 vc_mem.mem_size=0x10000000 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
Oct 16 19:45:01 NASPi2 kernel: [ 1.742490] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
Oct 16 19:45:01 NASPi2 kernel: [ 1.948904] Waiting for root device /dev/mmcblk0p2...
Oct 16 19:45:01 NASPi2 kernel: [ 1.970181] mmc0: host does not support reading read-only switch, assuming write-enable
Oct 16 19:45:01 NASPi2 kernel: [ 1.983523] mmc0: new high speed SDHC card at address b368
Oct 16 19:45:01 NASPi2 kernel: [ 1.991558] mmcblk0: mmc0:b368 NCard 14.9 GiB
Oct 16 19:45:01 NASPi2 kernel: [ 1.999823] mmcblk0: p1 p2
Oct 16 19:45:01 NASPi2 kernel: [ 2.151067] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
Oct 16 19:45:01 NASPi2 kernel: [ 10.908572] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Oct 16 19:45:01 NASPi2 kernel: [ 11.321627] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
Oct 16 19:45:01 NASPi2 kernel: [ 18.393810] FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
Do I somehow need to make /dev/mmcblk0p2 write enabled?
 
Old 10-16-2016, 03:37 PM   #20
c0wb0y
Member
 
Registered: Jan 2012
Location: Inside the oven
Distribution: Windows
Posts: 417

Rep: Reputation: 74
If the date on rpi is correct (as suggested by a running ntp as per ps output), then that section of kern.log would be irrelevant in this instance.

I am quite interested instead to this section of your ps output:

Quote:
root 2024 0.0 0.3 3816 1712 ? Ss Oct13 0:01 /usr/sbin/cron
root 2029 0.0 0.4 4908 2116 ? S Oct13 0:00 /USR/SBIN/CRON
pi 2040 0.0 0.1 1776 956 ? Ss Oct13 0:00 /bin/sh -c /home/pi/scripts/poke.sh
pi 2049 0.0 0.4 4284 2224 ? S Oct13 0:00 /bin/bash /home/pi/scripts/poke.sh
pi 2060 0.0 0.2 1852 1128 ? S Oct13 0:00 inotifywait -e modify,attrib,move,close_write,create,delete /home/pi/.poke
Not sure if you really have that CRON process and if that location is indeed existing?
 
Old 10-17-2016, 02:23 AM   #21
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,685

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
I would suggest you to put it into another os as a normal sdcard and run fsck.
 
Old 10-18-2016, 01:32 PM   #22
gairsty
LQ Newbie
 
Registered: Oct 2016
Distribution: bunsenlabs & raspbian
Posts: 13

Original Poster
Rep: Reputation: Disabled
c0wb0y - I presume you're referring to /USR/SBIN/CRON. No, it doesn't exist. Why's it running and is it causing the issue?

pan64 - I've just tried putting the SD card into my laptop and it won't mount. When I have some time, I'll try it in another laptop, as well as booting it up in another raspi.
If I can't get this sorted soon, I'll just wipe it and start again, which would be very dull.
 
Old 10-19-2016, 08:04 AM   #23
gairsty
LQ Newbie
 
Registered: Oct 2016
Distribution: bunsenlabs & raspbian
Posts: 13

Original Poster
Rep: Reputation: Disabled
progress..?

Ok, I have got the card to mount on my ubuntu laptop. I've tried various options with fsck and e2fsck.

Quote:
fsck -n /dev/mmc*

fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/mmcblk0

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>

fsck.fat 3.0.28 (2015-05-16)
0x25: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt.
Automatically removing dirty bit.
Leaving filesystem unchanged.
/dev/mmcblk0p1: 79 files, 2543/7161 clusters
e2fsck 1.42.13 (17-May-2015)
Warning: skipping journal recovery because doing a read-only filesystem check.
/dev/mmcblk0p2: clean, 87237/966656 files, 1521132/3846912 blocks
I ran both e2fsck -b 8193 and 32768.

It looks like the card is corrupted somewhere, somehow. Any guidance on how to deploy fsck and e2fsck to fix this would be gratefully appreciated.

Before running fsck, I dd'ed the sdcard. Is the corruption picked up in dd? Would I be able to put the image onto the card if I reformatted it?

Thanks again for the support so far.

(The card exhibits the same problems, regardless of which raspi it's plugged into.)

Last edited by gairsty; 10-20-2016 at 03:50 AM. Reason: update with more info
 
Old 11-14-2016, 02:14 AM   #24
gairsty
LQ Newbie
 
Registered: Oct 2016
Distribution: bunsenlabs & raspbian
Posts: 13

Original Poster
Rep: Reputation: Disabled
End result

I put the image of the raspi onto another card - still no success.
So, as I needed the raspi to be working, I reinstalled raspbian and all is well.

I can only conclude that somewhere, somehow the card had got corrupted, I'm just sorry there wasn't a clear cut solution.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"random" xorg resets ... quickly typing in the GUI a "2" resets X Tinkster Slackware 3 04-09-2010 04:25 AM
LXer: A response to Patrick Durusau: Who Loses If OpenXML Loses? LXer Syndicated Linux News 0 03-26-2008 11:50 AM
LXer: A response to Patrick Durusau: Who Loses If OpenXML Loses? LXer Syndicated Linux News 0 03-26-2008 09:20 AM
LXer: A response to Patrick Durusau: Who Loses If OpenXML Loses? LXer Syndicated Linux News 0 03-26-2008 08:20 AM
LXer: A response to Patrick Durusau: Who Loses If OpenXML Loses? LXer Syndicated Linux News 0 03-26-2008 05:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 04:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration