1 # $Revision: 2.181 $, $Date: 2011/04/10 12:40:58 $
4 # - BUG: you can't set in /etc/mdadm.conf:
5 # DEVICE partitions containers
6 # (which is default BTW if none set). Generation of initrd will fail
8 Summary: Creates an initial ramdisk image for preloading modules
9 Summary(pl.UTF-8): Narzędzie do tworzenia inicjalnego ramdysku używanego przy starcie systemu
15 Group: Applications/System
16 Source0: %{name}-%{version}.tar.gz
17 # Source0-md5: 9d75e347ff49312209e97ead93378f4a
18 Patch0: %{name}-romfs.patch
19 Patch1: %{name}-gzip-compressor.patch
20 Patch2: %{name}-svn.patch
21 BuildRequires: xmlto >= 0:0.0.18-1
22 Requires: /usr/bin/ldd
24 Requires: busybox-initrd > 1.00-4
31 Requires: mktemp >= 1.5-8
32 Requires: module-init-tools >= 3.2.2-6
34 Requires: pci-database >= 0.4
35 Requires: rc-scripts >= 0.2.7
37 %if "%{pld_release}" == "ti"
39 Requires: mdadm-initrd >= 1.12.0-1
41 # otherwise LVM subsystem is not enabled in geninitrd
43 # without this softraid installations of PLD fail
44 Suggests: mdadm-initrd >= 1.12.0-1
47 %if "%{pld_release}" != "ac"
48 Suggests: util-linux-initrd
51 %if "%{pld_release}" == "ac"
52 Conflicts: grubby < 5.0.4-3.1
54 Conflicts: grubby < 6.0.24-3
56 Conflicts: udev-initrd < 1:104
57 Conflicts: xz < 4.999.9
59 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62 Geninitrd creates filesystem images for use as initial ramdisk
63 (initrd) images. These ramdisk images are often used to preload the
64 block device modules (SCSI or RAID) needed to access the root
67 In other words, generic kernels can be built without drivers for any
68 SCSI adapters which load the SCSI driver as a module. Since the kernel
69 needs to read those modules, but in this case it isn't able to address
70 the SCSI adapter, an initial ramdisk is used. The initial ramdisk is
71 loaded by the operating system loader (normally LILO) and is available
72 to the kernel as soon as the ramdisk is loaded. The ramdisk image
73 loads the proper SCSI adapter and allows the kernel to mount the root
74 filesystem. The geninitrd program creates such a ramdisk using
75 information found in the /etc/modules.conf file.
77 %description -l pl.UTF-8
78 Geninitrd służy do tworzenia obrazu systemu plikowego używanego jako
79 inicjalny ramdysk (initrd), z którego przy starcie systemu są ładowane
80 moduły kernela z obsługą urządzeń których obsługa nie jest
81 wkompilowana w kernel. Zazwyczaj modułami ładowanymi z inicjalnego
82 systemu plikowego są sterowniki SCSI, IDE czy też RAID po to żeby w
83 dalszej części inicjacji systemu był możliwy dostęp do głównego
84 systemu plikowego (root fs).
86 Dzięki initrd jest możliwe używanie dystrybucyjnego kernela w którym
87 wkompilowana jest minimalna ilość obsługi różnych urządzeń, a reszta
88 kodu obsługi sterowników SCSI, IDE czy RAID jest doczytywana w trakcie
89 startu z initrd. Skrypt geninitrd generuje obraz ramdysku na podstawie
90 bieżących informacji zawartych w /etc/modules.conf.
94 %if "%{pld_release}" == "ti"
104 rm -rf $RPM_BUILD_ROOT
107 DESTDIR=$RPM_BUILD_ROOT
110 rm -rf $RPM_BUILD_ROOT
113 %defattr(644,root,root,755)
115 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/geninitrd
116 %attr(755,root,root) /sbin/geninitrd
117 %{_mandir}/man8/geninitrd.8*
120 /lib/geninitrd/functions
121 /lib/geninitrd/mod-*.sh
122 %attr(755,root,root) /lib/geninitrd/extract-ikconfig
124 %define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
126 * %{date} PLD Team <feedback@pld-linux.org>
127 All persons listed below can be reached at <cvs_login>@pld-linux.org
129 $Log: geninitrd.spec,v $
130 Revision 2.181 2011/04/10 12:40:58 adamg
131 - Requires: glibc-misc (ldd)
133 Revision 2.180 2011/03/11 11:36:22 arekm
134 - rel 6; don't resolve symlink for luks device nodes
136 Revision 2.179 2011/03/06 16:15:17 arekm
137 - rel 4; fix mod-sata finding too much bug
139 Revision 2.178 2011/03/04 09:24:56 arekm
140 - rel 4; fallback to ls bug fixed
142 Revision 2.177 2011/03/01 10:34:47 arekm
143 - rel 3; bugfix for users using rootfsflags boot option
145 Revision 2.176 2011/02/25 16:08:26 arekm
146 - rel 2; no negative reports
148 Revision 2.175 2011/02/19 08:29:38 arekm
149 - 10000.32 (experimental).
151 Revision 2.174 2011/02/11 01:33:25 sparky
152 - s/util-linux-ng7util-linux/
154 Revision 2.173 2011/02/09 19:23:07 glen
157 Revision 2.172 2011/01/27 20:35:20 glen
158 - still experimental 10000.31
160 Revision 2.171 2011/01/13 20:32:12 arekm
161 Up to 10000.30 (experimental due to SATA autodetection).
163 Revision 2.170 2010/12/19 10:19:42 glen
164 - suggest for blkid in image generation (grub2 defaults to UUID mode)
166 Revision 2.169 2010/10/26 20:24:44 blues
169 Revision 2.168 2010/04/20 05:31:53 arekm
170 - rel 5; don't require main mdadm package (use initrd version)
172 Revision 2.167 2010/03/29 20:23:20 evil
174 - added geninitrd-tuxonice_on_dm.patch, moving tuxonice script down in hierarchy, to allow tuxonice snapshot device be device mapper device(LUKS, LVM, dmraid)
176 Revision 2.166 2010/03/08 11:01:20 arekm
177 - rel 3; sync scsi scanning for >= 2.6.30
179 Revision 2.165 2010/03/06 11:21:21 arekm
180 - mdadm itself is also needed for detecting md raid
182 Revision 2.164 2010/02/25 13:50:35 hawk
185 Revision 2.163 2010/02/25 13:18:56 hawk
186 - force sync scan for scsi_mod in Titanium instead of using hack
188 Revision 2.162 2010/02/05 12:46:01 glen
191 Revision 2.161 2010/01/21 15:57:52 baggins
194 Revision 2.160 2010/01/12 11:15:19 glen
197 Revision 2.159 2010/01/02 13:46:45 pawelz
198 - There was an empty man file in sources, so make was not regenerating this
199 file. Added make clean to remove bogus man file and allow to regenerate it.
200 Reported by Krystian Tomczyk.
203 Revision 2.158 2009/09/19 20:55:27 hawk
204 - R: not S: lvm2-initrd and mdadm-initrd in Titanium
206 Revision 2.157 2009/09/19 20:48:23 hawk
207 - use gzip as compressor in Titanium unless user has specified otherwise
209 Revision 2.156 2009/09/15 08:04:05 gotar
210 - s/Requires/Suggests/ for mdadm-initrd (only for software RAIDs users)
212 Revision 2.155 2009/09/14 23:05:33 gotar
213 - busybox-initrd 1.00-4 (probably some newer ones too) causes:
214 usage: switch_root NEW_ROOT
215 kernel panic - not syncing
217 Revision 2.154 2009/09/14 22:38:51 gotar
218 - anyone using LVM should follow this suggestion, not requirement
220 Revision 2.153 2009/09/04 13:09:59 arekm
221 - rel 6; xz and lzma formats support
223 Revision 2.152 2009/09/04 12:38:45 arekm
224 - rel 5; use lzma format for xz
226 Revision 2.151 2009/09/04 11:04:25 arekm
229 Revision 2.150 2009/09/04 10:37:40 arekm
230 - rel 3; use default compression level for lzma
232 Revision 2.149 2009/08/31 19:33:18 arekm
235 Revision 2.148 2009/08/28 22:12:49 arekm
238 Revision 2.147 2009/08/15 22:13:47 hawk
239 - updated to 10000.16, fixes lvm.static in initrd (/dev/urandom must exist
240 and /sys must be mounted)
242 Revision 2.146 2009/08/11 12:24:03 adamg
243 - updated to 10000.15
245 Revision 2.145 2009/08/07 09:12:02 arekm
246 - lvm2-initrd is enough
248 Revision 2.144 2009/07/16 11:44:18 arekm
249 - R: lvm2 and lvm2-initrd
251 Revision 2.143 2009/07/01 21:34:23 glen
254 Revision 2.142 2009/07/01 04:12:42 glen
257 Revision 2.141 2009/06/16 09:39:15 zbyniu
258 - R: /usr/bin/ldd; rel 3; STBR
260 Revision 2.140 2009/05/10 13:08:29 glen
263 Revision 2.139 2009/04/16 00:33:25 glen
264 - ver 10000.11, fixes lp#359718
266 Revision 2.138 2009/04/06 15:15:30 glen
267 - 10000.10: %{_libdir}/initrd support
269 Revision 2.137 2009/03/16 22:21:16 hawk
270 - force romfs as default in Titanium if not specified otherwise
272 Revision 2.136 2009/03/14 13:08:11 glen
275 Revision 2.135 2009/03/03 09:35:57 glen
276 - 10000.2 (package lvm module)
278 Revision 2.134 2009/03/02 15:45:52 glen
281 Revision 2.133 2009/02/10 10:19:00 arekm
282 - rel 3; fix IDE loading for 2.6.28
284 Revision 2.132 2008/11/18 15:07:13 glen
287 Revision 2.131 2008/11/13 17:32:02 arekm
288 - rel 3; update trigger/settle calls
290 Revision 2.130 2008/11/13 09:50:42 glen
291 - upload tarball this time
293 Revision 2.129 2008/11/12 23:47:13 glen
294 - 9000.17: crypted rootfs via cryptsetup-luks
296 Revision 2.128 2008/10/23 22:10:08 qwiat
299 Revision 2.127 2008/08/06 08:56:02 hawk
300 - updated to 9000.15, fixes problem with /dev/rd and /dev/ida being treated
303 Revision 2.126 2008/07/05 22:13:32 arekm
306 Revision 2.125 2008/07/05 22:07:56 arekm
307 - 9000.14; inst_d bugfix
309 Revision 2.124 2008/07/05 10:48:10 arekm
310 - up to 9000.13 (destdir and firmware handling fixes)
312 Revision 2.123 2008/07/05 10:33:09 arekm
315 Revision 2.122 2008-05-26 17:47:57 glen
318 Revision 2.121 2008-05-24 11:47:37 glen
321 Revision 2.120 2008-04-27 21:59:37 glen
324 Revision 2.119 2008-04-27 21:59:26 glen
327 Revision 2.118 2008-04-02 14:21:55 glen
328 - release 2 (1 for ac)
330 Revision 2.117 2008-04-02 14:21:19 glen
333 Revision 2.116 2008-03-11 23:36:09 hawk
336 Revision 2.115 2008-03-11 14:31:33 hawk
339 Revision 2.114 2008-02-12 19:49:03 glen
340 - 9000.5 (fixes modinfo looking at current, not target kernel modules)
342 Revision 2.113 2008-02-12 19:36:07 glen
343 - module-init-tools with modinfo -k <kernelversion> patch; rel 3
345 Revision 2.112 2008-02-09 18:50:23 glen
348 Revision 2.111 2008-02-08 20:40:02 glen
351 Revision 2.110 2007-12-28 09:21:07 glen
354 Revision 2.109 2007-11-28 21:44:39 glen
357 Revision 2.108 2007-11-06 02:05:42 glen
360 Revision 2.107 2007/11/04 20:52:41 glen
363 Revision 2.106 2007/11/03 14:45:45 adamg
366 Revision 2.105 2007/10/27 20:37:12 glen
367 - typo.patch not needed on this branch
369 Revision 2.104 2007/10/16 16:28:45 glen
372 Revision 2.103 2007/08/31 15:49:17 glen
375 Revision 2.102 2007/07/16 14:56:24 hawk
378 Revision 2.101 2007/07/16 14:53:21 hawk
381 Revision 2.100 2007/07/16 13:19:04 hawk
383 - removed inst.patch, included in sources
385 Revision 2.99 2007/07/09 07:30:34 arekm
386 - rel 2; fix inst() usage for suspend
388 Revision 2.98 2007/06/30 18:46:45 arekm
389 - up to 8648; supports loading raid456 module
391 Revision 2.97 2007/03/31 16:10:46 arekm
394 Revision 2.96 2007/03/07 10:03:57 glen
397 Revision 2.95 2007/03/07 07:56:31 arekm
400 Revision 2.94 2007/02/13 07:16:45 glen
403 Revision 2.93 2007/02/12 00:48:51 baggins
406 Revision 2.92 2007/02/09 14:48:17 arekm
407 - rel 3; R: cpio because it is now default for new configurations and old one can still use genromfs
409 Revision 2.91 2007/02/07 10:14:08 arekm
410 - conflicts with older udev-initrd versions
412 Revision 2.90 2007/01/27 18:39:09 czarny
413 - yet another bug, this time dobule 0 adding
415 Revision 2.89 2007/01/27 17:08:18 czarny
417 - I think I've resolved the 806 instead of 0806 bug
419 Revision 2.88 2007/01/27 14:40:00 czarny
421 - moved to using udevd instead udev binary (dropped in udev project)
423 Revision 2.87 2007/01/11 14:00:50 glen
424 - update to 8142: fixes /initrd/dev not being unmounted
426 Revision 2.86 2006/12/14 17:26:16 czarny
427 - die df form glen ;p
429 Revision 2.85 2006/12/14 16:47:28 czarny
432 Revision 2.84 2006/11/30 14:25:24 glen
435 Revision 2.83 2006/11/30 14:24:13 glen
436 - 7982 (LABEL= and UUID= fixes)
438 Revision 2.82 2006/10/27 14:43:30 glen
441 Revision 2.81 2006/10/19 13:47:53 glen
444 Revision 2.80 2006/08/20 14:51:19 arekm
445 - rel 2; ready for new busybox
447 Revision 2.79 2006/08/17 09:09:00 arekm
448 - up to 7673 (firmware loading from initrd support)
450 Revision 2.78 2006/05/29 23:18:01 glen
451 - source on distfiles
453 Revision 2.77 2006/05/29 22:45:02 glen
456 Revision 2.76 2006/05/08 17:13:55 baggins
459 Revision 2.75 2006/04/09 19:09:48 arekm
462 Revision 2.74 2006/04/09 13:36:06 arekm
463 - up to 7337 (with mainline suspend to disk support)
465 Revision 2.73 2006/02/22 18:31:26 glen
466 - lvm on softraid fixes from svn, rel 2 STBR
468 Revision 2.72 2006/02/21 13:44:52 arekm
471 Revision 2.71 2006/01/18 17:04:53 glen
474 Revision 2.70 2006/01/18 08:16:13 arekm
477 Revision 2.69 2006/01/18 08:12:38 arekm
478 - Updated to 6838 (mdraid, udev, lvm2 updates).
480 Revision 2.68 2005/12/04 22:58:06 glen
481 - adapterized (sorted %verify flags)
483 Revision 2.67 2005/12/02 19:37:08 glen
484 - add procdata (real-root-dev) patch to md0
487 Revision 2.66 2005/11/29 08:35:14 arekm
488 - rel 7 (crap) release.
490 Revision 2.65 2005/11/26 18:51:26 arekm
493 Revision 2.64 2005/11/26 18:34:41 djrzulf
496 Revision 2.63 2005/11/26 15:38:25 arekm
497 - rel 5; fix usleep for modules with - in name.
499 Revision 2.62 2005/11/17 13:07:09 arekm
500 - Sleep after module load support; rel 4
502 Revision 2.61 2005/10/13 17:07:53 glen
505 Revision 2.60 2005/10/13 16:01:16 glen
508 Revision 2.59 2005/07/13 15:50:56 arekm
511 Revision 2.58 2005/06/28 08:24:13 blues
512 - don't require mdadm on _every_ system. Require strict version of
513 mdadm-initrd in mdadm. Should be enough
515 Revision 2.57 2005/06/27 13:47:10 arekm
516 - R: mdadm itself, too.
518 Revision 2.56 2005/06/27 06:31:29 arekm
519 - fix mdadm >= v1.12.0
521 Revision 2.55 2004/10/20 22:10:07 ankry
522 - workaround for man generation problems (-en_xml patch), regenerate manpage, rel. 2
524 Revision 2.54 2004/09/25 21:26:57 arekm
527 Revision 2.53 2004/08/09 00:08:10 arekm
528 - updated to 4420 (suspend2 2.0.0.103 support).
530 Revision 2.52 2004/08/01 22:51:49 arekm
533 Revision 2.51 2004/07/07 15:15:59 qboosh
534 - nobody pointed better solution - so R: mdadm-initrd for working
535 softraid installations; release 2
537 Revision 2.50 2004/06/24 22:40:05 arekm
538 - updated to 4242 (rootfs on LVM2 working nicely, tested)
540 Revision 2.49 2004/06/22 17:08:02 arekm
543 Revision 2.48 2004/06/22 17:07:28 arekm
546 Revision 2.47 2004/05/30 09:00:25 pluto
549 Revision 2.46 2004/05/24 16:26:29 kali
550 - added %verify(not md5 size mtime) to config files
552 Revision 2.45 2004/04/23 21:12:10 arekm
553 - rel 3; fix raid related typo
555 Revision 2.44 2004/04/13 09:27:22 arekm
556 - remove not used code; rel 2
558 Revision 2.43 2004/04/03 16:01:13 arekm
560 - enhanced LVM support (fix LVM1 tools detection,
561 check of proper binaries existence, root only rootfs VG)
562 - support devfs like names for softraid detection
563 - fix creation of subdirectiories in initrd image
564 - load ide-generic if rootfs is on IDE and no other
565 IDE related modules found.
566 - support for LVM on top of Software RAID case
567 NOTE: This release is mainly for testing testing.
569 Revision 2.42 2004/04/03 10:33:57 areq
570 - Requires: pci-database >= 0.4
572 Revision 2.41 2004/03/16 15:40:15 qboosh
575 Revision 2.40 2004/03/08 14:56:02 wiget
578 Revision 2.39 2004/01/23 23:40:03 arekm
579 - released 3219 (can use mdasseble on initrd - smaller than whole mdadm)
581 Revision 2.38 2004/01/21 15:11:41 arekm
582 - updated to trunk (r3196); uses mdadm-initrd for raid starting
584 Revision 2.37 2003/12/28 23:07:35 arekm
585 - this is noarch prog
587 Revision 2.36 2003/12/25 18:58:55 arekm
588 - updated to 3075 (tags/3077)
590 Revision 2.35 2003/09/18 23:31:32 arekm
591 - updated to 1354 (raid fixed)
593 Revision 2.34 2003/09/18 22:28:59 arekm
594 - updated to trunk version (1352)
596 Revision 2.33 2003/09/02 18:40:41 mmazur
599 Revision 2.32 2003/08/24 12:26:49 areq
602 Revision 2.31 2003/08/23 20:27:15 areq
603 - 2.56 - with busybox-initrd
605 Revision 2.30 2003/08/11 20:44:54 ankry
608 Revision 2.29 2003/08/11 15:10:09 areq
611 Revision 2.28 2003/08/10 21:10:39 areq
614 Revision 2.27 2003/08/09 21:43:39 areq
617 Revision 2.26 2003/08/07 20:13:45 arekm
618 - released current cvs ad 2.30
620 Revision 2.25 2003/05/25 11:00:51 malekith
621 - massive attack, adding Source-md5
623 Revision 2.24 2003/05/25 05:47:48 misi3k
624 - massive attack s/pld.org.pl/pld-linux.org/
626 Revision 2.23 2003/04/12 13:36:41 wiget
630 Revision 2.22 2003/04/09 12:07:13 wiget
633 Revision 2.21 2002/12/19 12:01:54 orzech
634 - geninitrd works fine on alphas too
637 Revision 2.20 2002/10/14 14:53:49 wiget
638 - 2.22 (bugfix release)
640 Revision 2.19 2002/09/30 16:48:15 wiget
642 - compressed modules support
644 Revision 2.18 2002/09/06 15:07:00 wiget
647 Revision 2.17 2002/04/25 16:22:15 arturs
650 Revision 2.16 2002/03/25 15:31:20 wiget
652 fix soft raid starting (malekith)
654 Revision 2.15 2002/03/13 15:29:38 wiget
656 - UUID and LABEL support for ext3
657 - error messages fixes
659 Revision 2.14 2002/03/11 23:08:12 martii
660 - added ppc ExlusiveArch
662 Revision 2.13 2002/02/22 23:28:56 kloczek
663 - removed all Group fields translations (our rpm now can handle translating
664 Group field using gettext).
666 Revision 2.12 2002/02/20 13:00:52 wiget
667 - --fs is back, but warn if it used; exit if modules.dep is missing; version 2.16
669 Revision 2.11 2002/02/19 15:15:58 wiget
671 - trash support dropped (me)
672 - root on loop device disabled (me)
673 - new configuration option EXIT_IF_MISSING (me)
674 - parse modules.dep and find dependend modules (malekith)
676 Revision 2.10 2002/01/18 02:13:02 kloczek
677 - perl -pi -e "s/pld-list\@pld.org.pl/feedback\@pld.org.pl/"
679 Revision 2.9 2001/11/28 23:38:23 kloczek
682 Revision 2.8 2001/11/28 12:34:31 qboosh
685 Revision 2.7 2001/09/07 15:21:55 wiget
686 - 2.6, fix Mylex RAID handling
688 Revision 2.6 2001/07/04 12:21:31 wiget
689 - 2.4, some RAID (software and hardware) fixes, added support for UUID/LABEL on xfs
691 Revision 2.5 2001/07/02 09:34:54 malekith
692 - 2.3, don't use modutils.conf if doesn't exists
693 - prev was 2.1 w/o UUID support
695 Revision 2.4 2001/03/19 13:17:33 michuz
697 - this version works fine with 2.4.x
699 Revision 2.3 2001/03/02 12:13:09 kloczek
702 Revision 2.2 2001/03/02 10:06:34 inglod
705 Revision 2.1 2001/02/23 14:23:23 malekith
706 - Removed Req: e2fsutils (wasn't needed long time ago, we use
707 romfs), trash and insmod.static - they are replaced by bsp.
709 They can be needed when special option are turned on,
710 but in normal config they are not, and as this is base
711 pkg, user should not be forced to install them.
713 Revision 2.0 2001/02/23 13:57:34 inglod
714 - Fixed for new release. (2.0)
716 Revision 1.7 2001/02/01 16:27:34 kloczek
717 - Requires for rc-scripts changed to Prereq.
719 Revision 1.6 2001/01/06 15:09:59 zagrodzki
723 Revision 1.5 2000/12/06 19:47:10 kloczek
725 - use trash instead statically linked ash.
727 Revision 1.4 2000/12/05 13:42:04 zagrodzki
729 - requires: mktemp >= 1.5-8
731 Revision 1.3 2000/11/30 18:40:10 baggins
734 Revision 1.2 2000/11/09 10:13:59 kloczek
735 - added %config(noreplace) for /etc/sysconfig/geninitrd,
736 - removed /bin/sh from Requires (autogenerated),
739 Revision 1.1 2000/11/09 09:46:13 jajcus
740 - initial spec (based on mkinitrd.spec)