Modify

Opened 4 years ago

Last modified 21 months ago

#10697 new enhancement

Missing fsck function for block-mount/-hotplug of dos/vfat filesystems

Reported by: anonymous Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Backfire 10.03.1 RC6
Keywords: fsck vfat block-mount block-hotplug Cc: cshore, swalker, nbd

Description

I have a SD-Card with sda1/vfat and sda5/ext4. After installing the relevant packages for kmod-fs, auto-mount, fsck, etc., the system log tells me that ext4 volume is fsck'd on startup, but the vfat is not. The system log was:

  user.notice fstab: Unable to check/repair /dev/sda1; no known fsck for filesystem type

I should say that I was able to execute dosfsck manually...

I read the fsck.sh section of http://wiki.openwrt.org/doc/techref/block_mount and it seemed to me that a shameless copy-and-edit of e2fsck.sh would do the trick. I called it dosfsck.sh and put it in the same directory. This resulted in:

  user.notice fstab: dosfsck (/dev/sda1): dosfsck 3.0.11, 24 Dec 2010, FAT32, LFN
  user.notice fstab: dosfsck (/dev/sda1): /dev/sda1: 1 files, 2/127995 clusters

I guess this should be part of the dosfsck package. Sorry, but I wasn't confident enough to post the change myself. This is a simple change, and offers a lot of value, so hopefully someone will upload it to the tree...

BTW, there is also a bug in: trunk/package/block-mount/files/fsck.sh, which reads:

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

but should read:

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

but I think would be better as something like (may need back-slashes, I'm not sure:

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

Attachments (1)

dosfsck.sh (785 bytes) - added by anonymous 4 years ago.

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by anonymous

comment:1 Changed 4 years ago by zxdavb

As a work-around, I have been doing the following. First ensure the packages are installed (for example):

opkg install block-mount opkg install block-hotplug  
opkg install kmod-fs-ext3 e2fsprogs
opkg install kmod-fs-msdos kmod-fs-vfat dosfsck kmod-nls-cp437 kmod-nls-iso8859-1 

Then create the dosfsck.sh file with this script (execute it once only):

cp /lib/functions/fsck/e2fsck.sh /lib/functions/fsck/dosfsck.sh

sed -i -e 's:e2:dos:g'       -e 's:ext2:dos:' -e 's:ext3:vfat:g' /lib/functions/fsck/dosfsck.sh
sed -i -e '/fsck_ext4/,/}/d' -e '/ext4/d'                        /lib/functions/fsck/dosfsck.sh

-zxdavb

comment:2 Changed 4 years ago by swalker

Dosfstools fixed in r30858.

Block-mount still needs fixing.

comment:3 Changed 21 months ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.