Browse Source

early: fixed init.sh to detect root filesystem type for loading the proper kernel module before trying to mount it at /rootfs

user/chris/test/early-mdev
Christian Wiese 13 years ago
parent
commit
b21166dd22
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      target/early/initramfs/init.sh

+ 6
- 3
target/early/initramfs/init.sh

@ -132,9 +132,12 @@ if [ -n "$root" ]; then
[ -e "$root" ] || sleep 2;
if [ -e "$root" ]; then
title "Mounting $root (${ID_FS_TYPE:-unknown}) "
[ -z "$ID_FS_TYPE" ] || modprobe -q "$ID_FS_TYPE" 2> /dev/null
check mount ${ID_FS_TYPE:+-t $ID_FS_TYPE} ${mode:+-o $mode} "$root" /rootfs
# store detected root filesystem in ROOT_FS_TYPE
eval ROOT_FS_$(blkid $root | cut -d ' ' -f3)
title "Mounting $root (${ROOT_FS_TYPE:-unknown}) "
[ -z "$ROOT_FS_TYPE" ] || modprobe -q "$ROOT_FS_TYPE" 2> /dev/null
check mount ${ROOT_FS_TYPE:+-t $ROOT_FS_TYPE} ${mode:+-o $mode} "$root" /rootfs
status
else
echo "root device ($root) not found on time."

Loading…
Cancel
Save