Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

I've tried running running a disk check, then I got a complain

pi@raspberrypi ~ $ /sbin/fsck
fsck from util-linux 2.20.1
e2fsck 1.42.5 (29-Jul-2012)
/dev/mmcblk0p2 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.
pi@raspberrypi ~ $ umount -l /dev/mmcblk0p2
umount: it seems /dev/mmcblk0p2 is mounted multiple times

Do I have to umount, what are the steps for a safe umount?

Update:

pi@raspberrypi ~ $ mount
/dev/root on / type ext4 (rw,noatime,nodiratime,user_xattr,barrier=1,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=118872k,nr_inodes=29718,mode=755)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=23788k,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=47560k)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
/dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=ascii,shortname=mixed,errors=remount-ro)

pi@raspberrypi ~ $ cat /etc/mtab
rootfs / rootfs rw 0 0
/dev/root / ext4 rw,noatime,nodiratime,user_xattr,barrier=1,data=ordered 0 0
devtmpfs /dev devtmpfs rw,relatime,size=118872k,nr_inodes=29718,mode=755 0 0
tmpfs /run tmpfs rw,nosuid,noexec,relatime,size=23788k,mode=755 0 0
tmpfs /run/lock tmpfs rw,nosuid,nodev,noexec,relatime,size=5120k 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /run/shm tmpfs rw,nosuid,nodev,noexec,relatime,size=47560k 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620 0 0
/dev/mmcblk0p1 /boot vfat rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=ascii,shortname=mixed,errors=remount-ro 0 0

pi@raspberrypi ~ $ cat /etc/fstab
proc            /proc           proc    defaults          0       0
/dev/mmcblk0p1  /boot           vfat    defaults          0       2
/dev/mmcblk0p2  /               ext4    defaults,noatime,nodiratime,nodiratime  0       1
# a swapfile is not a swap partition, so no using swapon|off from here on, use  dphys-swapfile swap[on|off]  for that

I also see this in dmesg:

[    3.054577] smsc95xx 1-1.1:1.0: eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:3a:ff:c1
[    4.592609] EXT4-fs (mmcblk0p2): ext4_orphan_cleanup: deleting unreferenced inode 47900
[    4.611794] EXT4-fs (mmcblk0p2): ext4_orphan_cleanup: deleting unreferenced inode 31567
[    4.630805] EXT4-fs (mmcblk0p2): ext4_orphan_cleanup: deleting unreferenced inode 23732
[    4.647041] EXT4-fs (mmcblk0p2): ext4_orphan_cleanup: deleting unreferenced inode 4871
[    4.662074] EXT4-fs (mmcblk0p2): ext4_orphan_cleanup: deleting unreferenced inode 4653
[    4.662256] EXT4-fs (mmcblk0p2): ext4_orphan_cleanup: deleting unreferenced inode 4514
[    4.662344] EXT4-fs (mmcblk0p2): ext4_orphan_cleanup: deleting unreferenced inode 4465
[    4.677977] EXT4-fs (mmcblk0p2): ext4_orphan_cleanup: deleting unreferenced inode 3989
[    4.678142] EXT4-fs (mmcblk0p2): 8 orphan inodes deleted
[    4.685881] EXT4-fs (mmcblk0p2): recovery complete
[    8.631347] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    8.644244] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    8.654677] devtmpfs: mounted
[    8.661103] Freeing init memory: 124K
[   10.414514] udevd[139]: starting version 175
[   21.263308] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[   21.967590] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[   22.849536] bcm2835 ALSA card created!
[   22.855703] bcm2835 ALSA chip created!
[   22.875121] bcm2835 ALSA chip created!
[   22.885884] bcm2835 ALSA chip created!
[   22.894074] bcm2835 ALSA chip created!
[   22.902271] bcm2835 ALSA chip created!
[   22.910319] bcm2835 ALSA chip created!
[   22.918129] bcm2835 ALSA chip created!
share|improve this question
    
Please run mount with no arguements and post the output. –  Alex Chamberlain Oct 22 '12 at 17:47
    
@AlexChamberlain See my updated with the contents of the mounts. –  Pentium10 Oct 22 '12 at 19:41
add comment

2 Answers 2

up vote 12 down vote accepted

/dev/mmcblk0p2 is the root file system, so it is not easily unmounted. It could probably be re-mounted as read-only, but a simpler way is to schedule a fsck at the next reboot.

sudo touch /forcefsck

then reboot. Or reboot with

shutdown -rF now

which does the same. (from http://superuser.com/questions/401217/how-to-check-root-partition-with-fsck)

Another option of course is to do the fsck on another linux computer with a card reader.

share|improve this answer
1  
+1 Nice answer. I didn't know about the -F flag. –  Jivings Oct 22 '12 at 21:25
add comment

sudo touch /forcesck didn't work for me...

but I did the following and it checked errors:

force a manual fsck and reboot:

 fsck -fy /dev/mmcblk0p2 
 reboot 
share|improve this answer
    
where did you get /dev/mmcblk0p2 How can I figure out myself? –  Pentium10 Jan 19 '13 at 21:39
    
@Pentium10 df –  ohho Jul 12 '13 at 8:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.