From dbfcaacf40ca356d7623408b4bfca828f8bd880d Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Tue, 2 May 2006 04:36:19 +0000 Subject: Misc changes to module detection - tpowa Config file comments mdassemble in raid hook + additional raid help git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@40 880c04e9-e011-0410-abf7-b926e227c9cd --- hooks/filesystems | 2 +- hooks/raid | 6 +++--- hooks/usb | 2 ++ init | 4 ++-- install/filesystems | 2 +- install/ide | 6 +----- install/raid | 16 ++++++++++++++-- install/sata | 5 +---- install/scsi | 4 ++-- install/usb | 3 ++- mkinitcpio.conf | 54 ++++++++++++++++++++++++++++++++++++++++++++++++----- 11 files changed, 78 insertions(+), 26 deletions(-) diff --git a/hooks/filesystems b/hooks/filesystems index c676832..0990b4c 100644 --- a/hooks/filesystems +++ b/hooks/filesystems @@ -9,7 +9,7 @@ run_hook () msg "Attempting to create root device '${root}'" dev_t=$( /bin/parseblock "${root}" ) if [ "x${dev_t}" != "x" ]; then - /bin/mknod "${root}" b ${dev_t} + /bin/mknod "${root}" b ${dev_t} >/dev/null 2>&1 eval $( /bin/fstype < "${root}" ) else FSTYPE="unknown" diff --git a/hooks/raid b/hooks/raid index d83e2ae..5cf4b2f 100644 --- a/hooks/raid +++ b/hooks/raid @@ -1,7 +1,7 @@ # vim: set ft=sh: -# kinit handles md/raid assembly we just need modules run_hook () { - #TODO - /bin/modprobe -aq raid0 raid1 raid2 raid5 raid6 + #TODO scan for these somehow... + /bin/modprobe -aq raid0 raid1 raid2 raid5 raid6 >/dev/null 2>&1 + /bin/mdassemble ${md} ${raid} } diff --git a/hooks/usb b/hooks/usb index 5766ef9..89af004 100644 --- a/hooks/usb +++ b/hooks/usb @@ -3,5 +3,7 @@ run_hook () { msg -n "Loading usb modules..." /bin/modprobe -aq $(/bin/cat /sys/bus/usb/devices/*/modalias) >/dev/null 2>&1 + #allow 'usbdelay' on the kernel param line + /bin/sleep ${usbdelay:-5} msg "done." } diff --git a/init b/init index b0eed45..d7bcb32 100644 --- a/init +++ b/init @@ -3,7 +3,7 @@ msg () { [ "${quiet}" != "y" ] && echo $@; } err () { echo "ERROR: $@"; } -msg ":: Begin Initramfs" +msg ":: Loading Initramfs" /bin/mount -t sysfs none /sys /bin/mount -t proc none /proc @@ -64,5 +64,5 @@ if [ "${break}" = "y" ]; then fi # Optimize fs type loop for mounting rootfs -msg ":: End Initramfs - control passing to kinit" +msg ":: Initramfs Completed - control passing to kinit" exec /bin/kinit rootfstype=${FSTYPE} $CMDLINE < /dev/console > /dev/console diff --git a/install/filesystems b/install/filesystems index c012d1b..1da1f13 100644 --- a/install/filesystems +++ b/install/filesystems @@ -2,7 +2,7 @@ install () { - MODULES=" $(all_modules '/kernel/fs') " + MODULES=" $(all_modules '/kernel/fs' | grep -v "nls") " BINARIES="" FILES="" SCRIPT="filesystems" diff --git a/install/ide b/install/ide index cd9625a..bbd1ef5 100644 --- a/install/ide +++ b/install/ide @@ -2,11 +2,7 @@ install () { - MODULES="" - for m in $(all_modules "/ide/"); - do - MODULES="$MODULES $(basename $m)" - done + MODULES=" $(all_modules "/ide/" | grep -v "legacy") "; BINARIES="" FILES="" SCRIPT="ide" diff --git a/install/raid b/install/raid index 6f3c90a..84339c5 100644 --- a/install/raid +++ b/install/raid @@ -6,12 +6,24 @@ install () BINARIES="" FILES="" SCRIPT="raid" + add_file "/usr/lib/klibc/bin/mdassemble" "/bin/mdassemble" } help () { cat<' for +# help on a given hook. +# 'base' is _required_ unless you know precisely what you are doing. +# Examples: +# This setup specifies all modules in the MODULES setting above. +# No raid, lvm, or encrypted root is needed. +# HOOKS="base" +# +# This setup will autodetect all modules for your system and should +# work as a sane default +# HOOKS="base ide scsi sata usb filesystems autodetect" +# +# This setup will generate a 'full' image which supports most systems. +# No autodetection is done. +# HOOKS="base ide scsi sata usb filesystems" +# +# This setup assembles an ide raid array with an encrypted root FS. +# Note: See 'mkinitcpio -H raid' for more information on raid devices. +# HOOKS="base ide raid encrypt" +# +# This setup loads an LVM volume group on a usb device. +# HOOKS="base usb lvm" +HOOKS="base ide scsi sata usb filesystems autodetect" -- cgit v1.2.3-24-g4f1b