Jump to content

FSCK in Mark IV


Recommended Posts

Firmware level: 2.8.0


Where is FSCK ?


root@Pineapple:/etc/config# opkg files block-mount

Package block-mount (0.2.0-10) is installed on root and has the following files:

/lib/preinit/00_extroot.conf

/lib/functions/extmount.sh

/lib/functions/block.sh

/lib/functions/mount.sh

/etc/hotplug.d/block/40-mount

/lib/preinit/55_determine_extroot_sysupgrade

/etc/hotplug.d/block/20-fsck

/lib/preinit/60_pivot_usb_root

/etc/config/fstab

/etc/hotplug.d/block/10-swap

/lib/preinit/50_determine_usb_root

/etc/init.d/fstab

/lib/functions/fsck.sh <--------------------------------------------------- HERE


root@Pineapple:/etc/config# ls /lib/functions/fsck.sh

/lib/functions/fsck.sh


root@Pineapple:/etc/config# cat /lib/functions/fsck.sh

#!/bin/sh

# Copyright 2010 Vertical Communications

# This is free software, licensed under the GNU General Public License v2.

# See /LICENSE for more information.

#


libmount_fsck() {

local device="$1"

local fsck_fstype="$2"

local fsck_enabled="$3"

local known_type

local found_fsck=0



grep -q "$device" /proc/swaps || grep -q "$device" /proc/mounts || {

[ -e "$device" ] && [ "$fsck_enabled" -eq 1 ] && {

for known_type in $libmount_known_fsck; do

if [ "$known_type" = "$fsck_fstype" ]; then

fsck_${known_type} "$device"

found_fsck=1

break

fi

done

if [ "$found_fsck" -ne 1 ]; then

logger -t 'fstab' "Unable to check/repair $device; no known fsck for filesystem type $fstype"

fi

}

}

}


libmount_known_fsck=""

pi_include /lib/functions/fsck <--------------NOTICE




root@Pineapple:~# ls -al /lib/functions/fsck

drwxr-xr-x 2 root root 3 Mar 2 2013 .

drwxr-xr-x 1 root root 0 Mar 3 2013 ..



root@Pineapple:/etc/config# /lib/functions/fsck.sh

-ash: /lib/functions/fsck.sh: Permission denied


root@Pineapple:/etc/config# ls -al /lib/functions/fsck.sh

-rw-r--r-- 1 root root 794 Mar 2 05:43 /lib/functions/fsck.sh


root@Pineapple:/etc/config# chmod 755 /lib/functions/fsck.sh


root@Pineapple:/etc/config# ls -al /lib/functions/fsck.sh

-rwxr-xr-x 1 root root 794 Mar 2 05:43 /lib/functions/fsck.sh


root@Pineapple:/etc/config# /lib/functions/fsck.sh /dev/sda1

/lib/functions/fsck.sh: line 33: pi_include: not found


So !? is there no fsck avail ?
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...