# $Revision: 2.181 $, $Date: 2011/04/10 12:40:58 $ ### TODO: # - BUG: you can't set in /etc/mdadm.conf: # DEVICE partitions containers # (which is default BTW if none set). Generation of initrd will fail # Summary: Creates an initial ramdisk image for preloading modules Summary(pl.UTF-8): Narzędzie do tworzenia inicjalnego ramdysku używanego przy starcie systemu Name: geninitrd Version: 10000.32 # leave rel 1 for ac Release: 5 License: GPL Group: Applications/System Source0: %{name}-%{version}.tar.gz # Source0-md5: 9d75e347ff49312209e97ead93378f4a Patch0: %{name}-romfs.patch Patch1: %{name}-gzip-compressor.patch Patch2: %{name}-svn.patch BuildRequires: xmlto >= 0:0.0.18-1 Requires: /usr/bin/ldd Requires: awk Requires: busybox-initrd > 1.00-4 Requires: coreutils Requires: cpio Requires: fileutils Requires: genromfs Requires: glibc-misc Requires: gzip Requires: gzip1 Requires: gzip2 Requires: mktemp >= 1.5-8 Requires: module-init-tools >= 3.2.2-6 Requires: mount Requires: pci-database >= 0.4 Requires: rc-scripts >= 0.2.7 Requires: tar %if "%{pld_release}" == "ti" Requires: lvm2-initrd Requires: mdadm-initrd >= 1.12.0-1 %else # otherwise LVM subsystem is not enabled in geninitrd Suggests: lvm2-initrd # without this softraid installations of PLD fail Suggests: mdadm-initrd >= 1.12.0-1 %endif # suggest for blkid %if "%{pld_release}" != "ac" Suggests: util-linux-initrd %endif Obsoletes: mkinitrd %if "%{pld_release}" == "ac" Conflicts: grubby < 5.0.4-3.1 %else Conflicts: grubby < 6.0.24-3 %endif Conflicts: udev-initrd < 1:104 Conflicts: xz < 4.999.9 BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description Geninitrd creates filesystem images for use as initial ramdisk (initrd) images. These ramdisk images are often used to preload the block device modules (SCSI or RAID) needed to access the root filesystem. In other words, generic kernels can be built without drivers for any SCSI adapters which load the SCSI driver as a module. Since the kernel needs to read those modules, but in this case it isn't able to address the SCSI adapter, an initial ramdisk is used. The initial ramdisk is loaded by the operating system loader (normally LILO) and is available to the kernel as soon as the ramdisk is loaded. The ramdisk image loads the proper SCSI adapter and allows the kernel to mount the root filesystem. The geninitrd program creates such a ramdisk using information found in the /etc/modules.conf file. %description -l pl.UTF-8 Geninitrd służy do tworzenia obrazu systemu plikowego używanego jako inicjalny ramdysk (initrd), z którego przy starcie systemu są ładowane moduły kernela z obsługą urządzeń których obsługa nie jest wkompilowana w kernel. Zazwyczaj modułami ładowanymi z inicjalnego systemu plikowego są sterowniki SCSI, IDE czy też RAID po to żeby w dalszej części inicjacji systemu był możliwy dostęp do głównego systemu plikowego (root fs). Dzięki initrd jest możliwe używanie dystrybucyjnego kernela w którym wkompilowana jest minimalna ilość obsługi różnych urządzeń, a reszta kodu obsługi sterowników SCSI, IDE czy RAID jest doczytywana w trakcie startu z initrd. Skrypt geninitrd generuje obraz ramdysku na podstawie bieżących informacji zawartych w /etc/modules.conf. %prep %setup -q %if "%{pld_release}" == "ti" %patch0 -p1 %patch1 -p1 %endif %patch2 -p0 %build %{__make} %install rm -rf $RPM_BUILD_ROOT %{__make} install \ DESTDIR=$RPM_BUILD_ROOT %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %doc ChangeLog %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/geninitrd %attr(755,root,root) /sbin/geninitrd %{_mandir}/man8/geninitrd.8* %dir /lib/geninitrd /lib/geninitrd/functions /lib/geninitrd/mod-*.sh %attr(755,root,root) /lib/geninitrd/extract-ikconfig %define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`) %changelog * %{date} PLD Team All persons listed below can be reached at @pld-linux.org $Log: geninitrd.spec,v $ Revision 2.181 2011/04/10 12:40:58 adamg - Requires: glibc-misc (ldd) Revision 2.180 2011/03/11 11:36:22 arekm - rel 6; don't resolve symlink for luks device nodes Revision 2.179 2011/03/06 16:15:17 arekm - rel 4; fix mod-sata finding too much bug Revision 2.178 2011/03/04 09:24:56 arekm - rel 4; fallback to ls bug fixed Revision 2.177 2011/03/01 10:34:47 arekm - rel 3; bugfix for users using rootfsflags boot option Revision 2.176 2011/02/25 16:08:26 arekm - rel 2; no negative reports Revision 2.175 2011/02/19 08:29:38 arekm - 10000.32 (experimental). Revision 2.174 2011/02/11 01:33:25 sparky - s/util-linux-ng7util-linux/ Revision 2.173 2011/02/09 19:23:07 glen - test .2 Revision 2.172 2011/01/27 20:35:20 glen - still experimental 10000.31 Revision 2.171 2011/01/13 20:32:12 arekm Up to 10000.30 (experimental due to SATA autodetection). Revision 2.170 2010/12/19 10:19:42 glen - suggest for blkid in image generation (grub2 defaults to UUID mode) Revision 2.169 2010/10/26 20:24:44 blues - bug noticed Revision 2.168 2010/04/20 05:31:53 arekm - rel 5; don't require main mdadm package (use initrd version) Revision 2.167 2010/03/29 20:23:20 evil - adapterized - added geninitrd-tuxonice_on_dm.patch, moving tuxonice script down in hierarchy, to allow tuxonice snapshot device be device mapper device(LUKS, LVM, dmraid) Revision 2.166 2010/03/08 11:01:20 arekm - rel 3; sync scsi scanning for >= 2.6.30 Revision 2.165 2010/03/06 11:21:21 arekm - mdadm itself is also needed for detecting md raid Revision 2.164 2010/02/25 13:50:35 hawk - release 2 Revision 2.163 2010/02/25 13:18:56 hawk - force sync scan for scsi_mod in Titanium instead of using hack Revision 2.162 2010/02/05 12:46:01 glen - ac compatible Revision 2.161 2010/01/21 15:57:52 baggins - release 10000.20 Revision 2.160 2010/01/12 11:15:19 glen - release 10000.19 Revision 2.159 2010/01/02 13:46:45 pawelz - There was an empty man file in sources, so make was not regenerating this file. Added make clean to remove bogus man file and allow to regenerate it. Reported by Krystian Tomczyk. - rel 9 Revision 2.158 2009/09/19 20:55:27 hawk - R: not S: lvm2-initrd and mdadm-initrd in Titanium Revision 2.157 2009/09/19 20:48:23 hawk - use gzip as compressor in Titanium unless user has specified otherwise Revision 2.156 2009/09/15 08:04:05 gotar - s/Requires/Suggests/ for mdadm-initrd (only for software RAIDs users) Revision 2.155 2009/09/14 23:05:33 gotar - busybox-initrd 1.00-4 (probably some newer ones too) causes: usage: switch_root NEW_ROOT kernel panic - not syncing Revision 2.154 2009/09/14 22:38:51 gotar - anyone using LVM should follow this suggestion, not requirement Revision 2.153 2009/09/04 13:09:59 arekm - rel 6; xz and lzma formats support Revision 2.152 2009/09/04 12:38:45 arekm - rel 5; use lzma format for xz Revision 2.151 2009/09/04 11:04:25 arekm - C: xz < 4.999.9 Revision 2.150 2009/09/04 10:37:40 arekm - rel 3; use default compression level for lzma Revision 2.149 2009/08/31 19:33:18 arekm - up to 10000.18 Revision 2.148 2009/08/28 22:12:49 arekm - up to 10000.17 Revision 2.147 2009/08/15 22:13:47 hawk - updated to 10000.16, fixes lvm.static in initrd (/dev/urandom must exist and /sys must be mounted) Revision 2.146 2009/08/11 12:24:03 adamg - updated to 10000.15 Revision 2.145 2009/08/07 09:12:02 arekm - lvm2-initrd is enough Revision 2.144 2009/07/16 11:44:18 arekm - R: lvm2 and lvm2-initrd Revision 2.143 2009/07/01 21:34:23 glen - 10000.14 Revision 2.142 2009/07/01 04:12:42 glen - update to 10000.13 Revision 2.141 2009/06/16 09:39:15 zbyniu - R: /usr/bin/ldd; rel 3; STBR Revision 2.140 2009/05/10 13:08:29 glen - release 10000.12 Revision 2.139 2009/04/16 00:33:25 glen - ver 10000.11, fixes lp#359718 Revision 2.138 2009/04/06 15:15:30 glen - 10000.10: %{_libdir}/initrd support Revision 2.137 2009/03/16 22:21:16 hawk - force romfs as default in Titanium if not specified otherwise Revision 2.136 2009/03/14 13:08:11 glen - update to 10000.3 Revision 2.135 2009/03/03 09:35:57 glen - 10000.2 (package lvm module) Revision 2.134 2009/03/02 15:45:52 glen - update to 10000.1 Revision 2.133 2009/02/10 10:19:00 arekm - rel 3; fix IDE loading for 2.6.28 Revision 2.132 2008/11/18 15:07:13 glen - 10000 release Revision 2.131 2008/11/13 17:32:02 arekm - rel 3; update trigger/settle calls Revision 2.130 2008/11/13 09:50:42 glen - upload tarball this time Revision 2.129 2008/11/12 23:47:13 glen - 9000.17: crypted rootfs via cryptsetup-luks Revision 2.128 2008/10/23 22:10:08 qwiat - up to 9000.16 Revision 2.127 2008/08/06 08:56:02 hawk - updated to 9000.15, fixes problem with /dev/rd and /dev/ida being treated as LVM volumes Revision 2.126 2008/07/05 22:13:32 arekm - md5 Revision 2.125 2008/07/05 22:07:56 arekm - 9000.14; inst_d bugfix Revision 2.124 2008/07/05 10:48:10 arekm - up to 9000.13 (destdir and firmware handling fixes) Revision 2.123 2008/07/05 10:33:09 arekm - up to 9000.12 Revision 2.122 2008-05-26 17:47:57 glen - 9000.11 Revision 2.121 2008-05-24 11:47:37 glen - up to 9000.10 Revision 2.120 2008-04-27 21:59:37 glen - md5 Revision 2.119 2008-04-27 21:59:26 glen - 9000.9 Revision 2.118 2008-04-02 14:21:55 glen - release 2 (1 for ac) Revision 2.117 2008-04-02 14:21:19 glen - 9000.8 Revision 2.116 2008-03-11 23:36:09 hawk - updated to 9000.7 Revision 2.115 2008-03-11 14:31:33 hawk - updated to 9000.6 Revision 2.114 2008-02-12 19:49:03 glen - 9000.5 (fixes modinfo looking at current, not target kernel modules) Revision 2.113 2008-02-12 19:36:07 glen - module-init-tools with modinfo -k patch; rel 3 Revision 2.112 2008-02-09 18:50:23 glen - 9000.4, fixes #102 Revision 2.111 2008-02-08 20:40:02 glen - 9000.3 Revision 2.110 2007-12-28 09:21:07 glen - rel 2 Revision 2.109 2007-11-28 21:44:39 glen - update to 9000.1 Revision 2.108 2007-11-06 02:05:42 glen - release 9000 ;) Revision 2.107 2007/11/04 20:52:41 glen - 8985 Revision 2.106 2007/11/03 14:45:45 adamg - updated to 8980 Revision 2.105 2007/10/27 20:37:12 glen - typo.patch not needed on this branch Revision 2.104 2007/10/16 16:28:45 glen - typo fix; rel 2 Revision 2.103 2007/08/31 15:49:17 glen - 8702 Revision 2.102 2007/07/16 14:56:24 hawk - oops! updated md5 Revision 2.101 2007/07/16 14:53:21 hawk - updated to 8682 Revision 2.100 2007/07/16 13:19:04 hawk - updatde to 8668 - removed inst.patch, included in sources Revision 2.99 2007/07/09 07:30:34 arekm - rel 2; fix inst() usage for suspend Revision 2.98 2007/06/30 18:46:45 arekm - up to 8648; supports loading raid456 module Revision 2.97 2007/03/31 16:10:46 arekm - up to 8385 Revision 2.96 2007/03/07 10:03:57 glen - AC-branch merge Revision 2.95 2007/03/07 07:56:31 arekm - up to 8360 Revision 2.94 2007/02/13 07:16:45 glen - tabs in preamble Revision 2.93 2007/02/12 00:48:51 baggins - converted to UTF-8 Revision 2.92 2007/02/09 14:48:17 arekm - rel 3; R: cpio because it is now default for new configurations and old one can still use genromfs Revision 2.91 2007/02/07 10:14:08 arekm - conflicts with older udev-initrd versions Revision 2.90 2007/01/27 18:39:09 czarny - yet another bug, this time dobule 0 adding Revision 2.89 2007/01/27 17:08:18 czarny - up to 8201 - I think I've resolved the 806 instead of 0806 bug Revision 2.88 2007/01/27 14:40:00 czarny - up to rev 8199 - moved to using udevd instead udev binary (dropped in udev project) Revision 2.87 2007/01/11 14:00:50 glen - update to 8142: fixes /initrd/dev not being unmounted Revision 2.86 2006/12/14 17:26:16 czarny - die df form glen ;p Revision 2.85 2006/12/14 16:47:28 czarny - up to 8103 Revision 2.84 2006/11/30 14:25:24 glen - md5 fix Revision 2.83 2006/11/30 14:24:13 glen - 7982 (LABEL= and UUID= fixes) Revision 2.82 2006/10/27 14:43:30 glen - 7899 Revision 2.81 2006/10/19 13:47:53 glen - update to 7877 Revision 2.80 2006/08/20 14:51:19 arekm - rel 2; ready for new busybox Revision 2.79 2006/08/17 09:09:00 arekm - up to 7673 (firmware loading from initrd support) Revision 2.78 2006/05/29 23:18:01 glen - source on distfiles Revision 2.77 2006/05/29 22:45:02 glen - 7453 Revision 2.76 2006/05/08 17:13:55 baggins - 7386 Revision 2.75 2006/04/09 19:09:48 arekm - up to 7339 Revision 2.74 2006/04/09 13:36:06 arekm - up to 7337 (with mainline suspend to disk support) Revision 2.73 2006/02/22 18:31:26 glen - lvm on softraid fixes from svn, rel 2 STBR Revision 2.72 2006/02/21 13:44:52 arekm - up to 6894 Revision 2.71 2006/01/18 17:04:53 glen - kill unused bcond Revision 2.70 2006/01/18 08:16:13 arekm - use ftp1 Revision 2.69 2006/01/18 08:12:38 arekm - Updated to 6838 (mdraid, udev, lvm2 updates). Revision 2.68 2005/12/04 22:58:06 glen - adapterized (sorted %verify flags) Revision 2.67 2005/12/02 19:37:08 glen - add procdata (real-root-dev) patch to md0 - adapterized, rel 8 Revision 2.66 2005/11/29 08:35:14 arekm - rel 7 (crap) release. Revision 2.65 2005/11/26 18:51:26 arekm - rel 6 Revision 2.64 2005/11/26 18:34:41 djrzulf - patch3 -p1, Revision 2.63 2005/11/26 15:38:25 arekm - rel 5; fix usleep for modules with - in name. Revision 2.62 2005/11/17 13:07:09 arekm - Sleep after module load support; rel 4 Revision 2.61 2005/10/13 17:07:53 glen - conditional patch2 Revision 2.60 2005/10/13 16:01:16 glen - partial dmraid fix Revision 2.59 2005/07/13 15:50:56 arekm - rel 3 Revision 2.58 2005/06/28 08:24:13 blues - don't require mdadm on _every_ system. Require strict version of mdadm-initrd in mdadm. Should be enough Revision 2.57 2005/06/27 13:47:10 arekm - R: mdadm itself, too. Revision 2.56 2005/06/27 06:31:29 arekm - fix mdadm >= v1.12.0 Revision 2.55 2004/10/20 22:10:07 ankry - workaround for man generation problems (-en_xml patch), regenerate manpage, rel. 2 Revision 2.54 2004/09/25 21:26:57 arekm - updated to 4605 Revision 2.53 2004/08/09 00:08:10 arekm - updated to 4420 (suspend2 2.0.0.103 support). Revision 2.52 2004/08/01 22:51:49 arekm - updated to 4413 Revision 2.51 2004/07/07 15:15:59 qboosh - nobody pointed better solution - so R: mdadm-initrd for working softraid installations; release 2 Revision 2.50 2004/06/24 22:40:05 arekm - updated to 4242 (rootfs on LVM2 working nicely, tested) Revision 2.49 2004/06/22 17:08:02 arekm - md5 Revision 2.48 2004/06/22 17:07:28 arekm - updated to 4159 Revision 2.47 2004/05/30 09:00:25 pluto - %desc fixed. Revision 2.46 2004/05/24 16:26:29 kali - added %verify(not md5 size mtime) to config files Revision 2.45 2004/04/23 21:12:10 arekm - rel 3; fix raid related typo Revision 2.44 2004/04/13 09:27:22 arekm - remove not used code; rel 2 Revision 2.43 2004/04/03 16:01:13 arekm Updated to 3865: - enhanced LVM support (fix LVM1 tools detection, check of proper binaries existence, root only rootfs VG) - support devfs like names for softraid detection - fix creation of subdirectiories in initrd image - load ide-generic if rootfs is on IDE and no other IDE related modules found. - support for LVM on top of Software RAID case NOTE: This release is mainly for testing testing. Revision 2.42 2004/04/03 10:33:57 areq - Requires: pci-database >= 0.4 Revision 2.41 2004/03/16 15:40:15 qboosh - cosmetics Revision 2.40 2004/03/08 14:56:02 wiget - updated to 3416 Revision 2.39 2004/01/23 23:40:03 arekm - released 3219 (can use mdasseble on initrd - smaller than whole mdadm) Revision 2.38 2004/01/21 15:11:41 arekm - updated to trunk (r3196); uses mdadm-initrd for raid starting Revision 2.37 2003/12/28 23:07:35 arekm - this is noarch prog Revision 2.36 2003/12/25 18:58:55 arekm - updated to 3075 (tags/3077) Revision 2.35 2003/09/18 23:31:32 arekm - updated to 1354 (raid fixed) Revision 2.34 2003/09/18 22:28:59 arekm - updated to trunk version (1352) Revision 2.33 2003/09/02 18:40:41 mmazur - rel 3 for ac Revision 2.32 2003/08/24 12:26:49 areq - 2.57 Revision 2.31 2003/08/23 20:27:15 areq - 2.56 - with busybox-initrd Revision 2.30 2003/08/11 20:44:54 ankry - cosmetics Revision 2.29 2003/08/11 15:10:09 areq - 2.40 Revision 2.28 2003/08/10 21:10:39 areq - 2.38 Revision 2.27 2003/08/09 21:43:39 areq - 2.34 Revision 2.26 2003/08/07 20:13:45 arekm - released current cvs ad 2.30 Revision 2.25 2003/05/25 11:00:51 malekith - massive attack, adding Source-md5 Revision 2.24 2003/05/25 05:47:48 misi3k - massive attack s/pld.org.pl/pld-linux.org/ Revision 2.23 2003/04/12 13:36:41 wiget - R: new bsp - release 2 Revision 2.22 2003/04/09 12:07:13 wiget - updated to 2.26 Revision 2.21 2002/12/19 12:01:54 orzech - geninitrd works fine on alphas too - rel. 2 Revision 2.20 2002/10/14 14:53:49 wiget - 2.22 (bugfix release) Revision 2.19 2002/09/30 16:48:15 wiget - version 2.21 - compressed modules support Revision 2.18 2002/09/06 15:07:00 wiget - 2.20 Revision 2.17 2002/04/25 16:22:15 arturs - fixed a small typo Revision 2.16 2002/03/25 15:31:20 wiget - 2.19 fix soft raid starting (malekith) Revision 2.15 2002/03/13 15:29:38 wiget - version 2.18 - UUID and LABEL support for ext3 - error messages fixes Revision 2.14 2002/03/11 23:08:12 martii - added ppc ExlusiveArch Revision 2.13 2002/02/22 23:28:56 kloczek - removed all Group fields translations (our rpm now can handle translating Group field using gettext). Revision 2.12 2002/02/20 13:00:52 wiget - --fs is back, but warn if it used; exit if modules.dep is missing; version 2.16 Revision 2.11 2002/02/19 15:15:58 wiget - version 2.13 - trash support dropped (me) - root on loop device disabled (me) - new configuration option EXIT_IF_MISSING (me) - parse modules.dep and find dependend modules (malekith) Revision 2.10 2002/01/18 02:13:02 kloczek - perl -pi -e "s/pld-list\@pld.org.pl/feedback\@pld.org.pl/" Revision 2.9 2001/11/28 23:38:23 kloczek - release 2. Revision 2.8 2001/11/28 12:34:31 qboosh - typo, fixed Groups Revision 2.7 2001/09/07 15:21:55 wiget - 2.6, fix Mylex RAID handling Revision 2.6 2001/07/04 12:21:31 wiget - 2.4, some RAID (software and hardware) fixes, added support for UUID/LABEL on xfs Revision 2.5 2001/07/02 09:34:54 malekith - 2.3, don't use modutils.conf if doesn't exists - prev was 2.1 w/o UUID support Revision 2.4 2001/03/19 13:17:33 michuz - version 2.1 - this version works fine with 2.4.x Revision 2.3 2001/03/02 12:13:09 kloczek - cosmetics. Revision 2.2 2001/03/02 10:06:34 inglod - add %build Revision 2.1 2001/02/23 14:23:23 malekith - Removed Req: e2fsutils (wasn't needed long time ago, we use romfs), trash and insmod.static - they are replaced by bsp. Rationale: They can be needed when special option are turned on, but in normal config they are not, and as this is base pkg, user should not be forced to install them. Revision 2.0 2001/02/23 13:57:34 inglod - Fixed for new release. (2.0) Revision 1.7 2001/02/01 16:27:34 kloczek - Requires for rc-scripts changed to Prereq. Revision 1.6 2001/01/06 15:09:59 zagrodzki - release 2 - requires: sh-utils Revision 1.5 2000/12/06 19:47:10 kloczek - New version 1.2: - use trash instead statically linked ash. Revision 1.4 2000/12/05 13:42:04 zagrodzki - release 2 - requires: mktemp >= 1.5-8 Revision 1.3 2000/11/30 18:40:10 baggins - updated to 1.1 Revision 1.2 2000/11/09 10:13:59 kloczek - added %config(noreplace) for /etc/sysconfig/geninitrd, - removed /bin/sh from Requires (autogenerated), - added Source url. Revision 1.1 2000/11/09 09:46:13 jajcus - initial spec (based on mkinitrd.spec)