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
32 Requires: mktemp >= 1.5-8
33 Requires: module-init-tools >= 3.2.2-6
35 Requires: pci-database >= 0.4
36 Requires: rc-scripts >= 0.2.7
38 %if "%{pld_release}" == "ti"
40 Requires: mdadm-initrd >= 1.12.0-1
42 # otherwise LVM subsystem is not enabled in geninitrd
44 # without this softraid installations of PLD fail
45 Suggests: mdadm-initrd >= 1.12.0-1
48 %if "%{pld_release}" != "ac"
49 Suggests: util-linux-initrd
52 %if "%{pld_release}" == "ac"
53 Conflicts: grubby < 5.0.4-3.1
55 Conflicts: grubby < 6.0.24-3
57 Conflicts: udev-initrd < 1:104
58 Conflicts: xz < 4.999.9
60 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
63 Geninitrd creates filesystem images for use as initial ramdisk
64 (initrd) images. These ramdisk images are often used to preload the
65 block device modules (SCSI or RAID) needed to access the root
68 In other words, generic kernels can be built without drivers for any
69 SCSI adapters which load the SCSI driver as a module. Since the kernel
70 needs to read those modules, but in this case it isn't able to address
71 the SCSI adapter, an initial ramdisk is used. The initial ramdisk is
72 loaded by the operating system loader (normally LILO) and is available
73 to the kernel as soon as the ramdisk is loaded. The ramdisk image
74 loads the proper SCSI adapter and allows the kernel to mount the root
75 filesystem. The geninitrd program creates such a ramdisk using
76 information found in the /etc/modules.conf file.
78 %description -l pl.UTF-8
79 Geninitrd służy do tworzenia obrazu systemu plikowego używanego jako
80 inicjalny ramdysk (initrd), z którego przy starcie systemu są ładowane
81 moduły kernela z obsługą urządzeń których obsługa nie jest
82 wkompilowana w kernel. Zazwyczaj modułami ładowanymi z inicjalnego
83 systemu plikowego są sterowniki SCSI, IDE czy też RAID po to żeby w
84 dalszej części inicjacji systemu był możliwy dostęp do głównego
85 systemu plikowego (root fs).
87 Dzięki initrd jest możliwe używanie dystrybucyjnego kernela w którym
88 wkompilowana jest minimalna ilość obsługi różnych urządzeń, a reszta
89 kodu obsługi sterowników SCSI, IDE czy RAID jest doczytywana w trakcie
90 startu z initrd. Skrypt geninitrd generuje obraz ramdysku na podstawie
91 bieżących informacji zawartych w /etc/modules.conf.
95 %if "%{pld_release}" == "ti"
105 rm -rf $RPM_BUILD_ROOT
108 DESTDIR=$RPM_BUILD_ROOT
111 rm -rf $RPM_BUILD_ROOT
114 %defattr(644,root,root,755)
116 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/geninitrd
117 %attr(755,root,root) /sbin/geninitrd
118 %{_mandir}/man8/geninitrd.8*
121 /lib/geninitrd/functions
122 /lib/geninitrd/mod-*.sh
123 %attr(755,root,root) /lib/geninitrd/extract-ikconfig
125 %define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
127 * %{date} PLD Team <feedback@pld-linux.org>
128 All persons listed below can be reached at <cvs_login>@pld-linux.org
130 $Log: geninitrd.spec,v $
131 Revision 2.181 2011/04/10 12:40:58 adamg
132 - Requires: glibc-misc (ldd)
134 Revision 2.180 2011/03/11 11:36:22 arekm
135 - rel 6; don't resolve symlink for luks device nodes
137 Revision 2.179 2011/03/06 16:15:17 arekm
138 - rel 4; fix mod-sata finding too much bug
140 Revision 2.178 2011/03/04 09:24:56 arekm
141 - rel 4; fallback to ls bug fixed
143 Revision 2.177 2011/03/01 10:34:47 arekm
144 - rel 3; bugfix for users using rootfsflags boot option
146 Revision 2.176 2011/02/25 16:08:26 arekm
147 - rel 2; no negative reports
149 Revision 2.175 2011/02/19 08:29:38 arekm
150 - 10000.32 (experimental).
152 Revision 2.174 2011/02/11 01:33:25 sparky
153 - s/util-linux-ng7util-linux/
155 Revision 2.173 2011/02/09 19:23:07 glen
158 Revision 2.172 2011/01/27 20:35:20 glen
159 - still experimental 10000.31
161 Revision 2.171 2011/01/13 20:32:12 arekm
162 Up to 10000.30 (experimental due to SATA autodetection).
164 Revision 2.170 2010/12/19 10:19:42 glen
165 - suggest for blkid in image generation (grub2 defaults to UUID mode)
167 Revision 2.169 2010/10/26 20:24:44 blues
170 Revision 2.168 2010/04/20 05:31:53 arekm
171 - rel 5; don't require main mdadm package (use initrd version)
173 Revision 2.167 2010/03/29 20:23:20 evil
175 - added geninitrd-tuxonice_on_dm.patch, moving tuxonice script down in hierarchy, to allow tuxonice snapshot device be device mapper device(LUKS, LVM, dmraid)
177 Revision 2.166 2010/03/08 11:01:20 arekm
178 - rel 3; sync scsi scanning for >= 2.6.30
180 Revision 2.165 2010/03/06 11:21:21 arekm
181 - mdadm itself is also needed for detecting md raid
183 Revision 2.164 2010/02/25 13:50:35 hawk
186 Revision 2.163 2010/02/25 13:18:56 hawk
187 - force sync scan for scsi_mod in Titanium instead of using hack
189 Revision 2.162 2010/02/05 12:46:01 glen
192 Revision 2.161 2010/01/21 15:57:52 baggins
195 Revision 2.160 2010/01/12 11:15:19 glen
198 Revision 2.159 2010/01/02 13:46:45 pawelz
199 - There was an empty man file in sources, so make was not regenerating this
200 file. Added make clean to remove bogus man file and allow to regenerate it.
201 Reported by Krystian Tomczyk.
204 Revision 2.158 2009/09/19 20:55:27 hawk
205 - R: not S: lvm2-initrd and mdadm-initrd in Titanium
207 Revision 2.157 2009/09/19 20:48:23 hawk
208 - use gzip as compressor in Titanium unless user has specified otherwise
210 Revision 2.156 2009/09/15 08:04:05 gotar
211 - s/Requires/Suggests/ for mdadm-initrd (only for software RAIDs users)
213 Revision 2.155 2009/09/14 23:05:33 gotar
214 - busybox-initrd 1.00-4 (probably some newer ones too) causes:
215 usage: switch_root NEW_ROOT
216 kernel panic - not syncing
218 Revision 2.154 2009/09/14 22:38:51 gotar
219 - anyone using LVM should follow this suggestion, not requirement
221 Revision 2.153 2009/09/04 13:09:59 arekm
222 - rel 6; xz and lzma formats support
224 Revision 2.152 2009/09/04 12:38:45 arekm
225 - rel 5; use lzma format for xz
227 Revision 2.151 2009/09/04 11:04:25 arekm
230 Revision 2.150 2009/09/04 10:37:40 arekm
231 - rel 3; use default compression level for lzma
233 Revision 2.149 2009/08/31 19:33:18 arekm
236 Revision 2.148 2009/08/28 22:12:49 arekm
239 Revision 2.147 2009/08/15 22:13:47 hawk
240 - updated to 10000.16, fixes lvm.static in initrd (/dev/urandom must exist
241 and /sys must be mounted)
243 Revision 2.146 2009/08/11 12:24:03 adamg
244 - updated to 10000.15
246 Revision 2.145 2009/08/07 09:12:02 arekm
247 - lvm2-initrd is enough
249 Revision 2.144 2009/07/16 11:44:18 arekm
250 - R: lvm2 and lvm2-initrd
252 Revision 2.143 2009/07/01 21:34:23 glen
255 Revision 2.142 2009/07/01 04:12:42 glen
258 Revision 2.141 2009/06/16 09:39:15 zbyniu
259 - R: /usr/bin/ldd; rel 3; STBR
261 Revision 2.140 2009/05/10 13:08:29 glen
264 Revision 2.139 2009/04/16 00:33:25 glen
265 - ver 10000.11, fixes lp#359718
267 Revision 2.138 2009/04/06 15:15:30 glen
268 - 10000.10: %{_libdir}/initrd support
270 Revision 2.137 2009/03/16 22:21:16 hawk
271 - force romfs as default in Titanium if not specified otherwise
273 Revision 2.136 2009/03/14 13:08:11 glen
276 Revision 2.135 2009/03/03 09:35:57 glen
277 - 10000.2 (package lvm module)
279 Revision 2.134 2009/03/02 15:45:52 glen
282 Revision 2.133 2009/02/10 10:19:00 arekm
283 - rel 3; fix IDE loading for 2.6.28
285 Revision 2.132 2008/11/18 15:07:13 glen
288 Revision 2.131 2008/11/13 17:32:02 arekm
289 - rel 3; update trigger/settle calls
291 Revision 2.130 2008/11/13 09:50:42 glen
292 - upload tarball this time
294 Revision 2.129 2008/11/12 23:47:13 glen
295 - 9000.17: crypted rootfs via cryptsetup-luks
297 Revision 2.128 2008/10/23 22:10:08 qwiat
300 Revision 2.127 2008/08/06 08:56:02 hawk
301 - updated to 9000.15, fixes problem with /dev/rd and /dev/ida being treated
304 Revision 2.126 2008/07/05 22:13:32 arekm
307 Revision 2.125 2008/07/05 22:07:56 arekm
308 - 9000.14; inst_d bugfix
310 Revision 2.124 2008/07/05 10:48:10 arekm
311 - up to 9000.13 (destdir and firmware handling fixes)
313 Revision 2.123 2008/07/05 10:33:09 arekm
316 Revision 2.122 2008-05-26 17:47:57 glen
319 Revision 2.121 2008-05-24 11:47:37 glen
322 Revision 2.120 2008-04-27 21:59:37 glen
325 Revision 2.119 2008-04-27 21:59:26 glen
328 Revision 2.118 2008-04-02 14:21:55 glen
329 - release 2 (1 for ac)
331 Revision 2.117 2008-04-02 14:21:19 glen
334 Revision 2.116 2008-03-11 23:36:09 hawk
337 Revision 2.115 2008-03-11 14:31:33 hawk
340 Revision 2.114 2008-02-12 19:49:03 glen
341 - 9000.5 (fixes modinfo looking at current, not target kernel modules)
343 Revision 2.113 2008-02-12 19:36:07 glen
344 - module-init-tools with modinfo -k <kernelversion> patch; rel 3
346 Revision 2.112 2008-02-09 18:50:23 glen
349 Revision 2.111 2008-02-08 20:40:02 glen
352 Revision 2.110 2007-12-28 09:21:07 glen
355 Revision 2.109 2007-11-28 21:44:39 glen
358 Revision 2.108 2007-11-06 02:05:42 glen
361 Revision 2.107 2007/11/04 20:52:41 glen
364 Revision 2.106 2007/11/03 14:45:45 adamg
367 Revision 2.105 2007/10/27 20:37:12 glen
368 - typo.patch not needed on this branch
370 Revision 2.104 2007/10/16 16:28:45 glen
373 Revision 2.103 2007/08/31 15:49:17 glen
376 Revision 2.102 2007/07/16 14:56:24 hawk
379 Revision 2.101 2007/07/16 14:53:21 hawk
382 Revision 2.100 2007/07/16 13:19:04 hawk
384 - removed inst.patch, included in sources
386 Revision 2.99 2007/07/09 07:30:34 arekm
387 - rel 2; fix inst() usage for suspend
389 Revision 2.98 2007/06/30 18:46:45 arekm
390 - up to 8648; supports loading raid456 module
392 Revision 2.97 2007/03/31 16:10:46 arekm
395 Revision 2.96 2007/03/07 10:03:57 glen
398 Revision 2.95 2007/03/07 07:56:31 arekm
401 Revision 2.94 2007/02/13 07:16:45 glen
404 Revision 2.93 2007/02/12 00:48:51 baggins
407 Revision 2.92 2007/02/09 14:48:17 arekm
408 - rel 3; R: cpio because it is now default for new configurations and old one can still use genromfs
410 Revision 2.91 2007/02/07 10:14:08 arekm
411 - conflicts with older udev-initrd versions
413 Revision 2.90 2007/01/27 18:39:09 czarny
414 - yet another bug, this time dobule 0 adding
416 Revision 2.89 2007/01/27 17:08:18 czarny
418 - I think I've resolved the 806 instead of 0806 bug
420 Revision 2.88 2007/01/27 14:40:00 czarny
422 - moved to using udevd instead udev binary (dropped in udev project)
424 Revision 2.87 2007/01/11 14:00:50 glen
425 - update to 8142: fixes /initrd/dev not being unmounted
427 Revision 2.86 2006/12/14 17:26:16 czarny
428 - die df form glen ;p
430 Revision 2.85 2006/12/14 16:47:28 czarny
433 Revision 2.84 2006/11/30 14:25:24 glen
436 Revision 2.83 2006/11/30 14:24:13 glen
437 - 7982 (LABEL= and UUID= fixes)
439 Revision 2.82 2006/10/27 14:43:30 glen
442 Revision 2.81 2006/10/19 13:47:53 glen
445 Revision 2.80 2006/08/20 14:51:19 arekm
446 - rel 2; ready for new busybox
448 Revision 2.79 2006/08/17 09:09:00 arekm
449 - up to 7673 (firmware loading from initrd support)
451 Revision 2.78 2006/05/29 23:18:01 glen
452 - source on distfiles
454 Revision 2.77 2006/05/29 22:45:02 glen
457 Revision 2.76 2006/05/08 17:13:55 baggins
460 Revision 2.75 2006/04/09 19:09:48 arekm
463 Revision 2.74 2006/04/09 13:36:06 arekm
464 - up to 7337 (with mainline suspend to disk support)
466 Revision 2.73 2006/02/22 18:31:26 glen
467 - lvm on softraid fixes from svn, rel 2 STBR
469 Revision 2.72 2006/02/21 13:44:52 arekm
472 Revision 2.71 2006/01/18 17:04:53 glen
475 Revision 2.70 2006/01/18 08:16:13 arekm
478 Revision 2.69 2006/01/18 08:12:38 arekm
479 - Updated to 6838 (mdraid, udev, lvm2 updates).
481 Revision 2.68 2005/12/04 22:58:06 glen
482 - adapterized (sorted %verify flags)
484 Revision 2.67 2005/12/02 19:37:08 glen
485 - add procdata (real-root-dev) patch to md0
488 Revision 2.66 2005/11/29 08:35:14 arekm
489 - rel 7 (crap) release.
491 Revision 2.65 2005/11/26 18:51:26 arekm
494 Revision 2.64 2005/11/26 18:34:41 djrzulf
497 Revision 2.63 2005/11/26 15:38:25 arekm
498 - rel 5; fix usleep for modules with - in name.
500 Revision 2.62 2005/11/17 13:07:09 arekm
501 - Sleep after module load support; rel 4
503 Revision 2.61 2005/10/13 17:07:53 glen
506 Revision 2.60 2005/10/13 16:01:16 glen
509 Revision 2.59 2005/07/13 15:50:56 arekm
512 Revision 2.58 2005/06/28 08:24:13 blues
513 - don't require mdadm on _every_ system. Require strict version of
514 mdadm-initrd in mdadm. Should be enough
516 Revision 2.57 2005/06/27 13:47:10 arekm
517 - R: mdadm itself, too.
519 Revision 2.56 2005/06/27 06:31:29 arekm
520 - fix mdadm >= v1.12.0
522 Revision 2.55 2004/10/20 22:10:07 ankry
523 - workaround for man generation problems (-en_xml patch), regenerate manpage, rel. 2
525 Revision 2.54 2004/09/25 21:26:57 arekm
528 Revision 2.53 2004/08/09 00:08:10 arekm
529 - updated to 4420 (suspend2 2.0.0.103 support).
531 Revision 2.52 2004/08/01 22:51:49 arekm
534 Revision 2.51 2004/07/07 15:15:59 qboosh
535 - nobody pointed better solution - so R: mdadm-initrd for working
536 softraid installations; release 2
538 Revision 2.50 2004/06/24 22:40:05 arekm
539 - updated to 4242 (rootfs on LVM2 working nicely, tested)
541 Revision 2.49 2004/06/22 17:08:02 arekm
544 Revision 2.48 2004/06/22 17:07:28 arekm
547 Revision 2.47 2004/05/30 09:00:25 pluto
550 Revision 2.46 2004/05/24 16:26:29 kali
551 - added %verify(not md5 size mtime) to config files
553 Revision 2.45 2004/04/23 21:12:10 arekm
554 - rel 3; fix raid related typo
556 Revision 2.44 2004/04/13 09:27:22 arekm
557 - remove not used code; rel 2
559 Revision 2.43 2004/04/03 16:01:13 arekm
561 - enhanced LVM support (fix LVM1 tools detection,
562 check of proper binaries existence, root only rootfs VG)
563 - support devfs like names for softraid detection
564 - fix creation of subdirectiories in initrd image
565 - load ide-generic if rootfs is on IDE and no other
566 IDE related modules found.
567 - support for LVM on top of Software RAID case
568 NOTE: This release is mainly for testing testing.
570 Revision 2.42 2004/04/03 10:33:57 areq
571 - Requires: pci-database >= 0.4
573 Revision 2.41 2004/03/16 15:40:15 qboosh
576 Revision 2.40 2004/03/08 14:56:02 wiget
579 Revision 2.39 2004/01/23 23:40:03 arekm
580 - released 3219 (can use mdasseble on initrd - smaller than whole mdadm)
582 Revision 2.38 2004/01/21 15:11:41 arekm
583 - updated to trunk (r3196); uses mdadm-initrd for raid starting
585 Revision 2.37 2003/12/28 23:07:35 arekm
586 - this is noarch prog
588 Revision 2.36 2003/12/25 18:58:55 arekm
589 - updated to 3075 (tags/3077)
591 Revision 2.35 2003/09/18 23:31:32 arekm
592 - updated to 1354 (raid fixed)
594 Revision 2.34 2003/09/18 22:28:59 arekm
595 - updated to trunk version (1352)
597 Revision 2.33 2003/09/02 18:40:41 mmazur
600 Revision 2.32 2003/08/24 12:26:49 areq
603 Revision 2.31 2003/08/23 20:27:15 areq
604 - 2.56 - with busybox-initrd
606 Revision 2.30 2003/08/11 20:44:54 ankry
609 Revision 2.29 2003/08/11 15:10:09 areq
612 Revision 2.28 2003/08/10 21:10:39 areq
615 Revision 2.27 2003/08/09 21:43:39 areq
618 Revision 2.26 2003/08/07 20:13:45 arekm
619 - released current cvs ad 2.30
621 Revision 2.25 2003/05/25 11:00:51 malekith
622 - massive attack, adding Source-md5
624 Revision 2.24 2003/05/25 05:47:48 misi3k
625 - massive attack s/pld.org.pl/pld-linux.org/
627 Revision 2.23 2003/04/12 13:36:41 wiget
631 Revision 2.22 2003/04/09 12:07:13 wiget
634 Revision 2.21 2002/12/19 12:01:54 orzech
635 - geninitrd works fine on alphas too
638 Revision 2.20 2002/10/14 14:53:49 wiget
639 - 2.22 (bugfix release)
641 Revision 2.19 2002/09/30 16:48:15 wiget
643 - compressed modules support
645 Revision 2.18 2002/09/06 15:07:00 wiget
648 Revision 2.17 2002/04/25 16:22:15 arturs
651 Revision 2.16 2002/03/25 15:31:20 wiget
653 fix soft raid starting (malekith)
655 Revision 2.15 2002/03/13 15:29:38 wiget
657 - UUID and LABEL support for ext3
658 - error messages fixes
660 Revision 2.14 2002/03/11 23:08:12 martii
661 - added ppc ExlusiveArch
663 Revision 2.13 2002/02/22 23:28:56 kloczek
664 - removed all Group fields translations (our rpm now can handle translating
665 Group field using gettext).
667 Revision 2.12 2002/02/20 13:00:52 wiget
668 - --fs is back, but warn if it used; exit if modules.dep is missing; version 2.16
670 Revision 2.11 2002/02/19 15:15:58 wiget
672 - trash support dropped (me)
673 - root on loop device disabled (me)
674 - new configuration option EXIT_IF_MISSING (me)
675 - parse modules.dep and find dependend modules (malekith)
677 Revision 2.10 2002/01/18 02:13:02 kloczek
678 - perl -pi -e "s/pld-list\@pld.org.pl/feedback\@pld.org.pl/"
680 Revision 2.9 2001/11/28 23:38:23 kloczek
683 Revision 2.8 2001/11/28 12:34:31 qboosh
686 Revision 2.7 2001/09/07 15:21:55 wiget
687 - 2.6, fix Mylex RAID handling
689 Revision 2.6 2001/07/04 12:21:31 wiget
690 - 2.4, some RAID (software and hardware) fixes, added support for UUID/LABEL on xfs
692 Revision 2.5 2001/07/02 09:34:54 malekith
693 - 2.3, don't use modutils.conf if doesn't exists
694 - prev was 2.1 w/o UUID support
696 Revision 2.4 2001/03/19 13:17:33 michuz
698 - this version works fine with 2.4.x
700 Revision 2.3 2001/03/02 12:13:09 kloczek
703 Revision 2.2 2001/03/02 10:06:34 inglod
706 Revision 2.1 2001/02/23 14:23:23 malekith
707 - Removed Req: e2fsutils (wasn't needed long time ago, we use
708 romfs), trash and insmod.static - they are replaced by bsp.
710 They can be needed when special option are turned on,
711 but in normal config they are not, and as this is base
712 pkg, user should not be forced to install them.
714 Revision 2.0 2001/02/23 13:57:34 inglod
715 - Fixed for new release. (2.0)
717 Revision 1.7 2001/02/01 16:27:34 kloczek
718 - Requires for rc-scripts changed to Prereq.
720 Revision 1.6 2001/01/06 15:09:59 zagrodzki
724 Revision 1.5 2000/12/06 19:47:10 kloczek
726 - use trash instead statically linked ash.
728 Revision 1.4 2000/12/05 13:42:04 zagrodzki
730 - requires: mktemp >= 1.5-8
732 Revision 1.3 2000/11/30 18:40:10 baggins
735 Revision 1.2 2000/11/09 10:13:59 kloczek
736 - added %config(noreplace) for /etc/sysconfig/geninitrd,
737 - removed /bin/sh from Requires (autogenerated),
740 Revision 1.1 2000/11/09 09:46:13 jajcus
741 - initial spec (based on mkinitrd.spec)