From 1c9a57232165a2b48678848e739a14d0bd2687b3 Mon Sep 17 00:00:00 2001 From: Thomas Bächler Date: Wed, 12 Jan 2011 01:12:45 +0100 Subject: If filesystem autodetection fails, use all_modules instead of checked_modules --- install/autodetect | 9 ++++++++- install/filesystems | 6 +++++- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'install') diff --git a/install/autodetect b/install/autodetect index 1275232..82dca3c 100644 --- a/install/autodetect +++ b/install/autodetect @@ -20,7 +20,12 @@ install () } if [ ${UID} -eq 0 -o "$(groups | grep disk)" != "" ]; then - for fs in $(findfs | sort | uniq); do + fss=$(findfs | sort | uniq) + if [ -z "${fss}" ]; then + err "Root file system type detection failed." + autodetect_fs_detection_failed=1 + fi + for fs in ${fss}; do allfs="${fs} $(modprobe --set-version ${KERNELVERSION} --resolve-alias ${fs})" for mod in ${allfs}; do for modfile in $(find "${MODULEDIR}" -type f -name "${mod}.ko"); do @@ -43,6 +48,8 @@ install () done fi else + autodetect_fs_detection_failed=1 + autodetect_raid_detection_failed=1 err "User does not have proper permissions to read superblocks, raid and filesystem modules are not detected" fi diff --git a/install/filesystems b/install/filesystems index ec637ce..cd1a4cb 100644 --- a/install/filesystems +++ b/install/filesystems @@ -2,7 +2,11 @@ install () { - MODULES=" $(checked_modules '/kernel/fs' | grep -v "nls")" + if [ "${autodetect_fs_detection_failed}" = "1" ]; then + MODULES=" $(all_modules '/kernel/fs' | grep -v "nls")" + else + MODULES=" $(checked_modules '/kernel/fs' | grep -v "nls")" + fi BINARIES="" FILES="" SCRIPT="" -- cgit v1.2.3-24-g4f1b