~ubuntu-branches/ubuntu/vivid/initramfs-tools-ubuntu-touch/vivid

« back to all changes in this revision

Viewing changes to scripts/touch

  • Committer: Package Import Robot
  • Author(s): Ricardo Salveti de Araujo
  • Date: 2014-11-11 00:39:22 UTC
  • Revision ID: package-import@ubuntu.com-20141111003922-k4qf8ekly6pyj7x9
Tags: 0.79
* Adding e2fsck so we can check the rw partitions when booting
* scripts/touch: adding logic to check the filesystem for userdata (rw)

Show diffs side-by-side

added added

removed removed

Lines of Context:
155
155
                echo "initrd: Couldn't find data partition. Spawning adbd ..." >/dev/kmsg || true
156
156
                panic "Couldn't find data partition. Spawning adbd ..."
157
157
        fi
 
158
 
 
159
        echo "initrd: checking filesystem integrity for the userdata partition" >/dev/kmsg || true
 
160
        # Mounting and umounting first, let the kernel handle the journal and
 
161
        # orphaned inodes (faster than e2fsck). Then, just run e2fsck forcing -y.
 
162
        # Also check the amount of time used by to check the filesystem.
 
163
        fsck_start=`date +%s`
 
164
        mount -o errors=remount-ro $path /tmpmnt
 
165
        umount /tmpmnt
 
166
        e2fsck -y $path > /run/initramfs/e2fsck.out 2>&1
 
167
        fsck_end=`date +%s`
 
168
        echo "initrd: checking filesystem for userdata took (including e2fsck) $((fsck_end-fsck_start)) seconds" >/dev/kmsg || true
 
169
 
158
170
        echo "initrd: mounting $path" >/dev/kmsg || true
159
171
 
160
172
        # Mount the data partition to a temporary mount point