Those of us who use evms2 partitions (including root partition) have to manually build initrd so that evms2 partitions can be recognized. It would be nice if genkernel utility can build initrd ramdisk needed for root partition under evms. Reproducible: Always Steps to Reproduce: 1. 2. 3.
you betcha! I could really really use this right about now.
This URL is the only one I have found of someone who has claimed to have done it. http://forums.gentoo.org/viewtopic.php?t=93085&highlight=evms "loop mount the initrd and add the files as described in the sourceforge docs. edit the linuxrd to start up devfsd and evms_activate as well as to set /proc/sys/kernel/real-root-dev I got bit by all the utils being in the genkernel initrd except expr... make sure you grab it. Also watch the sym-links in /lib. " also "I've now got a script that takes the genkernel initrd and converts it to one that works with EVMS2." I'll post it if I am able to get it from him. Till then, I can't get my initrd to work for EVMS at all.
I need also initrd with LVM support please.
I got a script from someone who said this makes a working initrd for EVMS under gentoo. Also...btw...in my testing I found that the initrd supplied on the evms website currently works with gentoo...though it would be nicer to have genkernel build a working initrd automatically. Here is the script: From: Linuxboy To: shwag Posted: Mon Dec 22, 2003 7:29 am Subject: Re: evms initrd Sorry for the delay, here is my script. note that it assumes SDA in one spot, so you may need to change it for your drives. #!/bin/sh RD=/tmp/initrd KD=`readlink -f /usr/src/linux` KV="${KD##*/}" KV="${KV##linux-}" echo "Mounting initrd..." # mount boot device if needed or fail [ -e /boot/initrd-${KV} ] || mount /boot [ -e /boot/initrd-${KV} ] || echo "Can't find initrd on /boot." || exit cp -f /boot/initrd-${KV} /boot/initrd-${KV}.EVMS2.gz gunzip -f /boot/initrd-${KV}.EVMS2.gz mkdir -p ${RD} mount -o loop /boot/initrd-${KV}.EVMS2 ${RD} echo "Setting up linuxrc..." # add EVMS2 activation to linuxrc sed "s/^\s*exit$//" < ${RD}/linuxrc > /tmp/linuxrc echo ' devfsd /dev echo -e "\${HILITE} ---- Beginning evms root detection\${NORMAL}" evms_activate for name in `cat /proc/cmdline`; do echo $name | grep "^root=" > /dev/null if [ $? -eq 0 ]; then vol=`expr "\$name" : ".*=\(.*\)"` break fi done get_dev_num $vol>/proc/sys/kernel/real-root-dev exit '>> /tmp/linuxrc cp -f /tmp/linuxrc ${RD}/linuxrc rm /tmp/linuxrc echo "Copying files..." # set up additional directories mkdir -p ${RD}/lib ${RD}/lib/evms ${RD}/lib/dev-state/ mkdir -p ${RD}/var ${RD}/var/log ${RD}/var/lock mkdir -p ${RD}/etc/devfs.d # copy additional files cp -f /bin/expr ${RD}/bin/ # setup devfsd cp -f /sbin/devfsd ${RD}/sbin/ cp -fR /lib/dev-state ${RD}/lib/dev-state cp -fR /etc/devfs.d ${RD}/etc/devfs.d sed 's/^LOOKUP.*\s*\.\*\s*/#LOOKUP\t\t.*/g' </etc/devfsd.conf > ${RD}/etc/devfsd.conf # copy evms specific files cp -f /sbin/evms_activate ${RD}/sbin/ cp -f /sbin/get_dev_num ${RD}/sbin/ cp -f /etc/evms.conf ${RD}/etc/ # copy evms specific libs cp -a /lib/libuuid.so.1 ${RD}/lib/ for file in `ls /lib/evms/ | grep -v "^csm-\|^ext2-\|^ha-\|^jfs-\|^reiser-\|^replace-\|^rsct-\|^swap-\|^xfs-"` do cp /lib/evms/$file ${RD}/lib/evms/ done for file in `(ldd /sbin/evms_activate&&ldd /sbin/get_dev_num)|cut -d'=' -f 1 | sort -u` do [ -f $file ]&&cp $file ${RD}/lib/||cp -a /lib/$file ${RD}/lib/ done # follow symlinks (two layers should be enough) for file in `ls -l ${RD}/lib/|grep "\->" | cut -d'>' -f 2` do cp -a /lib/$file ${RD}/lib/ done for file in `ls -l ${RD}/lib/|grep "\->" | cut -d'>' -f 2` do cp -a /lib/$file ${RD}/lib/ done # fixup leftover /mnt/gentoo chroot issues if present in fstab sed "s:^\s*mnt/gentoo/::g"</etc/fstab|sed "s:^\s*/dev/sda:# /dev/sda:g" >${RD}/etc/fstab echo "Unmounting and compressing..." umount ${RD} rmdir ${RD} gzip -f -9 /boot/initrd-${KV}.EVMS2 umount /boot echo "Done." echo -n "Press Enter to reboot or <Ctrl>-C to skip reboot" && read init 6
The script is working for me under: gentoo-sources kernel 2.4.20-r7 with EVMS 2.0.1 gentoo-sources kernel 2.4.20-r8 with EVMS 2.0.1 gentoo-sources kernel 2.4.22-r2 with EVMS 2.2.1 I have no reason to beleive that it won't keep working for the next few revs of 2.4 and EVMS. EVMS on 2.6 seems to still have limitations, so I've not tried that yet. In all cases, I use GRUB on a normal primary partition with ext3 and I have the kernel configured with devfs automount. The ramdisk is larger than the default in the kernel so your kernel line in grub config needs to be something like this: kernel (hd0,0)/boot/kernel-2.4.22-gentoo-r2 root=/dev/evms/Root ramdisk=8192 To get genkernel to actually create the larger ramdisk, set the INITRD_SIZE setting in etc/kernels/settings and see Bug 29081 for how to use it. The EVMS object layout that I personally use is here: http://www.eby-brown.com/evms.gif My sincere apologies for releasing such lousy quality code, this was intended to be a personal stopgap until genkernel got fixed. Linuxboy
Gentoo-sources 2.4.22-r[23] is not as "working" as I thought it was. There is a warning in the ebuild saying "Presently gentoo-sources-2.4.22 has basic support for evms2, but doesn't support some of the more advanced features." This means that basic features like BBR are not supported and if you used them with 2.4.20, you won't be able to mount your existing volumes anymore. Simple volumes without any reason to be on EVMS2 work just fine, so if you're building an EVMS2 system just for fun, go right ahead. Don't expect Gentoo-sources 2.6 to be any better for a while, the EVMS folks are still getting many of the features written. See the notes at Bug 37652 Linuxboy
yes, look at /usr/share/genkernel/TODO it's in there