1*56a34939Shaadhttp://poochiereds.net/svn/lvm2/ 2*56a34939Shaad 3*56a34939ShaadThis is the lvm2create_initrd script written by Miguel Cabeca, with some small 4*56a34939Shaadmodifications by myself. 5*56a34939Shaad 6*56a34939ShaadHere are some other requirements and tips for using it: 7*56a34939Shaad 8*56a34939Shaad1) this script uses busybox on the initrd image, hence busybox needs to be 9*56a34939Shaadinstalled when you create your initrd. 10*56a34939Shaad 11*56a34939Shaad2) Make sure /etc/lvm/lvm.conf is set up correctly before running this. In 12*56a34939Shaadparticular, if you're using LVM on RAID, make sure that you have a filter that 13*56a34939Shaadexcludes the RAID component devices (this may not be necessary with the latest 14*56a34939Shaadpatch by Luca Berra, but it doesn't hurt). 15*56a34939Shaad 16*56a34939Shaad3) This initrd image does not support modules. If you need to plug in any 17*56a34939Shaadkernel modules during the initrd phase, then you'll need to hand-modify the 18*56a34939Shaadimage. 19*56a34939Shaad 20*56a34939Shaad4) The generated initrd image supports an 'lvm2rescue' mode as well. If you add 21*56a34939Shaadthe parameter 'lvmrescue' on the kernel command line, it will run a shell at 22*56a34939Shaadthe end of the initrd 'init' script. This can be helpful when trying to fix a 23*56a34939Shaadcorrupt root volume or root LVM2 volume group. 24*56a34939Shaad 25*56a34939Shaad5) No userspace md tools are installed, so if you're using LVM on RAID, then 26*56a34939Shaadyou'll probably want to mark your RAID partitions as type 'fd' so that the 27*56a34939Shaadkernel will start them automagically (or hand-modify the image). 28*56a34939Shaad 29*56a34939Shaad6) I'm not sure if devfs will work with this or not. udev, however does work, 30*56a34939Shaadand is recommended. Because the dm-* devices use dynamically allocated major 31*56a34939Shaadand minor numbers, kernel upgrades and the like can renumber your devices. To 32*56a34939Shaadfix this, you need to run a 'vgscan --mknodes' prior to fscking and mounting 33*56a34939Shaadyour rootfs. Doing this with a static /dev creates a problem though -- you 34*56a34939Shaadwill be modifying the root filesystem before it has been fsck'ed. udev gets 35*56a34939Shaadaround this by mounting a ramdisk over /dev, but you'll probably need to add 36*56a34939Shaada startup script that creates devices in /dev. The lvm2udev script in this 37*56a34939Shaaddirectory is an example of such a beast. 38*56a34939Shaad 39*56a34939Shaad-- 40*56a34939ShaadJeffrey Layton <jtlayton@poochiereds.net> 41