summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorTobias Powalowski <tpowa@archlinux.org>2006-05-07 11:27:26 +0200
committerTobias Powalowski <tpowa@archlinux.org>2006-05-07 11:27:26 +0200
commit3c2796fc34d6b5d41c9ff7b4389651bbbe6d018b (patch)
treeef52d70f0ed030e6aca78ef7add914788ff69499 /install
parent212033832a355b6ca1ad61f0f0460cf7b9b07c2d (diff)
downloadmkinitcpio-3c2796fc34d6b5d41c9ff7b4389651bbbe6d018b.tar.gz
mkinitcpio-3c2796fc34d6b5d41c9ff7b4389651bbbe6d018b.tar.xz
'update the raid stuff + included a raid autodetectcion'
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@77 880c04e9-e011-0410-abf7-b926e227c9cd
Diffstat (limited to 'install')
-rw-r--r--install/autodetect3
-rw-r--r--install/raid32
2 files changed, 24 insertions, 11 deletions
diff --git a/install/autodetect b/install/autodetect
index 6cf252c..73d8a21 100644
--- a/install/autodetect
+++ b/install/autodetect
@@ -7,7 +7,8 @@ install ()
AUTODETECT="$(auto_modules -e "/scsi/" -e "/block" -e "/fusion/" \
-e "/usb/" -e "/ide/" -e "/ieee1394/" -e "/cdrom"\
-e "/net/" -e "/pcmcia")
- $(cat /proc/filesystems | grep -v nodev) "
+ $(cat /proc/filesystems | grep -v nodev) \
+ $(mdadm -E -s /dev/hd* /dev/sd* | awk -Flevel= '{print $2}' | awk '{print $1}') "
for m in $AUTODETECT; do
modname="$(basename ${m%%\.ko})"
diff --git a/install/raid b/install/raid
index 84339c5..a7102b6 100644
--- a/install/raid
+++ b/install/raid
@@ -2,7 +2,7 @@
install ()
{
- MODULES=" $(all_modules "/md/raid*")"
+ MODULES=" $(checked_modules "drivers/md/*" | grep -v "dm-") "
BINARIES=""
FILES=""
SCRIPT="raid"
@@ -15,15 +15,27 @@ cat<<HELPEOF
This hook loads the necessary modules for an raid root device,
and assemble the raid device when run.
- Supported Kernel Parameters:
- * raid=noautodetect : This setting is only effective if set to
- noautodetect. When set to noautodetect, the md= parameter is used.
- * md= ::: TODO ::: md=0,/dev/sda3,/dev/sda4
+ Kernel Parameters:
+ Specify all your md arrays with md= parameter:
+ ::: Example ::: md=0,/dev/sda3,/dev/sda4 md=1,/dev/hda1,/dev/hdb1
+ This will setup 2 md arrays with persistent superblocks
- Important Note: kinit handles raid assembly by itself. If you
- do not need to run any additional hooks on the assembled array
- (i.e. LVM, encrypted root, etc), it is recommended that you
- let kinit handle the assembly. You will still need to load
- the proper raid* modules via the MODULES setting.
+ Setup:
+ - for old raid arrays without persistent superblocks:
+ md=<md device no.>,<raid level>,<chunk size factor>,<fault level>,dev0,dev1
+ - for raid arrays with persistent superblocks:
+ md=<md device no.>,dev0,dev1,...,devn
+ - for, to assemble a partitionable array:
+ md=d<md device no.>,dev0,dev1,...,devn
+
+ Parameters:
+ - <md device no.> = the number of the md device:
+ 0 means md0, 1 means md1, ...
+ - <raid level> = -1 linear mode, 0 striped mode
+ other modes are only supported with persistent super block
+ - <chunk size factor> = (raid-0 and raid-1 only):
+ Set the chunk size as 4k << n.
+ - <fault level> = totally ignored
+ - <dev0-devn>: e.g. /dev/hda1,/dev/hdc1,/dev/sda1,/dev/sdb1
HELPEOF
}