1 # $Revision: 2.181 $, $Date: 2011/04/10 12:40:58 $
3 # - BUG: you can't set in /etc/mdadm.conf:
4 # DEVICE partitions containers
5 # (which is default BTW if none set). Generation of initrd will fail
7 Summary: Creates an initial ramdisk image for preloading modules
8 Summary(pl.UTF-8): Narzędzie do tworzenia inicjalnego ramdysku używanego przy starcie systemu
14 Group: Applications/System
15 Source0: %{name}-%{version}.tar.gz
16 # Source0-md5: 9d75e347ff49312209e97ead93378f4a
17 Patch0: %{name}-romfs.patch
18 Patch1: %{name}-gzip-compressor.patch
19 Patch2: %{name}-svn.patch
20 BuildRequires: xmlto >= 0:0.0.18-1
21 Requires: /usr/bin/ldd
23 Requires: busybox-initrd > 1.00-4
30 Requires: mktemp >= 1.5-8
31 Requires: module-init-tools >= 3.2.2-6
33 Requires: pci-database >= 0.4
34 Requires: rc-scripts >= 0.2.7
36 %if "%{pld_release}" == "ti"
38 Requires: mdadm-initrd >= 1.12.0-1
40 # otherwise LVM subsystem is not enabled in geninitrd
42 # without this softraid installations of PLD fail
43 Suggests: mdadm-initrd >= 1.12.0-1
46 %if "%{pld_release}" != "ac"
47 Suggests: util-linux-initrd
50 %if "%{pld_release}" == "ac"
51 Conflicts: grubby < 5.0.4-3.1
53 Conflicts: grubby < 6.0.24-3
55 Conflicts: udev-initrd < 1:104
56 Conflicts: xz < 4.999.9
58 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
61 Geninitrd creates filesystem images for use as initial ramdisk
62 (initrd) images. These ramdisk images are often used to preload the
63 block device modules (SCSI or RAID) needed to access the root
66 In other words, generic kernels can be built without drivers for any
67 SCSI adapters which load the SCSI driver as a module. Since the kernel
68 needs to read those modules, but in this case it isn't able to address
69 the SCSI adapter, an initial ramdisk is used. The initial ramdisk is
70 loaded by the operating system loader (normally LILO) and is available
71 to the kernel as soon as the ramdisk is loaded. The ramdisk image
72 loads the proper SCSI adapter and allows the kernel to mount the root
73 filesystem. The geninitrd program creates such a ramdisk using
74 information found in the /etc/modules.conf file.
76 %description -l pl.UTF-8
77 Geninitrd służy do tworzenia obrazu systemu plikowego używanego jako
78 inicjalny ramdysk (initrd), z którego przy starcie systemu są ładowane
79 moduły kernela z obsługą urządzeń których obsługa nie jest
80 wkompilowana w kernel. Zazwyczaj modułami ładowanymi z inicjalnego
81 systemu plikowego są sterowniki SCSI, IDE czy też RAID po to żeby w
82 dalszej części inicjacji systemu był możliwy dostęp do głównego
83 systemu plikowego (root fs).
85 Dzięki initrd jest możliwe używanie dystrybucyjnego kernela w którym
86 wkompilowana jest minimalna ilość obsługi różnych urządzeń, a reszta
87 kodu obsługi sterowników SCSI, IDE czy RAID jest doczytywana w trakcie
88 startu z initrd. Skrypt geninitrd generuje obraz ramdysku na podstawie
89 bieżących informacji zawartych w /etc/modules.conf.
93 %if "%{pld_release}" == "ti"
103 rm -rf $RPM_BUILD_ROOT
106 DESTDIR=$RPM_BUILD_ROOT
109 rm -rf $RPM_BUILD_ROOT
112 %defattr(644,root,root,755)
114 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/geninitrd
115 %attr(755,root,root) /sbin/geninitrd
116 %{_mandir}/man8/geninitrd.8*
119 /lib/geninitrd/functions
120 /lib/geninitrd/mod-*.sh
121 %attr(755,root,root) /lib/geninitrd/extract-ikconfig
123 %define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
125 * %{date} PLD Team <feedback@pld-linux.org>
126 All persons listed below can be reached at <cvs_login>@pld-linux.org
128 $Log: geninitrd.spec,v $
129 Revision 2.181 2011/04/10 12:40:58 adamg
130 - Requires: glibc-misc (ldd)
132 Revision 2.180 2011/03/11 11:36:22 arekm
133 - rel 6; don't resolve symlink for luks device nodes
135 Revision 2.179 2011/03/06 16:15:17 arekm
136 - rel 4; fix mod-sata finding too much bug
138 Revision 2.178 2011/03/04 09:24:56 arekm
139 - rel 4; fallback to ls bug fixed
141 Revision 2.177 2011/03/01 10:34:47 arekm
142 - rel 3; bugfix for users using rootfsflags boot option
144 Revision 2.176 2011/02/25 16:08:26 arekm
145 - rel 2; no negative reports
147 Revision 2.175 2011/02/19 08:29:38 arekm
148 - 10000.32 (experimental).
150 Revision 2.174 2011/02/11 01:33:25 sparky
151 - s/util-linux-ng7util-linux/
153 Revision 2.173 2011/02/09 19:23:07 glen
156 Revision 2.172 2011/01/27 20:35:20 glen
157 - still experimental 10000.31
159 Revision 2.171 2011/01/13 20:32:12 arekm
160 Up to 10000.30 (experimental due to SATA autodetection).
162 Revision 2.170 2010/12/19 10:19:42 glen
163 - suggest for blkid in image generation (grub2 defaults to UUID mode)
165 Revision 2.169 2010/10/26 20:24:44 blues
168 Revision 2.168 2010/04/20 05:31:53 arekm
169 - rel 5; don't require main mdadm package (use initrd version)
171 Revision 2.167 2010/03/29 20:23:20 evil
173 - added geninitrd-tuxonice_on_dm.patch, moving tuxonice script down in hierarchy, to allow tuxonice snapshot device be device mapper device(LUKS, LVM, dmraid)
175 Revision 2.166 2010/03/08 11:01:20 arekm
176 - rel 3; sync scsi scanning for >= 2.6.30
178 Revision 2.165 2010/03/06 11:21:21 arekm
179 - mdadm itself is also needed for detecting md raid
181 Revision 2.164 2010/02/25 13:50:35 hawk
184 Revision 2.163 2010/02/25 13:18:56 hawk
185 - force sync scan for scsi_mod in Titanium instead of using hack
187 Revision 2.162 2010/02/05 12:46:01 glen
190 Revision 2.161 2010/01/21 15:57:52 baggins
193 Revision 2.160 2010/01/12 11:15:19 glen
196 Revision 2.159 2010/01/02 13:46:45 pawelz
197 - There was an empty man file in sources, so make was not regenerating this
198 file. Added make clean to remove bogus man file and allow to regenerate it.
199 Reported by Krystian Tomczyk.
202 Revision 2.158 2009/09/19 20:55:27 hawk
203 - R: not S: lvm2-initrd and mdadm-initrd in Titanium
205 Revision 2.157 2009/09/19 20:48:23 hawk
206 - use gzip as compressor in Titanium unless user has specified otherwise
208 Revision 2.156 2009/09/15 08:04:05 gotar
209 - s/Requires/Suggests/ for mdadm-initrd (only for software RAIDs users)
211 Revision 2.155 2009/09/14 23:05:33 gotar
212 - busybox-initrd 1.00-4 (probably some newer ones too) causes:
213 usage: switch_root NEW_ROOT
214 kernel panic - not syncing
216 Revision 2.154 2009/09/14 22:38:51 gotar
217 - anyone using LVM should follow this suggestion, not requirement
219 Revision 2.153 2009/09/04 13:09:59 arekm
220 - rel 6; xz and lzma formats support
222 Revision 2.152 2009/09/04 12:38:45 arekm
223 - rel 5; use lzma format for xz
225 Revision 2.151 2009/09/04 11:04:25 arekm
228 Revision 2.150 2009/09/04 10:37:40 arekm
229 - rel 3; use default compression level for lzma
231 Revision 2.149 2009/08/31 19:33:18 arekm
234 Revision 2.148 2009/08/28 22:12:49 arekm
237 Revision 2.147 2009/08/15 22:13:47 hawk
238 - updated to 10000.16, fixes lvm.static in initrd (/dev/urandom must exist
239 and /sys must be mounted)
241 Revision 2.146 2009/08/11 12:24:03 adamg
242 - updated to 10000.15
244 Revision 2.145 2009/08/07 09:12:02 arekm
245 - lvm2-initrd is enough
247 Revision 2.144 2009/07/16 11:44:18 arekm
248 - R: lvm2 and lvm2-initrd
250 Revision 2.143 2009/07/01 21:34:23 glen
253 Revision 2.142 2009/07/01 04:12:42 glen
256 Revision 2.141 2009/06/16 09:39:15 zbyniu
257 - R: /usr/bin/ldd; rel 3; STBR
259 Revision 2.140 2009/05/10 13:08:29 glen
262 Revision 2.139 2009/04/16 00:33:25 glen
263 - ver 10000.11, fixes lp#359718
265 Revision 2.138 2009/04/06 15:15:30 glen
266 - 10000.10: %{_libdir}/initrd support
268 Revision 2.137 2009/03/16 22:21:16 hawk
269 - force romfs as default in Titanium if not specified otherwise
271 Revision 2.136 2009/03/14 13:08:11 glen
274 Revision 2.135 2009/03/03 09:35:57 glen
275 - 10000.2 (package lvm module)
277 Revision 2.134 2009/03/02 15:45:52 glen
280 Revision 2.133 2009/02/10 10:19:00 arekm
281 - rel 3; fix IDE loading for 2.6.28
283 Revision 2.132 2008/11/18 15:07:13 glen
286 Revision 2.131 2008/11/13 17:32:02 arekm
287 - rel 3; update trigger/settle calls
289 Revision 2.130 2008/11/13 09:50:42 glen
290 - upload tarball this time
292 Revision 2.129 2008/11/12 23:47:13 glen
293 - 9000.17: crypted rootfs via cryptsetup-luks
295 Revision 2.128 2008/10/23 22:10:08 qwiat
298 Revision 2.127 2008/08/06 08:56:02 hawk
299 - updated to 9000.15, fixes problem with /dev/rd and /dev/ida being treated
302 Revision 2.126 2008/07/05 22:13:32 arekm
305 Revision 2.125 2008/07/05 22:07:56 arekm
306 - 9000.14; inst_d bugfix
308 Revision 2.124 2008/07/05 10:48:10 arekm
309 - up to 9000.13 (destdir and firmware handling fixes)
311 Revision 2.123 2008/07/05 10:33:09 arekm
314 Revision 2.122 2008-05-26 17:47:57 glen
317 Revision 2.121 2008-05-24 11:47:37 glen
320 Revision 2.120 2008-04-27 21:59:37 glen
323 Revision 2.119 2008-04-27 21:59:26 glen
326 Revision 2.118 2008-04-02 14:21:55 glen
327 - release 2 (1 for ac)
329 Revision 2.117 2008-04-02 14:21:19 glen
332 Revision 2.116 2008-03-11 23:36:09 hawk
335 Revision 2.115 2008-03-11 14:31:33 hawk
338 Revision 2.114 2008-02-12 19:49:03 glen
339 - 9000.5 (fixes modinfo looking at current, not target kernel modules)
341 Revision 2.113 2008-02-12 19:36:07 glen
342 - module-init-tools with modinfo -k <kernelversion> patch; rel 3
344 Revision 2.112 2008-02-09 18:50:23 glen
347 Revision 2.111 2008-02-08 20:40:02 glen
350 Revision 2.110 2007-12-28 09:21:07 glen
353 Revision 2.109 2007-11-28 21:44:39 glen
356 Revision 2.108 2007-11-06 02:05:42 glen
359 Revision 2.107 2007/11/04 20:52:41 glen
362 Revision 2.106 2007/11/03 14:45:45 adamg
365 Revision 2.105 2007/10/27 20:37:12 glen
366 - typo.patch not needed on this branch
368 Revision 2.104 2007/10/16 16:28:45 glen
371 Revision 2.103 2007/08/31 15:49:17 glen
374 Revision 2.102 2007/07/16 14:56:24 hawk
377 Revision 2.101 2007/07/16 14:53:21 hawk
380 Revision 2.100 2007/07/16 13:19:04 hawk
382 - removed inst.patch, included in sources
384 Revision 2.99 2007/07/09 07:30:34 arekm
385 - rel 2; fix inst() usage for suspend
387 Revision 2.98 2007/06/30 18:46:45 arekm
388 - up to 8648; supports loading raid456 module
390 Revision 2.97 2007/03/31 16:10:46 arekm
393 Revision 2.96 2007/03/07 10:03:57 glen
396 Revision 2.95 2007/03/07 07:56:31 arekm
399 Revision 2.94 2007/02/13 07:16:45 glen
402 Revision 2.93 2007/02/12 00:48:51 baggins
405 Revision 2.92 2007/02/09 14:48:17 arekm
406 - rel 3; R: cpio because it is now default for new configurations and old one can still use genromfs
408 Revision 2.91 2007/02/07 10:14:08 arekm
409 - conflicts with older udev-initrd versions
411 Revision 2.90 2007/01/27 18:39:09 czarny
412 - yet another bug, this time dobule 0 adding
414 Revision 2.89 2007/01/27 17:08:18 czarny
416 - I think I've resolved the 806 instead of 0806 bug
418 Revision 2.88 2007/01/27 14:40:00 czarny
420 - moved to using udevd instead udev binary (dropped in udev project)
422 Revision 2.87 2007/01/11 14:00:50 glen
423 - update to 8142: fixes /initrd/dev not being unmounted
425 Revision 2.86 2006/12/14 17:26:16 czarny
426 - die df form glen ;p
428 Revision 2.85 2006/12/14 16:47:28 czarny
431 Revision 2.84 2006/11/30 14:25:24 glen
434 Revision 2.83 2006/11/30 14:24:13 glen
435 - 7982 (LABEL= and UUID= fixes)
437 Revision 2.82 2006/10/27 14:43:30 glen
440 Revision 2.81 2006/10/19 13:47:53 glen
443 Revision 2.80 2006/08/20 14:51:19 arekm
444 - rel 2; ready for new busybox
446 Revision 2.79 2006/08/17 09:09:00 arekm
447 - up to 7673 (firmware loading from initrd support)
449 Revision 2.78 2006/05/29 23:18:01 glen
450 - source on distfiles
452 Revision 2.77 2006/05/29 22:45:02 glen
455 Revision 2.76 2006/05/08 17:13:55 baggins
458 Revision 2.75 2006/04/09 19:09:48 arekm
461 Revision 2.74 2006/04/09 13:36:06 arekm
462 - up to 7337 (with mainline suspend to disk support)
464 Revision 2.73 2006/02/22 18:31:26 glen
465 - lvm on softraid fixes from svn, rel 2 STBR
467 Revision 2.72 2006/02/21 13:44:52 arekm
470 Revision 2.71 2006/01/18 17:04:53 glen
473 Revision 2.70 2006/01/18 08:16:13 arekm
476 Revision 2.69 2006/01/18 08:12:38 arekm
477 - Updated to 6838 (mdraid, udev, lvm2 updates).
479 Revision 2.68 2005/12/04 22:58:06 glen
480 - adapterized (sorted %verify flags)
482 Revision 2.67 2005/12/02 19:37:08 glen
483 - add procdata (real-root-dev) patch to md0
486 Revision 2.66 2005/11/29 08:35:14 arekm
487 - rel 7 (crap) release.
489 Revision 2.65 2005/11/26 18:51:26 arekm
492 Revision 2.64 2005/11/26 18:34:41 djrzulf
495 Revision 2.63 2005/11/26 15:38:25 arekm
496 - rel 5; fix usleep for modules with - in name.
498 Revision 2.62 2005/11/17 13:07:09 arekm
499 - Sleep after module load support; rel 4
501 Revision 2.61 2005/10/13 17:07:53 glen
504 Revision 2.60 2005/10/13 16:01:16 glen
507 Revision 2.59 2005/07/13 15:50:56 arekm
510 Revision 2.58 2005/06/28 08:24:13 blues
511 - don't require mdadm on _every_ system. Require strict version of
512 mdadm-initrd in mdadm. Should be enough
514 Revision 2.57 2005/06/27 13:47:10 arekm
515 - R: mdadm itself, too.
517 Revision 2.56 2005/06/27 06:31:29 arekm
518 - fix mdadm >= v1.12.0
520 Revision 2.55 2004/10/20 22:10:07 ankry
521 - workaround for man generation problems (-en_xml patch), regenerate manpage, rel. 2
523 Revision 2.54 2004/09/25 21:26:57 arekm
526 Revision 2.53 2004/08/09 00:08:10 arekm
527 - updated to 4420 (suspend2 2.0.0.103 support).
529 Revision 2.52 2004/08/01 22:51:49 arekm
532 Revision 2.51 2004/07/07 15:15:59 qboosh
533 - nobody pointed better solution - so R: mdadm-initrd for working
534 softraid installations; release 2
536 Revision 2.50 2004/06/24 22:40:05 arekm
537 - updated to 4242 (rootfs on LVM2 working nicely, tested)
539 Revision 2.49 2004/06/22 17:08:02 arekm
542 Revision 2.48 2004/06/22 17:07:28 arekm
545 Revision 2.47 2004/05/30 09:00:25 pluto
548 Revision 2.46 2004/05/24 16:26:29 kali
549 - added %verify(not md5 size mtime) to config files
551 Revision 2.45 2004/04/23 21:12:10 arekm
552 - rel 3; fix raid related typo
554 Revision 2.44 2004/04/13 09:27:22 arekm
555 - remove not used code; rel 2
557 Revision 2.43 2004/04/03 16:01:13 arekm
559 - enhanced LVM support (fix LVM1 tools detection,
560 check of proper binaries existence, root only rootfs VG)
561 - support devfs like names for softraid detection
562 - fix creation of subdirectiories in initrd image
563 - load ide-generic if rootfs is on IDE and no other
564 IDE related modules found.
565 - support for LVM on top of Software RAID case
566 NOTE: This release is mainly for testing testing.
568 Revision 2.42 2004/04/03 10:33:57 areq
569 - Requires: pci-database >= 0.4
571 Revision 2.41 2004/03/16 15:40:15 qboosh
574 Revision 2.40 2004/03/08 14:56:02 wiget
577 Revision 2.39 2004/01/23 23:40:03 arekm
578 - released 3219 (can use mdasseble on initrd - smaller than whole mdadm)
580 Revision 2.38 2004/01/21 15:11:41 arekm
581 - updated to trunk (r3196); uses mdadm-initrd for raid starting
583 Revision 2.37 2003/12/28 23:07:35 arekm
584 - this is noarch prog
586 Revision 2.36 2003/12/25 18:58:55 arekm
587 - updated to 3075 (tags/3077)
589 Revision 2.35 2003/09/18 23:31:32 arekm
590 - updated to 1354 (raid fixed)
592 Revision 2.34 2003/09/18 22:28:59 arekm
593 - updated to trunk version (1352)
595 Revision 2.33 2003/09/02 18:40:41 mmazur
598 Revision 2.32 2003/08/24 12:26:49 areq
601 Revision 2.31 2003/08/23 20:27:15 areq
602 - 2.56 - with busybox-initrd
604 Revision 2.30 2003/08/11 20:44:54 ankry
607 Revision 2.29 2003/08/11 15:10:09 areq
610 Revision 2.28 2003/08/10 21:10:39 areq
613 Revision 2.27 2003/08/09 21:43:39 areq
616 Revision 2.26 2003/08/07 20:13:45 arekm
617 - released current cvs ad 2.30
619 Revision 2.25 2003/05/25 11:00:51 malekith
620 - massive attack, adding Source-md5
622 Revision 2.24 2003/05/25 05:47:48 misi3k
623 - massive attack s/pld.org.pl/pld-linux.org/
625 Revision 2.23 2003/04/12 13:36:41 wiget
629 Revision 2.22 2003/04/09 12:07:13 wiget
632 Revision 2.21 2002/12/19 12:01:54 orzech
633 - geninitrd works fine on alphas too
636 Revision 2.20 2002/10/14 14:53:49 wiget
637 - 2.22 (bugfix release)
639 Revision 2.19 2002/09/30 16:48:15 wiget
641 - compressed modules support
643 Revision 2.18 2002/09/06 15:07:00 wiget
646 Revision 2.17 2002/04/25 16:22:15 arturs
649 Revision 2.16 2002/03/25 15:31:20 wiget
651 fix soft raid starting (malekith)
653 Revision 2.15 2002/03/13 15:29:38 wiget
655 - UUID and LABEL support for ext3
656 - error messages fixes
658 Revision 2.14 2002/03/11 23:08:12 martii
659 - added ppc ExlusiveArch
661 Revision 2.13 2002/02/22 23:28:56 kloczek
662 - removed all Group fields translations (our rpm now can handle translating
663 Group field using gettext).
665 Revision 2.12 2002/02/20 13:00:52 wiget
666 - --fs is back, but warn if it used; exit if modules.dep is missing; version 2.16
668 Revision 2.11 2002/02/19 15:15:58 wiget
670 - trash support dropped (me)
671 - root on loop device disabled (me)
672 - new configuration option EXIT_IF_MISSING (me)
673 - parse modules.dep and find dependend modules (malekith)
675 Revision 2.10 2002/01/18 02:13:02 kloczek
676 - perl -pi -e "s/pld-list\@pld.org.pl/feedback\@pld.org.pl/"
678 Revision 2.9 2001/11/28 23:38:23 kloczek
681 Revision 2.8 2001/11/28 12:34:31 qboosh
684 Revision 2.7 2001/09/07 15:21:55 wiget
685 - 2.6, fix Mylex RAID handling
687 Revision 2.6 2001/07/04 12:21:31 wiget
688 - 2.4, some RAID (software and hardware) fixes, added support for UUID/LABEL on xfs
690 Revision 2.5 2001/07/02 09:34:54 malekith
691 - 2.3, don't use modutils.conf if doesn't exists
692 - prev was 2.1 w/o UUID support
694 Revision 2.4 2001/03/19 13:17:33 michuz
696 - this version works fine with 2.4.x
698 Revision 2.3 2001/03/02 12:13:09 kloczek
701 Revision 2.2 2001/03/02 10:06:34 inglod
704 Revision 2.1 2001/02/23 14:23:23 malekith
705 - Removed Req: e2fsutils (wasn't needed long time ago, we use
706 romfs), trash and insmod.static - they are replaced by bsp.
708 They can be needed when special option are turned on,
709 but in normal config they are not, and as this is base
710 pkg, user should not be forced to install them.
712 Revision 2.0 2001/02/23 13:57:34 inglod
713 - Fixed for new release. (2.0)
715 Revision 1.7 2001/02/01 16:27:34 kloczek
716 - Requires for rc-scripts changed to Prereq.
718 Revision 1.6 2001/01/06 15:09:59 zagrodzki
722 Revision 1.5 2000/12/06 19:47:10 kloczek
724 - use trash instead statically linked ash.
726 Revision 1.4 2000/12/05 13:42:04 zagrodzki
728 - requires: mktemp >= 1.5-8
730 Revision 1.3 2000/11/30 18:40:10 baggins
733 Revision 1.2 2000/11/09 10:13:59 kloczek
734 - added %config(noreplace) for /etc/sysconfig/geninitrd,
735 - removed /bin/sh from Requires (autogenerated),
738 Revision 1.1 2000/11/09 09:46:13 jajcus
739 - initial spec (based on mkinitrd.spec)