summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2011-11-06 18:30:40 +0100
committerDave Reisner <dreisner@archlinux.org>2011-11-15 01:11:09 +0100
commit5ee994c10029786947dc495e7078bbb30ab4a130 (patch)
treebfeaef488b20021c0e5992a86e55d3b058cdf0dd /init
parentfe5d6c51c4ace947060fe49914d8224c836a31e4 (diff)
downloadmkinitcpio-5ee994c10029786947dc495e7078bbb30ab4a130.tar.gz
mkinitcpio-5ee994c10029786947dc495e7078bbb30ab4a130.tar.xz
fsck: implement basic fsck support
This adds support for fsck'ing root at bootstrap if the fsck binary and necessary helpers are included. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'init')
-rw-r--r--init5
1 files changed, 5 insertions, 0 deletions
diff --git a/init b/init
index 975368b..76ec252 100644
--- a/init
+++ b/init
@@ -78,6 +78,11 @@ if [ "${break}" = "y" ] || [ "${break}" = "premount" ]; then
launch_interactive_shell
fi
+rootdev=$(resolve_device "$root") && root=$rootdev
+unset rootdev
+
+[ -z "$skipfsck" ] && fsck_root
+
# Mount root at /new_root
${mount_handler:-default_mount_handler} /new_root