Commit Graph

2378 Commits (033-502)

Author SHA1 Message Date
Harald Hoyer 6f4c2dada4 fixed fips mode
- preserve timestamps
- copy /lib*/hmaccalc files
- run sha512hmac after kernel module loading
- add more fips kernel modules
2013-04-25 19:44:01 +02:00
Harald Hoyer ab42fe38fd fixup 3be5d63c2f
either test or []
2013-04-19 15:08:16 +02:00
Harald Hoyer 3be5d63c2f shutdown: redirect output to /dev/console only if it exists 2013-04-19 15:00:20 +02:00
Harald Hoyer 2b125c69cc base/dracut-lib.sh: do not setdebug, if not in initramfs 2013-04-18 12:54:30 +02:00
Harald Hoyer 14499534ba dmsquash-live: add support for "iso-scan/filename" kernel parameter
now you can write grub entries like

  set isofile="/Fedora-live.iso"
  loopback loop $isofile
  linux loop)/isolinux/vmlinuz iso-scan/filename=$isofile root=live:CDLABEL=Fedora-...
  initrd (loop)/isolinux/initrd0.img
2013-04-15 11:39:32 +02:00
Harald Hoyer 1540df0e79 url-lib/module-setup.sh: install ca-bundle.crt by libcurl.so
https://bugzilla.redhat.com/show_bug.cgi?id=950770

curl seems to look for /etc/pki/tls/certs/ca-bundle.crt

extract the correct path by disecting libcurl.so
2013-04-12 15:27:27 +02:00
Harald Hoyer 5d68c80b16 systemd: include the systemd-random-seed-load.service
The systemd cryptsetup-generator wants systemd-random-seed-load.service
in case /dev/urandom is the device.
2013-04-12 15:27:27 +02:00
Harald Hoyer a229b17434 plymouth/plymouth-pretrigger.sh: fixup of ca2c6936 2013-04-12 15:25:44 +02:00
Harald Hoyer ca2c693679 Do not call plymouth with full path 2013-04-11 16:08:26 +02:00
Harald Hoyer cdcb27a4fe crypt/module-setup.sh: also handle UUID= while filtering crypttab
The crypttab filter for host-only did not handle UUID= entries.
https://bugzilla.redhat.com/show_bug.cgi?id=919752
2013-04-10 10:16:49 +02:00
WANG Chao 0c5ccb35c7 ifup.sh: Add support for bridge over a vlan tagged interface
This patch add support for bridge a vlan tagged interface, like
br0 -> bond0.7 -> bond0 -> eth0

Signed-off-by: WANG Chao <chaowang@redhat.com>
2013-04-09 13:39:32 +02:00
Baoquan He 9d787df196 Let user specify the action after fail
Currently the default action is emergency_shell when failure happened
during system boot. In kdump, this default may not be expected. E.g,
if dump target is not rootfs, it does not matter if mount root failed.
Adding an action which allow dracut always go ahead though failure
happens is needed by kdump.

So here add a function action_on_fail() and cmdline parameter
action_on_fail=<shell | continue>. Use action_to_fail() to replace
emergency_shell which was called after failure. By $(getarg action_on_fail=),
decide to drop into shell, or to leave away the failure and go ahead.

v3->v4:
add handling of selinux policy loaded failure, and change code format to
be consitent

Signed-off-by: Baoquan He <bhe@redhat.com>

[Edited by harald@redhat.com]
2013-04-09 11:14:08 +02:00
Baoquan He 0290e98271 Wait for logical interface to be up
If bootdev is logical interface like bond, bridge or vlan, we need
wait them up.

Signed-off-by: Baoquan He <bhe@redhat.com>
2013-04-09 10:53:08 +02:00
Harald Hoyer d136ca4eeb network: support multiple bonding interfaces
Currently dracut only support 1 bond, namyly bond0 by default. However multiple
bonds configuration may be needed. For example in kdump, in 1st kernel, more
than one bonds may be configured, and bondX other than bond0 is used as output
interface to remote host which will store dump core. This patch can solve this
problem, to write real bond information to initramfs, 2nd kdump kernel will
use it to create the relevant bondX interface.

Tested-by: Baoquan He <bhe@redhat.com>
Signed-off-by: Baoquan He <bhe@redhat.com>
2013-04-09 10:52:22 +02:00
WANG Chao a55f910cf6 ifup.sh: Add support for bridge over team and vlan tagged team
Team is the same network stack as bonding. Therefore give ifup the ability to
handle bridge over team and vlan tagged team as bonding too.

Signed-off-by: WANG Chao <chaowang@redhat.com>
2013-04-09 10:52:22 +02:00
Harald Hoyer 96efbc51ac crypt/module-setup.sh: filter /etc/crypttab in host-only mode
only take those /etc/crypttab entries, which we need to boot the system
2013-04-09 10:48:26 +02:00
Harald Hoyer 41bfa5dad1 nfs/module-setup.sh: combine egreps for /etc/passwd and /etc/group 2013-04-05 16:34:36 +02:00
Harald Hoyer 6db8c5a5fe base/dracut-lib.sh:wait_for_dev()/cancel_wait_for_dev() set systemd timeouts
Set systemd unit timeouts for the devices we wait for. The systemd
default is 90 seconds, which is way too low for complicated setups.
2013-04-05 08:32:17 +02:00
Harald Hoyer ab9b04f55b crypt/parse-crypt.sh: create udev rule for systemd
Start the systemd-cryptsetup@luks-*.service for the detected crypto_LUKS
device in the initqueue, so we block in the initqueue and wait for the
password entry.
2013-04-04 12:54:59 +02:00
Harald Hoyer c4b572b5ca base/dracut-lib.sh: add dev_unit_name()
add helper function to convert device path to systemd unit names
2013-04-04 12:52:53 +02:00
Harald Hoyer cc6f0925df base/init.sh: fix version output 2013-04-02 13:29:24 +02:00
Harald Hoyer bfac40665b systemd: add new timers.target and paths.target 2013-03-26 16:19:27 +01:00
Harald Hoyer 6c6d805765 use systemd*dir variables everywhere 2013-03-26 16:19:00 +01:00
Harald Hoyer b37398dc1c x-initrd-rootfs.mount -> x-initrd.mount 2013-03-26 15:38:50 +01:00
Harald Hoyer 1b0a362d83 multipath: install native systemd service 2013-03-25 07:58:45 +01:00
Harald Hoyer bb425d20a1 systemd: add dracut.bootup(7) reference to service man pages 2013-03-25 07:56:12 +01:00
Harald Hoyer cbd69dc6ff install dracut-*.service units 2013-03-25 07:56:12 +01:00
Harald Hoyer af2fcbafe8 network/netroot.sh: do not unset root 2013-03-19 14:53:09 +01:00
Harald Hoyer 7b6bdc3f94 nbd/nbdroot.sh: fix root != blockdev case 2013-03-19 12:26:06 +01:00
Harald Hoyer db43f56d94 fs-lib/fs-lib.sh:write_fs_tab() start initrd-root-fs.target 2013-03-19 12:26:06 +01:00
Harald Hoyer e26d76dca1 systemd: add more ordering 2013-03-19 12:22:33 +01:00
Harald Hoyer d59732004d drm/module-setup.sh: redirect grep to /dev/null
on some architectures, no pci devices exist
2013-03-18 14:17:19 +01:00
Harald Hoyer c9e5b75308 kernel-modules/module-setup.sh: don't fail hard on a missing module 2013-03-18 09:29:08 +01:00
Harald Hoyer fd191a7b41 kernel-modules/module-setup.sh: install all host filesystem drivers
https://bugzilla.redhat.com/show_bug.cgi?id=922565
2013-03-18 08:43:23 +01:00
Harald Hoyer e42c7a980c sosreport: mkdir /run/initramfs, if it does not exist yet 2013-03-16 10:34:20 +01:00
Harald Hoyer 85804a9197 dmsquash-live: force load squashfs kernel module
https://bugzilla.redhat.com/show_bug.cgi?id=922248
2013-03-16 10:31:37 +01:00
Harald Hoyer 7e9bfdde14 sosreport.sh: use -o short-monotonic for the journal output 2013-03-15 10:41:41 +01:00
Harald Hoyer 6b46e7baa0 systemd: do not use "systemd --version" until fixed 2013-03-15 07:10:20 +01:00
Harald Hoyer 85c85f07e2 systemd: switch to new initrd.target
(normal startup)
                                    :
                                    :
                                    v
                              basic.target
                                    |
             ______________________/|
            /                       |
            |                  sysroot.mount
            |                       |
            |                       v
            |             initrd-root-fs.target
            |                       |
            |                       v
            |            initrd-parse-etc.service
(custom initrd services)            |
            |                       v
            |            (sysroot-usr.mount and
            |             various mounts marked
            |               with fstab option
            |                x-initrd.mount)
            |                       |
            |                       v
            |                initrd-fs.target
            |                       |
            \______________________ |
                                   \|
                                    v
                               initrd.target
                                    |
                                    v
                          initrd-cleanup.service
                               isolates to
                         initrd-switch-root.target
                                    |
                                    v
             ______________________/|
            /                       |
            |        initrd-udevadm-cleanup-db.service
            |                       |
(custom initrd services)            |
            |                       |
            \______________________ |
                                   \|
                                    v
                        initrd-switch-root.target
                                    |
                                    v
                        initrd-switch-root.service
                                    |
                                    v
                               switch-root
2013-03-15 07:10:20 +01:00
Harald Hoyer c853dc72e9 udev-rules/module-setup.sh: do not install /run/* 2013-03-14 18:30:35 +01:00
Harald Hoyer 18d0c9b858 nfs/nfsroot.sh: only cat /etc/fstab, if existant 2013-03-14 18:30:35 +01:00
Harald Hoyer 0a5fd0dcec iscsi/iscsiroot.sh: do not mount manually in systemd mode 2013-03-14 18:30:35 +01:00
Harald Hoyer e0e99c59a5 ifcfg/write-ifcfg.sh: fixed typo 2013-03-14 18:30:35 +01:00
Radek Vykydal fd8e4aef90 Write BOOTPROTO=ibft for ip=ibft to ifcfg files 2013-03-14 10:54:28 +01:00
Radek Vykydal c5a742a3bf Don't write DHCPV6C=yes for each dhcp (ipv4) configuration.
Caused probably by commit 32ec0a762d
2013-03-14 10:54:28 +01:00
Harald Hoyer fc4e10a859 shutdown/shutdown.sh: mount --move all basic mounts out of /oldroot
After mount moving /dev away, apps like plymouth can do reexec with fd
passing of devices, which they want to keep open until the very end.
2013-03-13 17:45:37 +01:00
Harald Hoyer 8fdcc1a9b1 kernel-modules: move usb-storage out of fixed drivers 2013-03-13 14:46:39 +01:00
Harald Hoyer a23b368c92 systemd: remove upstream renamed old service files 2013-03-13 14:45:55 +01:00
dyoung@redhat.com bbfff3e58b Add memdebug at different points in 99base/init.sh
Previously I added several trace point to the begin of several
init hooks of systemd, old init script also need this debug info.

Doing same here as what's added in the systemd service scripts:
At cmdline hooks adding trace of "1+:mem 1+:iomem 3+:slab"
For other hooks adding trace of "1:shortmem 2+:mem 3+:slab"

Signed-off-by: Dave Young <dyoung@redhat.com>
2013-03-13 13:12:57 +01:00
dyoung@redhat.com dff9a66c44 print memdebug to stderr
memory usage tracing outputs are debug info, so it should be moved to
stderr instead of stdout.

Signed-off-by: Dave Young <dyoung@redhat.com>
2013-03-13 13:12:57 +01:00
Harald Hoyer 7d17d6c976 plymouth: do not install hooks in systemd mode 2013-03-13 13:01:20 +01:00
Harald Hoyer b8060ef781 systemd: add sysctl.d and sysctl.conf 2013-03-13 11:37:05 +01:00
Harald Hoyer 727543c1e6 systemd: add modules-load.d modules to the initramfs 2013-03-13 11:37:05 +01:00
Harald Hoyer c85cda9e2f systemd: local-fs.target is now root-fs.target and initrd-fs.target
Also rename dracut.target to initrd.target

see also systemd commit 700e07f
http://cgit.freedesktop.org/systemd/systemd/commit/?id=700e07f
2013-03-13 09:34:47 +01:00
Harald Hoyer d351541ee6 make host_fs_types a hashmap
This requires bash >= 4, but hash maps are so much more comfortable
2013-03-11 18:58:32 +01:00
Harald Hoyer aede120c92 add rescue dracut module 2013-03-09 15:17:26 +01:00
Harald Hoyer 900e15da34 systemd/module-setup.sh: call systemd in private dir for version 2013-03-08 11:50:03 +01:00
Harald Hoyer 31737a05e1 systemd: add version check in install() 2013-03-08 07:07:01 +01:00
Harald Hoyer 1161f03777 fips: add lzo module 2013-03-08 07:05:55 +01:00
Harald Hoyer cf24ac8c19 crypt, dmraid, mdraid: use for_each_host_dev_and_slaves_all()
To catch _all_ UUIDs and not only the first one, use
for_each_host_dev_and_slaves_all
2013-03-07 16:00:00 +01:00
Harald Hoyer af3ef92a6b dmsquash-live: add iso9660 kernel module 2013-03-07 15:49:24 +01:00
Harald Hoyer c46cda8260 split 95udev-rules/59-persistent-storage.rules to md and dm modules 2013-03-07 15:01:47 +01:00
Harald Hoyer c3dd68fcf1 iscsi: run iscsiroot even if no network configured
Also inject finished hooks for every iscsiroot netroot
2013-03-07 14:17:49 +01:00
Harald Hoyer 3e35441f18 kernel-modules: better match for arm architecure 2013-03-07 14:17:33 +01:00
Harald Hoyer cbc21754e5 kernel-modules: move some kernel modules out of unconditional install 2013-03-07 12:10:53 +01:00
Harald Hoyer eb2dc8c34b systemd: add missing dracut-mount.service dracut-pre-mount.service 2013-03-07 11:47:00 +01:00
Harald Hoyer 510aecdbd8 systemd: add missing dracut-mount.sh dracut-pre-mount.sh dracut.target 2013-03-07 10:35:06 +01:00
Harald Hoyer a5b48ce798 add systemd-bootchart module 2013-03-07 09:56:30 +01:00
Harald Hoyer 59afbd8e73 add missing systemd service man pages 2013-03-07 09:42:00 +01:00
Harald Hoyer ca36b9b8f8 base: save host_devs which we need bring up and process them with wait_for_dev 2013-03-06 17:29:12 +01:00
Harald Hoyer a9c7dc74c4 base: in systemd mode parse-root-opts.sh is in the services 2013-03-06 17:29:12 +01:00
Harald Hoyer ce862de624 base/dracut-lib.sh: reset /etc/profile 2013-03-06 17:29:12 +01:00
Harald Hoyer 500861cd05 base/init.sh: reset main loop counter, if work is in initqueue 2013-03-06 17:29:12 +01:00
Harald Hoyer 44d26d9209 base/dracut-lib.sh: extend wait_for_dev() for systemd 2013-03-06 17:29:12 +01:00
Harald Hoyer 35270e34d0 rootfs-block/parse-block.sh: wait_for_dev 2013-03-06 17:29:12 +01:00
Harald Hoyer fe654ff0aa usrmount: in systemd mode, functionality is in systemd 2013-03-06 17:29:12 +01:00
Harald Hoyer 5e1e1ec060 iscsi, nbd: call write_fs_tab() and write /etc/fstab 2013-03-06 17:29:12 +01:00
Harald Hoyer 2673ff1932 rootfs-block: in systemd mode, functionality is in the dracut services 2013-03-06 17:29:11 +01:00
Harald Hoyer e8f7ea6794 resume: generate rules already in parse-resume.sh 2013-03-06 17:29:11 +01:00
Harald Hoyer 3899211bfc resume: in systemd mode move functionality in the dracut services 2013-03-06 17:29:11 +01:00
Harald Hoyer 6e0c1c448d nfs/nfsroot.sh: trigger nfs mount with cat'ing /etc/fstab
otherwise the whole nfs communication can take too long for the
systemd-fstab-generator
2013-03-06 17:29:11 +01:00
Harald Hoyer 6ae68b4674 kernel-modules: handle rd.driver.* in systemd mode in dracut-pre-udev 2013-03-06 17:29:11 +01:00
Harald Hoyer 41eba87b32 dracut_need_initqueue 2013-03-06 17:29:11 +01:00
Harald Hoyer a1084c02fd fs-lib/fs-lib.sh: add write_fs_tab() 2013-03-06 17:29:11 +01:00
Harald Hoyer 5ac8420abc crypt/parse-crypt.sh: don't generate luks rules in systemd mode 2013-03-06 17:29:11 +01:00
Harald Hoyer 24d009507f btrfs: no need for btrfs_timeout in systemd mode 2013-03-06 17:29:11 +01:00
Harald Hoyer e9020221a7 crypt: do not cleanup in systemd mode 2013-03-06 17:29:11 +01:00
Harald Hoyer b59e9e5724 network/netroot.sh: remove the dhcp finished hook, if we have a handler 2013-03-06 17:22:09 +01:00
Harald Hoyer b5859d6359 i18n: no manual setup needed if systemd is in the game 2013-03-06 17:22:09 +01:00
Harald Hoyer dbfaae0e34 systemd: changes for new initrd services
Requires systemd >= 198
2013-03-06 17:21:47 +01:00
Harald Hoyer f62f3a2191 reset initqueue loop counter only if new uevents exist 2013-03-02 13:19:20 +01:00
Harald Hoyer 389333396a resume: move resume hook from mount to pre-mount 2013-03-02 13:11:38 +01:00
Harald Hoyer cfb7410cd0 mdraid/mdraid_start.sh: remove mdmon workaround 2013-03-02 13:10:57 +01:00
Harald Hoyer f672b1c399 btrfs/btrfs_timeout.sh: do not "exit 0" 2013-03-02 13:10:04 +01:00
Harald Hoyer f12f694355 btrfs: Use upstream 64-btrfs.rules 2013-02-22 11:14:04 +01:00
Harald Hoyer 9c65c125a9 systemd: change path of switch-root.conf
we do not have to clean it up for /etc/switch-root.conf
2013-02-21 12:18:21 +01:00
Harald Hoyer 7d4d3f8da6 lvm/module-setup.sh: use for_each_host_dev_and_slaves_all
Use for_each_host_dev_and_slaves_all to get all lvm setups for the
host-only case.

Thanks to Olivier Thauvin
2013-02-21 12:13:56 +01:00
Harald Hoyer 569ffe77bf systemd: add systemd-modules-load.service and hook dirs 2013-02-21 12:13:09 +01:00
Harald Hoyer 31ba4de21d url-lib/url-lib.sh: remove bashism
remove the forgotten bashism "+="
2013-02-19 16:13:49 +01:00
Stefan Reimer a005c47763 base/init.sh: create /run/log
If the systemd module is not used /run/log is not created which results
in dangeling softlink from /var/log which causes stuff to fail.
2013-02-18 12:05:23 +01:00
Harald Hoyer 1a6fdf2417 btrfs: use "btrfs device ready" 2013-02-18 11:58:11 +01:00
Harald Hoyer 27a2c3a406 systemd: services got renamed 2013-02-14 12:32:12 +01:00
Harald Hoyer b347edfa23 dracut-emergency.service: wants systemd-vconsole-setup.service 2013-02-14 12:32:04 +01:00
Colin Guthrie 3ed09d970e resume: Ensure we remove the timout job when we find the resume device 2013-02-13 17:46:24 +01:00
Thomas Backlund a28e2aeefe kernel-modules: Add ehci support for kernel 3.8+
Kernel 3.8 split ehci-hcd into ehci-hcd, ehci-pci and ehci-platform,
so adapt the list to cope with this change.
2013-02-13 17:42:32 +01:00
Wim Muskee c6a71c7b8a make nbd port check more robust
The following change makes the check for the nbd port or named export
more robust.
I wasn't sure whether to include sed in the dracut_install() of
module-setup.sh since net already does that (and nbd depends on that).
2013-02-11 15:44:11 +01:00
Harald Hoyer 6ecb9a2d68 url-lib/url-lib.sh: add proxy support for curl 2013-02-11 13:56:04 +01:00
Harald Hoyer 918a6874df url-lib/url-lib.sh: remove bashisms 2013-02-11 13:55:44 +01:00
Harald Hoyer 2663232a01 systemd/dracut-initqueue.sh: call udevadm settle directly 2013-02-11 11:49:19 +01:00
Harald Hoyer cebab07e68 systemd/dracut-initqueue: run after cryptsetup.target 2013-02-11 11:49:19 +01:00
Harald Hoyer a04f3077cd systemd/dracut-pre-pivot.sh: remove /dev/root symlink after shell 2013-02-11 11:49:19 +01:00
Harald Hoyer 04b873598b systemd: set udev debug/info via config file and report obsolete options 2013-02-11 11:49:19 +01:00
Harald Hoyer 22137f9cac systemd/dracut-pre-trigger.sh: enable rd.break=pre-trigger debug shell 2013-02-11 11:49:19 +01:00
Harald Hoyer 54665349ec systemd/dracut-cmdline.sh: create /run/log subdir 2013-02-11 11:49:19 +01:00
Harald Hoyer f251a89772 systemd/dracut-pre-trigger.service: load service on demand 2013-02-11 11:49:19 +01:00
Harald Hoyer fbdfa57746 systemd/dracut-pre-udev.service: load service on demand 2013-02-11 11:49:19 +01:00
Harald Hoyer 6b095274fb systemd: trigger systemd-vconsole-setup.service only on demand 2013-02-11 11:49:19 +01:00
Harald Hoyer 11174408e8 systemd/dracut-initqueue.sh: replace $UDEV_QUEUE_EMPTY
for systemd-udevd the version of udevd is high enough
2013-02-11 11:49:19 +01:00
Harald Hoyer c2117747fd virtfs: add virtio_pci kernel module 2013-02-11 11:49:19 +01:00
Harald Hoyer 4f6e293308 udev-rules: modify udev rules on initramfs creation time 2013-02-11 11:49:19 +01:00
Harald Hoyer d9076cac19 btrfs/btrfs_finished.sh: use btrfs device ready for probing 2013-02-08 16:52:38 +01:00
Harald Hoyer ff52ca1b57 btrfs/80-btrfs.rules: remove modprobe of btrfs module
this should be automatically modprobed by the kernel on demand
2013-02-08 16:52:38 +01:00
Harald Hoyer 8a3c4957fc drm/module-setup.sh: make drm module only install on dependency 2013-02-08 16:52:38 +01:00
Harald Hoyer 7fa3b9e376 url-lib/url-lib.sh: turn off curl globbing
https://bugzilla.redhat.com/show_bug.cgi?id=907497
2013-02-08 16:52:38 +01:00
Harald Hoyer 39135af155 network/ifup.sh: echo in get_vid() instead of using the return value
The return value is module 256, so VLAN ids > 255 could not be returned.
2013-02-08 16:52:38 +01:00
Dan Horák 02640e8e65 set peer for point-to-point connections
network/net-lib.sh: only set net vars, if they have a value
2013-02-08 16:52:30 +01:00
Frederick Grose 579f385384 Provide devices to enable booting with rd.live.overlay.readonly=1 2013-02-06 13:52:30 +01:00
Kevin Yung 56d60c4b2d network/ifup.sh: enable bridged vlan interfaces
To use vlan for net boot, you need to specify vlan and ip kernel options
for the boot interface. For example,

 vlan=eth1.1:eth1 bootdev=eth1.1
 ip=1.2.3.4:1.2.3.4::255.255.255.0:my-hostname:eth1:none

To use bridge for net boot, you need to specify bridge and ip kernel
option for the boot interface. For example

 bridge=br1:eth1 bootdev=br1
 ip=1.2.3.4:1.2.3.4::255.255.255.0:my-hostname:eth1:none

In my environment, I needs to boot machines from network within
a vlan or on a bridged network.	I found curent dracut release
if-up.sh script in 40network module bypass ip setting for both
bridge and vlan interface.
2013-02-06 13:52:30 +01:00
Colin Guthrie cd9072d342 Mount /proc before including dracut-lib.sh.
When dracut-lib.sh is sourced it checks the command line (when not using systemd)
as part of the check_quiet() call.

Therefore mount /proc earlier in init.

Avoids the error:

init: 77: /lib/dracut-lib.sh: /proc/cmdline: No such file or directory
2013-02-06 13:52:30 +01:00
Harald Hoyer d8b627b9dc shutdown: call "losetup -D" on shutdown 2013-02-05 11:04:02 +01:00
Harald Hoyer 6320d072a1 mdmon: renamed mdmon-offroot@.service to mdmon@.service 2013-02-05 10:58:06 +01:00
Harald Hoyer 14fcfbec3e network/net-genrules.sh: remove some bashisms 2013-01-30 17:22:25 +01:00
Harald Hoyer ae4758ce0d rootfs-block/mount-root.sh: fixup for 8b6bf0ef5
not only fix the warning message, but the real mount arguments, too
2013-01-23 16:24:33 +01:00
Colin Guthrie 3de6001e1e Include crc32c module for xfs.
Just like btrfs, xfs now requires CRC module that cannot be resolved via
normal module resolving.

Move this hack into fs-lib and remove it from btrfs module.

https://bugs.mageia.org/show_bug.cgi?id=8676
2013-01-23 15:24:27 +01:00
Harald Hoyer d6d3173916 network/dhclient-script.sh: also touch "/tmp/setup_net_<mac>.ok" 2013-01-23 15:24:27 +01:00
Harald Hoyer 8b6bf0ef57 romount fix 2013-01-23 15:24:27 +01:00
Dave Young 7bd8f23303 Add memory usage trace to diffrent hook points
Hi, Here is an update of this patch, fixed the local variable issue.
2013-01-23 15:24:27 +01:00
dyoung@redhat.com a08ea34aba add function getargnum
For cmdline argument with numeric value, add a new function getargnum
It will get proper value with default value as $1, min value as $2,
max value as $3, and param name as $4. valid result will be echo to stdout.
for nul or value not valid it will just echo the default value.
Note: The values should be >=0

[v1->v2]: add arg <minval>
[v2->v3]: do not use bash string match =~

Signed-off-by: Dave Young <dyoung@redhat.com>
2013-01-23 15:24:27 +01:00
Dave Young 6cb77ea91f use linkup in dhclient-script.sh
linkup is a wrapper function for waiting interface ready and up.
change to use linkup as what we do in ifup script.

Signed-off-by: Dave Young <dyoung@redhat.com>
2013-01-23 15:24:27 +01:00
Jiri Pirko a9f634f815 fix teamd exec in case config does not include devname
In case that configuration file did not include name of team device,
teamd would not start. Fix this by adding "-t" parameter.

Signed-off-by: Jiri Pirko <jiri@resnulli.us>
2013-01-23 15:24:27 +01:00
Harald Hoyer 551c2dd71f shutdown: kill all processes and report remaining ones 2013-01-22 15:31:45 +01:00
Harald Hoyer ffc4f173b6 mdraid: add mdmon-offroot@.service and takeover mdmon in shutdown 2013-01-22 15:31:41 +01:00
Harald Hoyer ebd1d65a1b shutdown: source pre-shutdown hook and force quit plymouth before umount 2013-01-22 15:31:22 +01:00
Harald Hoyer 5b68300899 dracut-lib.sh: force hide plymouth in shutdown emergency shell 2013-01-22 15:31:19 +01:00
Harald Hoyer e6fcec9173 usrmount/mount-usr.sh: filter "subvol=" from root rflags
https://bugzilla.redhat.com/show_bug.cgi?id=890577
2013-01-02 14:06:44 +01:00
Harald Hoyer 1db3d2615d kernel-modules: create /etc/modprobe.d if it does not yet exist
https://bugzilla.redhat.com/show_bug.cgi?id=873220
2013-01-02 13:57:40 +01:00
Harald Hoyer 5204d1d36d dmsquash-live: fixed checkisomd5 service call 2013-01-02 13:56:27 +01:00
dyoung@redhat.com 3fa59d171d Wait for interface up at the early stage
In case long delay of network driver initqueue will exit before net dev is
ready. We have no chance to setup it then.
For dhcp, when we finish the setup there will be a setup_net_<dev>.ok. Doing
same for static ip case. Also add a check to initqueue when we generate udev
rules to ensure it's early enough.

[v1->v2]: only wait for bootdev or it's possible to cause boot fail for
waiting for non-bootdev. For example bond0->eth0, set bond0 as bootdev and
dhcp, we only need to wait bond0 setup ok.

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-12-14 09:09:00 +01:00
dyoung@redhat.com d7264a3cc0 Get ifaces for udev rule use
In case BOOTIF is not set and IFACES are not set in bonding/vlan/bridge code,
net-genrule.sh will fall to bring up all net interfaces.

Here add a failsafe option to read IFACES from /tmp/net.ifaces

[v1->v2]: move IFACES reading from net.ifaces after bonding/vlan/bridge info
code chunks.
[v2->v3]: [ -n "$IFACES" ] should be  [ -z "$IFACES" ]

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-12-14 09:08:59 +01:00
dyoung@redhat.com 9078167927 Wait for link ready before use the interface
Some network driver will take long time to initialize. We have an example
in a HP machine which take about one minute for this. The callback such as
"ip link set <dev> up" will fail, afterwards setup for network will also
fail.

Fix this by add a new function wait_for_if_link, wait the link ready before
use it.

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-12-14 09:08:59 +01:00
dyoung@redhat.com 3bd7fba7af Change to use linkup function in network scripts
Update ifup.sh and fcoe-up.sh, use linkup function instead of directly
call ip command.

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-12-14 09:08:59 +01:00
dyoung@redhat.com b455451f49 Add function linkup
set link up usually include two steps, ip link set <dev> up and
wait_for_if_up <dev>. Now do these two steps in one function linkup.
Later patch will add other code into it.

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-12-14 09:08:59 +01:00
dyoung@redhat.com efa5eb424d Move wait for if functions to net lib
net-lib.sh are created for net related functions, move the wait_for_if* to
net-lib.sh naturally.

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-12-14 09:08:59 +01:00
Cong Wang 3baa150bd4 dracut: add team device support
V2: merge patch 2/2
    fix active-backup mode by adding slaves one by one
    sync with the latest teamd
    improve the comments
    wait for team ports to come up
    install /etc/libnl/classid too

This patch adds the initial support for team device [1].
A new cmdline team= is introduced for it.

Note, currently we don't support stacked devices
on/under team, it is tricky and can be added on request.

1. http://www.libteam.org/

Cc: Harald Hoyer <harald@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: Cong Wang <amwang@redhat.com>
2012-12-14 09:06:51 +01:00
Harald Hoyer 6b84015e67 iscsi/iscsiroot.sh: reload rules after adding 99-iscsi-root.rules 2012-12-14 09:04:56 +01:00
Harald Hoyer 60bbb8fcc9 cms/cms-write-ifcfg.sh: also fill in /etc/hostname 2012-12-14 09:04:56 +01:00
Harald Hoyer 16c84f2873 udev-rules/udev-rules-prepare.sh: get UDEVVERSION, if unset 2012-12-14 09:04:56 +01:00
Amadeusz Żołnowski 579238a3ac Fallback to external blkid and path_id in udev rules for <udev-176.
Starting with commit 24a38bc1cb dracut
uses udev builtins but still depends on >=udev-166 in dracut.spec.  This
patch makes dracut work with older udev again.

All credits go to Alexander Tsoy <alexander@tsoy.me>; see

  https://bugs.gentoo.org/show_bug.cgi?id=437700
2012-12-14 09:04:56 +01:00
Harald Hoyer 2b5cd3dbf8 nfs/nfsroot-cleanup.sh: mount --bind instead of --move 2012-12-14 09:04:55 +01:00
Nicolas Chauvet 00ae54f00a Fix rd.blacklist.driver when no /etc/modprobe.d exists
This bug was reported as http://bugzilla.redhat.com/873220#c2

As the /etc/modprobe.d isn't created in the boot process
nor bundled within the initramfs, the initramfsblacklist.conf
cannot be created.

Instead, the /usr/lib/modprobe.d directory is available and using it
will restore the blacklist behavior.
2012-12-14 09:04:55 +01:00
Will Woods 488d55c546 add 'swapoff' to initramfs to fix shutdown/reboot
systemd shutdown/reboot won't work unless 'swapoff' is available.
2012-12-14 09:04:55 +01:00
Will Woods 9d6165f235 drop NEWROOT from module-setup.sh
This was almost certainly copy-pasted from mount-root.sh, but it's not
valid here - dracut doesn't use NEWROOT outside of the initramfs.
2012-12-14 09:04:55 +01:00
Dave Young 2258f00e91 split plymouth module
Kdump module will need the drm and kms kernel modules so user can see the
emergency shell at least.

Fix this by split 50plymouth module to 50drm and 50plymouth. Moving the
installkernel part to 50drm so user can use drm directly without adding
extra plymouth utils.

Signed-off-by: Dave Young <dyoung@redhat.com>
Tested-by: Chao Wang <chaowang@redhat.com>
2012-12-14 09:04:55 +01:00
Harald Hoyer 2bac2d6d76 systemd/dracut-cmdline.service: run before systemd-vconsole-setup
cmdline does generate vconsole.conf, which is needed by vconsole-setup
2012-12-14 09:04:55 +01:00
Harald Hoyer b6b895bab5 systemd/service-to-run.sh: silence "cp" errors 2012-12-14 09:04:55 +01:00
Harald Hoyer fdeae2a3ac crypt/crypt-run-generator.sh: do not timeout for LUKS passwords with systemd 2012-12-14 09:04:55 +01:00
Harald Hoyer 040f388331 dmsquash-live: add systemd checkisomd5 service 2012-12-14 09:04:55 +01:00
Harald Hoyer 7990578443 network: fixed MAC address assignment 2012-11-26 13:49:38 +01:00
Harald Hoyer 528ae4f46c systemd/module-setup.sh: turn off RateLimit for the journal 2012-11-26 13:49:19 +01:00
Harald Hoyer 0fb7b847c5 cms/cmssetup.sh: sync udev rules names with network/net-genrules.sh
https://bugzilla.redhat.com/show_bug.cgi?id=825199
2012-11-22 12:32:19 +01:00
Harald Hoyer a67a6f957d nfs/nfs-start-rpc.sh: prevent mount error, if sunrpc kernel module is not in the initramfs
https://bugzilla.redhat.com/show_bug.cgi?id=870632
2012-11-22 12:29:43 +01:00
Harald Hoyer 965edeb63b i18n/parse-i18n.sh: fix locale.conf caused by 4dbc1d1bb3
https://bugzilla.redhat.com/show_bug.cgi?id=870632
2012-11-22 11:59:10 +01:00
Harald Hoyer 329bbd797f crypt/crypt-run-generator.sh: fixup last commit 065fc56ab2 2012-11-21 16:36:37 +01:00
Robert Buchholz 065fc56ab2 Make short uuid specification for allow-discards work
1) strstr " $discarduuids " did not remove the optional
'luks-' prefix from the argument as the documentation says.

2) The lookup seems backwards. $luksdev ($luks in the other code copy)
is the full uuid and thus one should check whether the user-supplied
argument (short form) is contained therein, not the other way around.

Before this commit, the only way to trigger allow-discards was to
specify the full uuid without the 'luks-' prefix.
2012-11-21 16:01:45 +01:00
Harald Hoyer 64d144aece Add sosreport script and generate /run/initramfs/sosreport.txt 2012-11-21 14:17:43 +01:00
Harald Hoyer 2b9be6f707 [nfs|cifs]root.sh: make "/dev/root" a symlink, so it gets cleaned up later on 2012-11-19 17:03:55 +01:00
WANG Chao 8bf25df640 40network/ifup.sh: do_static() and do_ipv6auto return 0 if no errors.
Commit a0be1ed removes some lines from do_static() and do_ipv6auto().

When $hostname is empty, do_static() and do_ipv6auto() will return 1
and fails to run setup_net at the last of ifup.sh

Signed-off-by: WANG Chao <chaowang@redhat.com>
2012-10-19 11:10:52 +02:00
Radek Vykydal cbd60fcaaf Do not overwrite ifcfg files generated by Anaconda kickstart (#865192) 2012-10-16 14:43:13 +02:00
Harald Hoyer 28a88b6886 fcoe/fcoe-up: sleep for 3s to allow dcb negotiation
https://bugzilla.redhat.com/show_bug.cgi?id=813057
2012-10-16 13:25:10 +02:00
Harald Hoyer 7081e99735 network/parse-ip-opts.sh: relax bootdev handling 2012-10-16 13:21:14 +02:00
Harald Hoyer dc67eda6bf combine some instmods 2012-10-16 13:16:53 +02:00
Harald Hoyer b85f723535 udev-rules: do not install all /etc/group 2012-10-16 13:16:18 +02:00
Harald Hoyer 9ff9dde8d7 virtfs: only install by default, if virt environment detected 2012-10-16 13:15:40 +02:00
Harald Hoyer 8714280104 only install /etc/modprobe.d for hostonly 2012-10-16 13:15:21 +02:00
Canek Peláez Valdés e5c9bc1198 Don't install FONT if it's the same as DEFAULT_FONT.
If the user defines FONT in /etc/vconsole.conf as the same font
defined in DEFAULT_FONT, when creating her initd she will get a
message similar to this one:

gzip: /var/tmp/initramfs.wzl9Qt/usr/share/consolefonts/LatArCyrHeb-16.psfu
already exists; do you wish to overwrite (y or n)?

Signed-off-by: Canek Peláez <canek@ciencias.unam.mx>
2012-10-16 09:38:17 +02:00
dyoung@redhat.com fc9bc6f8db ssh-client: remove ctty related check
cttyhack was removed and ctty is supported by default, so no need to
check it in ssh-client module any more.

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-10-16 09:38:17 +02:00
Harald Hoyer 600c876968 consistently lowercase "dracut" 2012-10-10 14:15:11 +02:00
Harald Hoyer 48ca487621 install virtio* modules in the generic case
https://bugzilla.redhat.com/show_bug.cgi?id=864012
2012-10-09 17:44:29 +02:00
Brian C. Lane 13cb578a37 Add rd.noverifyssl argument (#852229)
This adds --insecure to the curl args so that self-signed certificates
will be accepted.
2012-10-09 17:37:29 +02:00
Harald Hoyer fdf2b152e5 i18n/parse-i18n.sh: correctly populate /etc/vconsole.conf 2012-10-08 15:38:41 +02:00
Harald Hoyer 178c189b0b shutdown/shutdown.sh: failsafe shutdown for kexec
copy kexec from the real root, if it is not found in the unpacked
initramfs for shutdown.

Also drop to an emergency shell, if we can't do the ACTION
2012-10-08 15:37:04 +02:00
Amadeusz Żołnowski 585b3b37c0 90crypt: call systemd commands only if systemd binaries are there 2012-10-08 03:28:43 -04:00
Harald Hoyer 167a320e5f s/libnss*.so/libnss_*.so so that we don't install libnss3.so 2012-10-04 14:38:25 -04:00
Harald Hoyer 2242cd92ee systemd: rename emergency.service to dracut-emergency.service for rd.shell 2012-10-04 13:24:07 -04:00
Harald Hoyer da9c518116 dracut-functions.sh:inst_rules_program() also recognize RUN+= 2012-10-04 12:15:36 -04:00
Harald Hoyer a6c718ce8e systemd: improve the emergency shell 2012-10-03 16:39:27 -04:00
Harald Hoyer 25787f8071 systemd/module-setup.sh: move some services to sysinit 2012-10-03 16:35:13 -04:00
Harald Hoyer 8ea8d6de80 base/dracut-lib.sh: better error message for deprecated cmdline options 2012-09-28 15:29:53 +02:00
Harald Hoyer 4dbc1d1bb3 i18n/parse-i18n.sh: corrected the right option to use for the cmdline 2012-09-28 15:29:53 +02:00
Harald Hoyer e064127729 add "rd.auto" parameter and switch off automatic assembly
No automatic assembly is done anymore by default. You will have to
specify exactly what devices to assemble
("rd.md.uuid=" "rd.luks.uuid" ...)
or use "rd.auto=1" or "rd.auto" on the kernel command line.

For big servers with thousands of disks we don't want to assemble
everything by default (error prone, slow).
2012-09-27 14:05:50 +02:00
Harald Hoyer d65638dacb shutdown/shutdown.sh: reboot, if no argument was given 2012-09-27 12:10:14 +02:00
Harald Hoyer a0be1eddcf network/ifup.sh: setup nameserver for every interface
even for dhcp

https://bugzilla.redhat.com/show_bug.cgi?id=840769
2012-09-27 11:52:27 +02:00
Harald Hoyer 194e074764 dm/module-setup.sh: instmods dm_mod 2012-09-26 15:05:34 +02:00
Harald Hoyer 3722020071 crypt/crypt-run-generator.sh: add allow-discards to options in crypttab 2012-09-26 11:49:28 +02:00
Harald Hoyer 2cae00be9e busybox/module-setup.sh: generate nice relative symlinks with ln_r 2012-09-26 11:34:00 +02:00
Daniel Drake 69eba8c40a busybox: fix installation from /sbin/busybox
"inst busybox" no longer seems to work when busybox is at
/sbin/busybox. Reproduced on Fedora 18 (dracut-023-39.git20120910).

Use type -P to find the full path to busybox to solve this problem.
2012-09-26 11:30:15 +02:00
Harald Hoyer 17b01c5b13 url-lib/module-setup.sh: also install libs for https 2012-09-26 10:52:33 +02:00
Harald Hoyer a0508937fc i18n/10-console.rules: do the console init only one time 2012-09-24 15:12:20 +02:00
Harald Hoyer 500d8e6002 udev-rules/module-setup.sh: add udev groups 2012-09-24 13:30:46 +02:00
Harald Hoyer 3d12d7a2cc crypt: install /etc/crypttab only in host-only mode 2012-09-24 13:15:08 +02:00
Harald Hoyer 886b9afcc5 systemd/initrd-switch-root.target: run switch-root.target after cryptsetup
Ensure, that all crypto devices have been queried.
2012-09-24 13:12:42 +02:00
Harald Hoyer 4211605000 fallback to old ismounted, if findmnt is not installed 2012-09-20 10:36:13 +02:00
Harald Hoyer aa09b74a41 dash compat: use "2>&1" rather than "&>" 2012-09-20 10:26:14 +02:00
Dave Young d9a7ea5b43 ismounted fix
ismounted handles both find-by-dev and find-by-mnt, but there's two issues:
1. for find-by-dev, it use readlink to get the canonical dev name, but
   lvm is different with other devices, the canonical name for lvm devices
   are symlinks like /dev/mapper/vg-lv00
2. for nfs mounting, just use [ -b $dev ] is not enough, it need being handled
   seperately.

Per Karel Zak's suggestion, findmnt util is suitable for this purpose, it
handles these cases well, so just use findmnt instead of implement all the
logic by ourselves. Thanks, Karel.

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-09-19 18:37:07 +02:00
Harald Hoyer 914f531f39 45url-lib/url-lib.sh: give info what URL curl failed to download
https://bugzilla.redhat.com/show_bug.cgi?id=857836

Also allow self signed Certs and use "--insecure".

https://bugzilla.redhat.com/show_bug.cgi?id=852229
2012-09-18 16:31:24 +02:00
Harald Hoyer 0fc0dcff60 bye bye iscsi_wait_scan ... officially gone for kernel 3.6 2012-09-18 13:39:54 +02:00
Harald Hoyer 0e32ce3219 resume/resume.sh: prevent "resume: not found"
Problem lies in modules.d/95resume:

[ -x $(command -v resume) ] && command resume $a_splash "$resume"

``command -v resume'' prints nothing and ``test -x'' returns 0.

Thanks to Consus!
2012-09-18 13:37:35 +02:00
Dave Young ff0636635a move get_persistent_dev to dracut-functions.sh
kdump module also need to convert dev name to udev symlinks.
So better to move function get_persistent_dev() to dracut-functions.sh

Also in this patch improvement and fix the original function:
a) use udevadm info --query=name to get the kernel name.
   This will fix the issue caused by passing symbolic link of a device.
b) fix a bug to compare $_tmp instead of $i with $_dev. Really sorry,
   should have tested more carefully.

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-09-10 15:50:36 +02:00
Harald Hoyer ba111df2b9 nfs: install all nfs submodules 2012-09-10 15:49:58 +02:00
Harald Hoyer dff1671f8f iscsi/parse-iscsiroot.sh: delay loading of iscsi modules 2012-09-10 15:49:37 +02:00
Will Woods 44f77ac1b0 apply-live-updates.sh: handle updates for /run
/run will get mounted at $NEWROOT/run after switch_root, but it's not
there yet. bind-mount it in place so updates for /run actually land in
/run.

(also: remove a redundant check for existing directories. mkdir -p
doesn't do anything if the directory already exists.)
2012-09-07 14:09:42 +02:00
Harald Hoyer 641a8558f4 mdraid/parse-md.sh: fixed commit cc4037d120
my fault, sorry.
2012-09-06 16:16:31 +02:00
Will Woods 3bff70ef15 hide 'setsid --help' output in emergency_shell()
When emergency_shell() happens, it does 'setsid --help' to figure out if
the setsid binary supports the '-c' flag (to set the controlling tty).

This output shows up in the logs (and on-screen if you're using
rd.debug), which keeps confusing people looking for other problems.

Using "case" instead of "strstr" lets us avoid this.
2012-09-06 12:18:06 +02:00
Chris Leech d672bf167c network: fix ip=ibft regression
It looks like ip=ibft has been busted since
  25aa3c5 network: refactor stuff from netroot/parse-ip-opts to net-lib
which moved ibft parsing code out to the ibft_to_cmdline function.

The use of ifname_mac was partially replaced by a local mac, but not
completely, causing ibft_to_cmdline to abort without generating network
configuration options.

Signed-off-by: Chris Leech <cleech@redhat.com>
2012-09-06 12:18:06 +02:00
Harald Hoyer ea62729238 kernel-modules/module-setup.sh: add yenta_socket to the initramfs
https://bugzilla.redhat.com/show_bug.cgi?id=853787
2012-09-06 11:51:31 +02:00
Harald Hoyer 32ec0a762d ifcfg/write-ifcfg.sh: add "IPV6INIT=yes" for IPv6
https://bugzilla.redhat.com/show_bug.cgi?id=852808
2012-09-06 11:38:48 +02:00
Wim Muskee ca121b1a5c unquote nbd port
Name based connects fail because of the quotes around the $nbdport.
For name based connects, the -N option also gets included. For
instance nbd-client 192.168.0.1 '-N ltsp' /dev/nbd0.
I believe the quotes are not necessary for actual port numbers.
2012-09-06 10:50:05 +02:00
Frederick Grose 0db77f5a2b dmsquash-live/dmsquash-live-root.sh: Physically write overlay reset at time of request 2012-09-06 10:48:37 +02:00
Vivek Goyal cc4037d120 dracut: Override rd.md settings if rd.md.uuid is provided
Currently anaconda provides rd.md=0 on kernel's command line as a boot
time optimization if root is not on md device. But this leads to kdump
failure. We copy the command line from first kernel and if dump target
is on md device, it fails as we never try to assemble md devices as
rd.md=0.

We have already set rd.md.uuid though in /etc/cmdlind.d/ dir providing
dracut the info about what md devices to assemble. So this patch overrides
rd.md settings if rd.md.uuid is provided.

This is a stop gap measure to get kdump working on software raid
devices. Harald seems to have bigger cleanup plans for rd.md. Once
that happens, this patch will not be needed and things should
automatically be fixed.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2012-09-06 10:45:24 +02:00
Harald Hoyer 8a7f561ee5 crypt: do not run systemd crypt generator
"systemctl daemon-reload" does it already for us
2012-09-04 09:49:45 +02:00
Will Woods 32b2fb8a27 make splitsep preserve backslashes (RHBZ#851295)
splitsep() would drop escapes from its inputs. For example:

  splitsep ':' 'first:middle:\e\s\c\a\p\e\d' a b c

gave a='first', b='middle', c='escaped'. Even worse:

  splitsep ':' '\e\s\c\a\p\e\d:middle:last' a b c

gave a='escaped', b='escaped', c='escaped:middle:last'.

This fixes the quoting so both calls return the values you'd expect
(e.g. 'first', 'middle', '\e\s\c\a\p\e\d').
2012-08-24 09:29:31 +02:00
Milan Broz 104727ad6e Require fipscheck and libssl in FIPS module
To properly perform verification in FIPS mode,
we need to install fipscheck and libssl explicitly.

(cryptsetup seems to be the first user of this verification in ramdisk...)

Signed-off-by: Milan Broz <mbroz@redhat.com>
2012-08-24 09:26:59 +02:00
Harald Hoyer 73088e46f7 moved the /etc/host_devs write out to 99base
also removed some left-over debugging code
2012-08-23 12:13:02 +02:00
dyoung@redhat.com 83e0dc7a3d Add for_each_host_dev_and_slaves for device only checking
For lvm, multipath, iscsi modules they do not care about the filesystem,
Also there could be devcie in host_devs but it does not get formated.

For these kind of modules, use for_each_host_dev_and_slaves will be better than use
for_each_host_dev_fs, here add a new function to iterate the host_devs and
their slave devices.

In original for_each_host_dev_fs, it will call check_block_and_slaves which
will return once helper function return 0, but this is not enough for kdump
iscsi setup. For kdump iscsi case, it need setup each slave devices so that
the iscsi target can be properly setuped in initramfs.

Thus, this patch also add new functions check_block_and_slaves_all and
for_each_host_dev_and_slaves_all.

Signed-off-by: Dave Young <dyoung@redhat.com>
Tested-by: WANG Chao <chaowang@redhat.com>
2012-08-23 10:15:09 +02:00
dyoung@redhat.com c4bb88715c wait host devs in base module
each dev in host_devs[] should be waited in initqueue to make sure they
are oneline before initqueue finish.

Add a new wait_host_devs.sh in base module to make this a generic thing.
Because all the devs in fstab lines are also added to host_devs, so no need
do same wait in fstab-sys module anymore.

[v2->v3]: do not add slave devices to host_devs
          wait for persistent dev name in initramfs

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-08-23 10:15:09 +02:00
Harald Hoyer 54c7ace145 network: add ping and ping6
better for a quick debug
2012-08-22 17:28:06 +02:00
Harald Hoyer c1b8934faa znet: add some more kernel drivers 2012-08-22 13:16:23 +02:00
Harald Hoyer 5746f04994 mdraid: catch nested md raids
Thanks to Ian Dall!
2012-08-22 13:01:53 +02:00
Colin Guthrie f9452c94c0 udev-rules: Pre usrmove systemd installs might not find udevd.
If users had switched to systemd-183+ but have not completed
the usrmove, then the variable ${systemdutildir} will likely
refer to /usr/lib/systemd NOT /lib/systemd and thus the
systemd-udevd daemon may not be found.

So let's try a little harder and add another hard coded path
and if we don't find it, then bail out hard.
2012-08-21 18:46:20 +02:00
Harald Hoyer c9a9968dfc fips: set /boot as symlink to /sysroot/boot if no boot= parameter
otherwise sha512hmac will error out with:

sha512hmac -c /sysroot/boot/.vmlinuz-2.6.32-220.el6.x86_64.hmac
Error opening "/boot/vmlinuz-2.6.32-220.el6.x86_64": No such file or directory.
2012-08-21 18:46:20 +02:00
Harald Hoyer 48dba7f9ac network: reintroduce rd.neednet
rd.neednet is used by anaconda and the network interfaces cannot
be known in advance.
2012-08-21 18:46:20 +02:00
Harald Hoyer bdf1f472b4 add back scsi_wait_scan 2012-08-17 09:22:12 +02:00
Harald Hoyer e4297a66b1 mdraid: always create need_shutdown, if we have assembled a raid 2012-08-14 17:44:46 +02:00
Dennis Gilmore ec6d8eab69 include the omap_hsmmc module on arm 2012-08-02 12:18:48 +02:00
Harald Hoyer 4a6b33f1ee plymouth/plymouth-pretrigger.sh: s/! -n/-z/ 2012-08-01 14:36:58 +02:00
Harald Hoyer 7dd7ff0f33 base/dracut-lib.sh: make use of DRACUT_SYSTEMD 2012-08-01 14:36:38 +02:00
Dave Young 126732bcc1 split emergency_shell function
Kdump dracut hooks need to enter emergency shell, currently it directly call
"sh -i -l", with recent dracut this does not work anymore without proper ctty.

It will be convinient to seperate a standalone function _emergency_shell for
dracut modules to call.
2012-08-01 14:29:15 +02:00
Harald Hoyer f0a7fc5b43 watchdog: set watchdog timeout with wdctl, if available
"wdctl -s" does not yet exist upstream. I patched
util-linux/sys-utils/wdctl.c to set the timeout.
2012-08-01 12:49:45 +02:00
Harald Hoyer 5545fc3046 base/dracut-lib.sh:ismounted() check for block device rather than pathname 2012-07-31 14:44:50 +02:00
Harald Hoyer a638056838 base/dracut-lib.sh: fixed ismounted() for "/dev" 2012-07-31 14:43:05 +02:00
Harald Hoyer 47b8f66ced rootfs-block/mount-root.sh: corrected check for journaldev 2012-07-31 13:28:45 +02:00
Harald Hoyer 5cd7c104bd document rd.retry and change the default value to 30s
Also start the timeout scripts after 2/3 of the time.
2012-07-31 12:37:35 +02:00
Stefan Reimer a059f72b09 i18n/module-setup.sh: fixed include parsing
Due to bug in module-setup.sh in the i18n module includes from the main
keymap are not working and not added to the initrd image.

Only one quotation per line is removed. Needs to remove all.
2012-07-31 11:36:17 +02:00
Amadeusz Żołnowski afcebd136f 99shutdown: remove --no-wall argument for reboot, halt, etc...
In some distros (Gentoo, for example) these commands don't honor
--no-wall argument.
2012-07-31 10:55:17 +02:00
Harald Hoyer 3d3c192621 crypt/crypt-run-generator.sh: check if crypttab exists 2012-07-30 22:29:47 +02:00
Harald Hoyer 92b3ee855f removed finished-ask-password.sh 2012-07-30 22:29:42 +02:00
Harald Hoyer c0cae7f702 dmraid,mdraid,lvm,udev: don't process DM_MULTIPATH_DEVICE_PATH devs 2012-07-30 20:41:16 +02:00
Harald Hoyer 3f7e5358e5 crypt/crypt-run-generator.sh: do not add already existing luks 2012-07-30 20:41:16 +02:00
Harald Hoyer 3d352f5228 crypt: add systemd crypt support 2012-07-30 17:08:52 +02:00
Harald Hoyer 540eca9d9d plymouth/plymouth-pretrigger.sh: don't "exit 0" for a sourced script 2012-07-30 17:08:52 +02:00
Harald Hoyer 19cd47fd26 plymouth/plymouth-newroot.sh: don't "exit 0" for sourced scripts 2012-07-30 17:08:52 +02:00
Harald Hoyer cf62cc435f virtfs/mount-virtfs.sh: don't exit != 0 2012-07-30 17:08:52 +02:00
Harald Hoyer 8b6bdafc39 systemd/module-setup.sh: install systemd udev rules 2012-07-30 17:08:52 +02:00
Harald Hoyer 27790828d1 base/dracut-lib.sh: fixed ismounted(<mountpoint>) 2012-07-30 17:08:52 +02:00
Harald Hoyer d782ffb822 i18n/parse-i18n.sh: remove udev rules 2012-07-30 17:08:52 +02:00
Harald Hoyer 343b7d7488 kernel-modules/module-setup.sh: add missing "fi" 2012-07-30 17:08:51 +02:00
Harald Hoyer aefea76cf8 set DRACUT_SYSTEMD for systemd mode in the initramfs 2012-07-30 17:08:51 +02:00
Harald Hoyer 171ba532bc plymouth/plymouth-newroot.sh: fixed pre-pivot hook 2012-07-30 13:39:37 +02:00
Will Woods a5f01bbfb5 dracut-lib: add find_mount, use it to implement ismounted
find_mount is really the same thing as ismounted with two additions:

  1) uses "readlink" so "ismounted /dev/disk/by-label/LABEL" works
  2) returns the mountpoint of the device

And ismounted is now just "find_mount $dev >/dev/null".
2012-07-30 12:23:32 +02:00
Will Woods 7e2285a48a add comment for getargbool()
I always forget how getargbool works. Add a comment documenting it.
2012-07-30 12:23:32 +02:00
Harald Hoyer aec9f902f0 kernel-modules/module-setup.sh: move "$drivers" "$filesystems" and "$add_drivers" to dracut.sh 2012-07-27 16:03:42 +02:00
Harald Hoyer 95a5b23a38 i18n,terminfo/module-setup.sh: fixed "cp -t" calls 2012-07-27 15:34:54 +02:00
Harald Hoyer 3e51b2f6fc fixed i18n and plymouth for systemd 2012-07-27 14:15:48 +02:00
Harald Hoyer 852105dc44 i18n/console_init.sh: skip, if we use systemd and use systemd-vconsole-init 2012-07-27 14:11:22 +02:00
Harald Hoyer a7473ef379 cifs/parse-cifsroot.sh: fixed more root/netroot parsing 2012-07-27 12:40:55 +02:00
Harald Hoyer f7f3792390 iscsi/iscsiroot.sh: force link initiatorname 2012-07-27 12:18:08 +02:00
Harald Hoyer 24a38bc1cb fixed install locations for udev rules and change to IMPORT{builtin} 2012-07-27 11:55:31 +02:00
Harald Hoyer 82b1739dce cifs/parse-cifsroot.sh: do not unset netroot, we need it 2012-07-27 11:54:24 +02:00
Harald Hoyer c9a81c1f91 plymouth: do not start plymouth via dracut for systemd in the initramfs 2012-07-26 19:00:04 +02:00
Mike Gorse d580636e97 Added cifs 2012-07-26 18:51:45 +02:00
Harald Hoyer 6ca264a151 nfs/module-setup.sh: check for "rpc.rpc" before running chown 2012-07-26 18:12:05 +02:00
Amadeusz Żołnowski aa505d588f parse-root-opts: first check for ro, later for rw
This order is already in 98usrmount.
2012-07-26 17:35:59 +02:00
Harald Hoyer 96c6fa9202 base/module-setup.sh: removed mount-hook 2012-07-26 17:35:25 +02:00
Harald Hoyer 8aa9926839 mv rootfs-block/module-setup.sh:search_option() in dracut-functions.sh
new function fs_get_option()
2012-07-26 17:24:01 +02:00
Amadeusz Żołnowski ff3953efe1 ro_mnt - option at build time to force ro mount of / and /usr 2012-07-26 17:16:56 +02:00
Harald Hoyer 3cc4c8ba9b rootfs-block/module-setup.sh: add support for xfs / reiserfs separate journal device
xfs and reiserfs (among other) supports storing journal data to a
separate device. Unfortunately, XFS requires this information to boot
properly (reiserfs can embed the information in its metadata but you
might want to override it).

Frederic Crozat <fcrozat@suse.com>
2012-07-26 17:00:47 +02:00
Frederic Crozat 6a5170a15f PATCH: add support for xfs / reiserfs separate journal device
xfs and reiserfs (among other) supports storing journal data to a
separate device. Unfortunately, XFS requires this information to boot
properly (reiserfs can embed the information in its metadata but you
might want to override it).

Attached patch ensure host information are stored in initramfs and also
allows to give data over kernel commandline.

--
Frederic Crozat <fcrozat@suse.com>
SUSE

>From a7c592b9bb7de0d7874ae51d02944a7eee2ec75b Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Tue, 24 Jul 2012 18:52:17 +0200
Subject: [PATCH] Add support for separate journal on reiserfs and xfs
2012-07-26 16:38:14 +02:00
Amadeusz Żołnowski 1f4aaaeb5e modules.d/99base/mount-hook.sh is not used - removed 2012-07-26 16:35:13 +02:00
Amadeusz Żołnowski 79148c2945 apply "ro" and "rw" options from cmdline to / mount
rflags is no longer guaranteed to be non empty.  / is mounted according
to rootflags parameter but forced ro at first.  Later it is remounted
according to /etc/fstab + rootflags parameter and "ro"/"rw".  If
parameters are still the same as for first mount, / isn't remounted.

Conflicts:

    modules.d/95rootfs-block/mount-root.sh
    modules.d/99base/parse-root-opts.sh
2012-07-26 16:35:13 +02:00
Amadeusz Żołnowski 5767201eaf dracut-lib: new functions: listlist and are_lists_eq
listlist is like strstr for lists with specified separator and
are_lists_eq uses listlist to check equality of specified lists.
2012-07-26 16:35:13 +02:00
Amadeusz Żołnowski 221c342d50 98usrmount: [ "x$_usr_found" != "x" ] - removed redundant 'x' 2012-07-26 16:35:13 +02:00
Amadeusz Żołnowski b56e174322 98usrmount: print mount options 2012-07-26 16:35:13 +02:00
Amadeusz Żołnowski 5afa957915 98usrmount: use rw and ro options instead of rd.usrmount.ro
In result /usr is forced to be mounted ro or rw along with /.
2012-07-26 16:35:13 +02:00
Amadeusz Żołnowski af3b67b213 95rootfs-block: fix left fsck rel. checks 2012-07-26 16:35:13 +02:00
Harald Hoyer 93d7b823b4 systemd/dracut-cmdline.sh: output dracut version 2012-07-26 14:23:31 +02:00
Harald Hoyer 15976a0670 multipath/module-setup.sh: add dm dependency 2012-07-26 12:55:53 +02:00
Amadeusz Żołnowski 15f0b1f624 90multipath: added kpartx.rules; multipath.rules - different prefix 2012-07-26 11:40:37 +02:00
Cong Wang 823311ea3b 90kernel-modules: remove unused variables in install()
The local variables in install() are unused, can be removed.

Cc: Harald Hoyer <harald@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
2012-07-26 10:10:04 +02:00
Harald Hoyer 372c9b9647 dmsquash-live: do not eject medium for live_ram 2012-07-26 09:25:28 +02:00
Chao Wang 63c65b984a 90multipath: check() - Regexp fix to match multipath partition.
A multipath partition's uuid will be presented like:
 # cat /sys/dev/block/$_dev/dm/uuid
 part1-mpath-360060e801047103004f2c4b300000008

So in this case, change the match regexp from '^mpath-' to 'mpath-'.

Signed-off-by: Chao Wang <chaowang@redhat.com>
2012-07-26 08:35:02 +02:00
Chao Wang 06c6ea654f 95fstab-sys: Skip mounted filesystem.
Signed-off-by: Chao Wang <chaowang@redhat.com>
2012-07-26 08:35:02 +02:00
Harald Hoyer f1040fc470 qemu*/module-setup.sh: provide alternative for systemd-detect-virt 2012-07-25 16:03:49 +02:00
Harald Hoyer bf7883ebca network/module-setup.sh: instmods af_packet 2012-07-25 14:56:29 +02:00
Harald Hoyer 35022f987c iscsiroot.sh: do not source /etc/conf.d
this should have been done already.
2012-07-25 14:52:25 +02:00
Harald Hoyer 8a240aca9e require kpartx and partx for some modules 2012-07-25 13:00:08 +02:00
Harald Hoyer 68e7661ca7 deprecate old command line options 2012-07-25 10:32:42 +02:00
Leho Kraav e88e3b2797 91crypt-loop: replace basename calls with string matching 2012-07-25 10:31:43 +02:00
Leho Kraav df68781fca 91crypt-loop: use initqueue for cleanup strategy 2012-07-25 10:31:43 +02:00
Leho Kraav f855f9daaf 91crypt-loop: open root device with a key inside encrypted loop container 2012-07-25 10:31:43 +02:00
Leho Kraav c5758f2090 90crypt: enhance crypt-lib keydev mounting
Combining $keydev and $keypath should result in a unique, re-usable keydev
mountpoint. mkuniqdir doesn't seem to have any an advantage here and lacks
reusability. Is there ever a use case where these are true:

 * there are more than one rd.luks.key=$keypath:$keydev
 * one is actually different from the other
2012-07-25 10:31:43 +02:00
Leho Kraav 3e9b4330a9 90crypt: recognize .img as loop key container 2012-07-25 10:31:43 +02:00
Harald Hoyer c072e13162 get rid of "basename" 2012-07-24 14:12:36 +02:00
Harald Hoyer cef379bb03 i18n/10-console.rules: move console_init to the initqueue 2012-07-24 11:52:28 +02:00
Harald Hoyer 3e624cd9dc kernel-modules/module-setup.sh: just optionally install all modprobe.d 2012-07-23 15:40:20 +02:00
Harald Hoyer 5297d4f5b2 lvm/lvm_scan.sh: udevadm settle after lvm scan 2012-07-23 15:36:58 +02:00
Harald Hoyer b7c8f59fef kernel-modules/module-setup.sh: fix modprobe.d install
if /lib/modprobe.d does not exist, it errors with:
find: `/lib/modprobe.d/': No such file or directory
2012-07-23 11:38:36 +02:00
Harald Hoyer 13f77e9fd5 add documentation for systemd services in the initramfs 2012-07-23 11:29:20 +02:00
Harald Hoyer 24450a5ab7 resume: move resume in the initqueue/finished hook
this ensures, that resume is called as soon as possible
2012-07-20 14:47:41 +02:00
Harald Hoyer 3bb4700f98 systemd/module-setup.sh: removed initctl services 2012-07-18 15:54:08 +02:00
Harald Hoyer 6bd4ca5644 systemd/module-setup.sh: removed shutdownd
we don't need timed shutdowns in the initramfs
2012-07-18 14:08:50 +02:00
Harald Hoyer 7292a59593 systemd: stop udevd correctly 2012-07-17 18:04:44 +02:00
Harald Hoyer 765d8408e9 Revert "systemd/dracut-pre-pivot.service: force clean stop of udevd and cleanup-db"
This reverts commit a43f97c4e3.
2012-07-17 13:05:11 +02:00
Harald Hoyer 3780d7e449 systemd/initrd-switch-root.service: call switch-root with --no-block 2012-07-17 11:09:17 +02:00
Harald Hoyer a43f97c4e3 systemd/dracut-pre-pivot.service: force clean stop of udevd and cleanup-db 2012-07-17 11:08:58 +02:00
Milan Broz 4ee59ab3ed Fix fips module list.
If dracut is build only with fips/fips-aesni (no crypto module),
FIPS mode fails because of missing GCM modules.

Just add proper modules to list (kernel have both maker as FIPS compliant already).

Signed-off-by: Milan Broz <mbroz@redhat.com>
2012-07-16 16:58:51 +02:00
Harald Hoyer 030ade7590 Fixes for systemd-187, which does the right thing for switch-root 2012-07-16 10:13:53 +02:00
Harald Hoyer 1ddc789f5a kernel-modules/module-setup.sh: add hid_generic to kernel modules 2012-07-12 10:20:28 +02:00
Harald Hoyer f31049c17f systemd/service-to-run.sh: do not copy the target subdirs 2012-07-12 08:56:36 +02:00
Harald Hoyer e6bec9b793 systemd/initrd-switch-root.service: add some more dependencies 2012-07-12 08:56:17 +02:00
Harald Hoyer 982032fd26 watchdog/watchdog-stop.sh: forgot to add script 2012-07-12 07:01:27 +02:00
Harald Hoyer 2499c305f9 systemd/initrd-switch-root.service: add back "--force" to switch-root
otherwise systemd does umount /run et.al.
2012-07-11 16:36:05 +02:00
Harald Hoyer f60cd2593f systemd: fixed initrd-switch-root.service 2012-07-11 15:25:30 +02:00
Dave Young 83a420674b nfs: install modprobe config file
install nfs modprobe config file

For nfs4, in case nfs.ko is not loaded mount.nfs4 will try to load
nfs4.ko instead of nfs.ko. Fedora nfs-utils creates a lib/modprobe.d/nfs.conf
in which there's below alias:
alias nfs4 nfs

Dracut also need this file to auto load nfs kernel module.

Tested booting to a fedora 17 nfsroot share.

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-07-11 08:45:34 +02:00
Harald Hoyer 9f5c98a76a kernel-modules/module-setup.sh: also install /lib/modprobe.d/*.conf
In theory we should only install /lib/modprobe.d/*.conf and only for
host-only the /etc/modprobe.d.
2012-07-11 08:42:21 +02:00
Harald Hoyer fc5b6b0328 systemd/initrd-switch-root.target: add ConditionPathExist 2012-07-11 08:41:31 +02:00
Harald Hoyer bef2fd9722 systemd: install all dracut units in /etc and let the generator cp to /run
All custom units, which should appear in the system later on should be
installed in /etc/systemd. They should have a guard like:
ConditionPathExists=/etc/initrd-release

So, we can later query via systemctl:

$ systemctl status dracut-initqueue.service
dracut-initqueue.service - Dracut initqueue hook
 Loaded: loaded (/run/systemd/system/dracut-initqueue.service; enabled-runtime)
 Active: inactive (dead) since Tue, 10 Jul 2012 16:01:22 +0200; 1min 37s ago
         start condition failed at Tue, 10 Jul 2012 16:01:23 +0200; 1min 36s ago
 Main PID: 173 (code=exited, status=0/SUCCESS)
 CGroup: name=systemd:/system/dracut-initqueue.service

Jul 10 16:01:22 lenovo dracut-initqueue[173]: Checking, if btrfs device complete
Jul 10 16:01:22 lenovo dracut-initqueue[173]: Remounting /dev/disk/by-uuid/ade13292-d23f-45be-b732-fa9a391a56b0 with -o compress=lzo,ssd,rw
Jul 10 16:01:22 lenovo dracut-initqueue[173]: Mounted root filesystem /dev/sda3
2012-07-10 17:02:42 +02:00
Harald Hoyer ad401d1eaf systemd/initrd-switch-root.service: stop journald, rather than restart 2012-07-10 16:19:56 +02:00
Harald Hoyer 0028ffac74 plymouth: add plymouth-wait-quit.service to initrd 2012-07-10 12:24:16 +02:00
Harald Hoyer 792b189317 systemd service cleanup 2012-07-10 12:22:51 +02:00
Harald Hoyer 450b5f336d resume: move resume process to initqueue 2012-07-09 17:06:51 +02:00
Colin Guthrie 3c1feedfd1 plymouth: Use latest plymouth's populate script.
The latest plymouth no longer relies on dracut to provide functions
needed to install binaries/libs so the check for a variable name
no longer works and the old, built-in script is used instead thus
breaking the new drm and framebuffer plymouth module installation.
2012-07-09 13:08:27 +02:00
Dave Young a17fc9902e dhclient initqueue hook fix
dhclient initqueue hook fix

setup_net is scheduled in initqueue, sometimes it does not get chance to run
So the default route will not be set properly

Add a check in initqueue/finished to resolve this issue.

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-07-09 12:03:55 +02:00
Dave Young d6e8280cd8 02caps: do not create /bin/sh link
02caps: do not create /bin/sh link

caps.sh use !/bin/bash explictly, so no need to ln -sf bash /bin/sh

OTOH, 00dash will create the symlink /bin/sh, 99base will create it if
there's no /bin/sh symlink. It looks bad to creat /bin/sh in other modules.

If a script want to use bash as command interpreter it should use !/bin/bash
or !/bin/sh in case dash is not installed.

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-07-09 12:03:55 +02:00
Harald Hoyer b4e20a898e systemd-udev-trigger.service and systemd-udev-settle.service have no "d" 2012-07-09 10:12:04 +02:00
Harald Hoyer 6795dcc4fc require systemd >= 186 2012-07-09 10:04:35 +02:00
Harald Hoyer 9954876417 systemd/module-setup.sh: also include systemd-udevd* units
systemd-udev* was renamed to systemd-udevd*
2012-07-06 14:33:53 +02:00
Harald Hoyer e1619ee151 fixed bash/sh requirements 2012-07-06 14:06:41 +02:00
Harald Hoyer e09048aaf5 systemd: check, that --prefix= does not contain /run
systemd will mount /run before dracut has a chance to copy over the
original content.
2012-07-06 13:49:03 +02:00
Harald Hoyer f1e7add2bf network/ifname-genrules.sh: check for multiple ifname= lines 2012-07-06 12:57:17 +02:00
Harald Hoyer 1760dfc051 network: do not rename other interfaces and document the ifname usage
We do not support renaming in the kernel namespace anymore (as udev does
that not anymore). So, if a user wants to use ifname, he has to rename
to a custom namespace. "eth[0-9]+" is not allowed anymore.
2012-07-06 12:41:55 +02:00
Harald Hoyer f1e9f613d9 systemd: exit with sane state 2012-07-06 12:34:45 +02:00
Harald Hoyer e7dc1e42cd network: factor out parse_ifname_opts() for ifname-genrules 2012-07-05 14:33:45 +02:00
Harald Hoyer d04f16f600 install user/group adm for journal 2012-07-05 14:33:00 +02:00
Harald Hoyer 338b43cd6a fips: add instmods silent check mode "-c -s" 2012-07-05 11:15:42 +02:00
Harald Hoyer 394ffc1d97 i18n/module-setup.sh: s/error/info if no keymap is configured
https://bugzilla.redhat.com/show_bug.cgi?id=836418
2012-07-05 11:15:35 +02:00
Harald Hoyer 0251fcd400 fips: change module list 2012-07-05 10:11:27 +02:00
Harald Hoyer f0e10d9351 usrmount/mount-usr.sh: check the right path with ismounted 2012-07-03 18:20:46 +02:00
Harald Hoyer c204501e3e base/init.sh: error out early, if /dev, /proc or /sys cannot be mounted 2012-07-03 13:14:12 +02:00
Harald Hoyer f225f180e3 usrmount/mount-usr.sh: give emergency_shell if /usr mount failed 2012-07-02 18:54:07 +02:00
Harald Hoyer 5113a3efff rootfs-block/mount-root.sh: warn if ro mount failed and remount
remount the root filesystem, if it was not unmounted
2012-07-02 18:52:49 +02:00
Harald Hoyer 1594d0bf9c fs-lib/fs-lib.sh: skip fsck for xfs and btrfs. remount is enough 2012-07-02 18:52:49 +02:00
Harald Hoyer 7209df9e91 do not umount root, remount it. do not mount ro if not specified
also mount /usr readonly if "ro" is specified on the command line
if /usr is a btrfs subvolume of root, use the same mount options
2012-07-02 18:52:49 +02:00
Amadeusz Żołnowski 965c2d8760 95rootfs-block: skip checks rel. to fsck if rd.skipfsck is supplied 2012-07-02 18:52:49 +02:00
Amadeusz Żołnowski 9fb01d49d6 new option: rd.skipfsck to skip fsck for rootfs and /usr 2012-07-02 18:52:49 +02:00
Amadeusz Żołnowski e42b6f9e15 99base: don't require fs-lib to detect rootfstype
If fs-lib is not included, no rootfs autodetection is performed.
2012-07-02 18:52:49 +02:00
Amadeusz Żołnowski 2ee48b4b4b 98usrmount: force mounting /usr read-only option (rd.usrmount.ro) 2012-07-02 18:52:49 +02:00
Harald Hoyer 407fbc9e13 watchdog: stop watchdog in emergency_shell 2012-06-29 12:51:13 +02:00
Harald Hoyer 5ffa0114c0 kernel-modules: no need to install modules.dep et.al.
dracut_kernel_post() does it all
2012-06-29 12:41:28 +02:00
Harald Hoyer 08084370fd watchdog: call watchdog more often 2012-06-29 12:41:28 +02:00
Harald Hoyer 0d339e7ffb fips/module-setup.sh: s/aes-xts/xts 2012-06-29 12:41:27 +02:00
Harald Hoyer 99c7b70d1d modules.d: get rid of "tr"
replace it with sed or str_replace or bash ${var/a/b}
2012-06-29 12:41:27 +02:00
Harald Hoyer 2cf987f5c3 fcoe/module-setup.sh: check() for needed tools 2012-06-29 12:41:27 +02:00
Harald Hoyer 53fe81e752 modules.d/*/module-setup.sh: combine and specify type for installs
To speedup image creation, combine dracut_install calls and specify the exact type.
E.g. inst_script instead of the generic inst.
2012-06-29 12:41:27 +02:00
Srinivasa T N e716c0f121 Fixed BOOTIF for converting mac addr to lowercase
The patch, acfab373 - Handle upper case MAC addresses in ifname
option,takes care of only the MAC conversion to lower case in the
interface name.  But the same has to be taken care for BOOTIF also.
This patch takes care of changing the BOOTIF to lower case.

Note that sed has been used in the patch instead of tr, as it is not
compulsion to install tr by dracut in the initramfs and may not be
available always.

Signed-off-by: Srinivasa T N (seenutn@linux.vnet.ibm.com)

>From 2ec9c91adbf808dbad9bdd2057d9df55a62b711f Mon Sep 17 00:00:00 2001
From: Srinivasa T N <seenutn@linux.vnet.ibm.com>
Date: Wed, 27 Jun 2012 11:20:13 +0530
Subject: [PATCH] Fixed BOOTIF for converting mac addr to lowercase
2012-06-29 12:41:27 +02:00
Amadeusz Żołnowski 1048124120 90dmsquash-live: don't source fs-lib.sh as it is not used 2012-06-29 12:41:27 +02:00
Amadeusz Żołnowski 84a12fbc21 dracut-lib.sh: Use "$*" instead of "$@" in warn, info, and so on...
"$@" might cause some uneccessary word breaking.
2012-06-29 12:41:27 +02:00
Amadeusz Żołnowski 4ea629b9e1 98usrmount: depend on fs-lib 2012-06-29 12:41:27 +02:00
Harald Hoyer 4d0f1d7b28 modules.d/*/module-setup.sh: no more sourcing of dracutfunctions 2012-06-29 12:41:26 +02:00
Harald Hoyer 2d2c8c2078 multipath/module-setup.sh:installkernel() fix return code 2012-06-29 12:41:26 +02:00
Harald Hoyer 8bc04b98c7 kernel-modules/module-setup.sh:installkernel() fix return code 2012-06-29 12:41:26 +02:00
Harald Hoyer 71947dcb91 plymouth/module-setup.sh:installkernel() fix return code 2012-06-29 12:41:26 +02:00
Harald Hoyer 9c2a1d0de6 iscsi/module-setup.sh: speedup installkernel() 2012-06-29 12:41:26 +02:00
Harald Hoyer 94165394ff network/module-setup.sh: fixed installkernel() return code 2012-06-29 12:41:26 +02:00
Harald Hoyer 3aa221aa1d terminfo/module-setup.sh: speedup install() of all terminfo 2012-06-29 12:41:26 +02:00
Harald Hoyer a0df73b493 udev-rules/module-setup.sh: ln with --force 2012-06-29 12:41:26 +02:00
Harald Hoyer 5bccc94598 no more "mknod" in the initramfs!! 2012-06-29 12:41:26 +02:00
Harald Hoyer a5f44604f7 bootchart/module-setup.sh: no need for mknod anymore 2012-06-29 12:41:26 +02:00
Harald Hoyer 8c6151bd63 i18n/module-setup.sh:install_all_kbd(): speedup install 2012-06-29 12:41:26 +02:00
Harald Hoyer d531a0a307 systemd/module-setup.sh: ln with --force 2012-06-29 12:41:26 +02:00
Harald Hoyer 3639d2431f systemd/module-setup.sh: only create empty machine-id if non existing 2012-06-29 12:41:25 +02:00
Harald Hoyer 44cf581732 base/module-setup.sh: use --force for ln 2012-06-29 12:41:25 +02:00
Harald Hoyer b65bde04e7 fs-lib/fs-lib.sh: removed test mounting of btrfs and xfs
mount/umount check only costs time and we fail later anyway.
mount can take very long on large filesystems. Better fail on the real
mount.
2012-06-29 12:41:25 +02:00
Harald Hoyer 1488a9b34d Add qemu kernel modules, if we detect a qemu instance
Regardless of the host-only setting, add all know kernel driver for qemu
instances to support changing the virtual hardware.
2012-06-29 12:41:25 +02:00
Harald Hoyer ae2d48a366 systemd: add ConditionPathExists=/etc/initrd-release to services 2012-06-29 12:41:25 +02:00
Cong Wang 472edf825e network: support vlan tagged bonding
This patch adds support of vlan tagged bonding, for example,
bond0.2. In case of regression, I also tested bond0 and eth0.2,
all work fine.

Cc: Harald Hoyer <harald@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
2012-06-21 11:17:36 +02:00
Harald Hoyer cc51bc6fdb systemd/dracut-pre-pivot.sh: copy service files to /run/systemd/system
and remove the last info, so that the journal is not restarted again.
2012-06-21 10:52:40 +02:00
Harald Hoyer 55cb17c677 systemd: remove old udev services 2012-06-21 10:52:29 +02:00
Harald Hoyer ee876e03b9 fixed i18n for systemd and include more config files in host-only 2012-06-21 10:52:29 +02:00
Harald Hoyer 579ca216b4 systemd: remove unneeded systemd services 2012-06-21 10:52:19 +02:00
Harald Hoyer 1e570bf8e3 base/dracut-lib.sh: for systemd start emergency.service
do not spawn the shell, start the emergency.service for systemd
2012-06-21 01:11:44 +02:00
Harald Hoyer d9087a2d85 base/dracut-lib.sh: change output of info() and warn() for systemd 2012-06-21 01:11:44 +02:00
Harald Hoyer e08710a289 systemd: fixed I/O of services 2012-06-21 01:11:44 +02:00
Harald Hoyer b03e991113 systemd: fixed ordering of services 2012-06-21 01:11:44 +02:00
Harald Hoyer a51aa0d0e2 systemd/dracut-pre-udev.service: fixed description 2012-06-21 01:11:44 +02:00
Harald Hoyer f82659c552 systemd/dracut-pre-pivot.sh: remove trailing space 2012-06-21 01:11:44 +02:00
Harald Hoyer f653c86229 systemd/dracut-cmdline: make dracut-cmdline a service
convert dracut-cmdline from hook to service after the journal
2012-06-21 01:11:44 +02:00
Harald Hoyer edcbd379d5 systemd/dracut-pre-pivot.sh: stop old udev services 2012-06-21 01:11:44 +02:00
Harald Hoyer 3d3ddf082b systemd: do not flock for console 2012-06-21 01:11:44 +02:00
Harald Hoyer f6eb1f1d1f systemd: do not redirect to /dev/console 2012-06-21 01:11:44 +02:00
Harald Hoyer b47e023767 systemd: fix emergency.service and rescue.service 2012-06-21 01:11:44 +02:00
Harald Hoyer 529f7bf358 systemd/module-setup.sh: add old udev systemd services 2012-06-21 01:11:43 +02:00
Harald Hoyer 9f037266ee systemd: output all service output to the journal also 2012-06-21 01:11:43 +02:00
Harald Hoyer 361306c131 check for arch before installing drivers/s390 2012-06-21 01:11:43 +02:00
Harald Hoyer ef914f7d83 add 04watchdog dracut module 2012-06-18 20:05:25 +02:00
Harald Hoyer 0efc6c716a plymouth: fixed inst_libdir_file() call
https://bugzilla.redhat.com/show_bug.cgi?id=831349
2012-06-18 13:46:03 +02:00
Harald Hoyer 4f9f76cd62 iscsi/module-setup.sh: only install s390 driver on s390 arch 2012-06-18 13:26:55 +02:00
Harald Hoyer 8fab6e0463 resolve conflict between cms network rules and default rules 2012-06-15 11:56:13 +02:00
Harald Hoyer c9aa3cc950 Revert "network/ifup.sh: do not default to dhcp, for interfaces without ip=..."
This reverts commit ede0532c58.
2012-06-15 11:56:05 +02:00
Harald Hoyer f9ad49c2a5 Revert "network/ifup.sh: default to dhcp for BOOTIF"
This reverts commit bebb12fd0e.
2012-06-15 11:55:59 +02:00
Harald Hoyer 9f6baa127a nfs: extend libnss wildcard 2012-06-15 11:12:08 +02:00
Harald Hoyer b23a2837db add PARTUUID as root=PARTUUID=<partition uuid> parameter 2012-06-14 13:04:22 +02:00
Will Woods 30430fbe30 ifcfg: fix output for ipv6 static addressing
IPV6 configuration is pretty different than IPV4; write out the correct
set of values to make static IPV6 addressing work.
2012-06-12 19:24:46 +02:00
Will Woods 50b08e7b85 fix ifup for static ipv6
"brd +" is not valid for ipv6. This causes the 'ip addr add' command to
fail with the message "Broadcast can be set only for IPv4 addresses".

So: don't use "brd +" for ipv6.
2012-06-12 19:24:46 +02:00
Harald Hoyer bebb12fd0e network/ifup.sh: default to dhcp for BOOTIF 2012-06-11 17:11:49 +02:00
Harald Hoyer b4692ce388 mdraid/md-shutdown.sh: check for presence of mdadm 2012-06-08 12:42:12 +02:00
Harald Hoyer df96787019 dm: check for presence of dmsetup 2012-06-08 12:41:49 +02:00
Harald Hoyer fbaf1517c3 s/Unable to process initqueue/Could not boot/g 2012-06-08 10:29:35 +02:00
Harald Hoyer 57038a41fa mdraid/md-shutdown.sh: wait until md devices are clean 2012-06-08 10:28:31 +02:00
Harald Hoyer 521c57aca5 systemd/dracut-initqueue.sh: remove pre-trigger sourcing
Thanks ms77 on #dracut!
2012-06-07 11:31:45 +02:00
Harald Hoyer ede0532c58 network/ifup.sh: do not default to dhcp, for interfaces without ip=...
Don't try to be smarter than the admin configuring the machine.
Does also conflict with other methods trying to setup the interfaces,
like cmsifup.sh from the cms module.
2012-06-07 10:51:39 +02:00
Harald Hoyer 547bbe4876 systemd: strip down the installation of some unused tools 2012-06-07 10:38:31 +02:00
Harald Hoyer fe1484f3db modules are now only handled with /sys/modules and modules.dep
No more "find" and /proc/modules checking. We now rely entirely on
depmod and modules.dep
2012-06-06 18:20:35 +02:00
Harald Hoyer d161561290 make udevdir systemdutildir systemdsystemunitdir global vars
your distribution should ship those settings in
/etc/dracut.conf.d/01-distro.conf

see dracut.conf.d/fedora.conf.example
2012-06-06 15:16:00 +02:00
Juan RP 2cf4f4fb74 Avoid annonying warnings when pkg-config is not installed. 2012-06-06 15:02:00 +02:00
Harald Hoyer b6fd45163a kernel-modules/module-setup.sh: include omapdrm in the arm modules to include 2012-06-06 11:46:19 +02:00
Harald Hoyer 4d76a85df1 dasd_mod: change rd.dasd to dasd_mod kernel parameter 2012-06-05 20:27:27 +02:00
Harald Hoyer d77540c8e4 get rid of libdir and usrlibdir 2012-06-04 15:23:15 +02:00
Harald Hoyer 200e235dee systemd/dracut-pre-trigger.sh: fixed rd.udev.{debug|info} 2012-06-04 13:56:55 +02:00
Harald Hoyer 0636ce1a7f systemd/module-setup.sh: package udev in sysinit.target 2012-06-04 13:12:07 +02:00
Harald Hoyer 6042b30c58 udev-rules: check for systemd-udevd symlink already present 2012-06-04 13:11:38 +02:00
Harald Hoyer 604d1eb21a use pkg-config to determine the udev directory 2012-06-04 12:58:42 +02:00
Harald Hoyer 14b43bcaee systemd: use pkg-config to determine the systemd directories 2012-06-04 12:55:32 +02:00
Cong Wang 21928b97b0 Handle multiple underlying devices of a bridge
A bridge device with only one underlying ethernet device is almost
useless, for sure we want to support a bridge with multiple
underlying devices.

This patch adds the support by extending <ethname> in the original
bridge= cmdline to a comma-separated list of ethernet interfaces.

Cc: Harald Hoyer <harald@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
2012-06-04 11:06:53 +02:00
Jesse Keating e82e54df2c Don't set an already set attribute (#826357)
Depending on how the dasd_mod module was loaded, our device could have
already been marked as online or offline.  We need to make the sysecho
sensitive to this and not fail if the attribute we're trying to set has
already been set.
2012-06-04 11:06:13 +02:00
Harald Hoyer ecc6da6bf5 99base/init.sh: kill systemd-udevd instead of udevd 2012-06-04 10:04:19 +02:00
Harald Hoyer b35ff065ec base/loginit.sh: revert "quiet" patch 2012-06-04 03:09:09 -04:00
Harald Hoyer 187c355bf4 systemd: mkdir basic.target.wants 2012-06-04 03:08:24 -04:00
Harald Hoyer 9073ff54c1 fix return value of some installkernel() functions 2012-06-01 17:09:51 +02:00
Harald Hoyer 840d8e4733 add filesystem options to fsck_single()
if we have e.g. special btrfs options for "/" and "/usr", we want to use
those for the test mount to determine if the filesystem is corrupted.
2012-05-31 12:57:23 +02:00
Harald Hoyer 5ad3803dac crypt: add rd.luks.allow-discards and honor options in crypttab
also fixed the retry loop for rd.luks.key
2012-05-31 12:01:19 +02:00
Harald Hoyer 51153fb18c removed scsi_wait_scan from standard install 2012-05-31 09:14:17 +02:00
Harald Hoyer 2268e3a32a dasd_mod/parse-dasd-mod.sh: fixed dasd_mod param generation 2012-05-31 09:13:24 +02:00
Harald Hoyer 8b88dc7f71 network: do not arping with qeth layer3 interfaces
https://bugzilla.redhat.com/show_bug.cgi?id=825783
2012-05-29 17:39:17 +02:00
Harald Hoyer eecb3d5552 url-lib/url-lib.sh: disable curl progress bar
https://bugzilla.redhat.com/show_bug.cgi?id=817301
https://bugzilla.redhat.com/show_bug.cgi?id=824883
2012-05-29 16:18:22 +02:00
Will Woods f629355b2f add anaconda-style option parsing to ip_to_var
Anaconda used arguments of the form:

  ip=<ip> gateway=<gw> netmask=<nm>

for static IP configuration. So if we get a value for "ip" that's an IP
address, look for gateway= and netmask= and related args to fill in the
ip config vars.
2012-05-29 11:32:45 +02:00
Will Woods 78274fe2b4 do emergency_shell in die() if rd.debug=1
If I said 'rd.debug=1' I should get to debug the system before it dies,
right?
2012-05-29 11:32:45 +02:00
Will Woods 4744e27350 don't wait_for_loginit in emergency_shell()
wait_for_loginit ends the log; this is unhelpful if you're using
emergency_shell to do debugging.

Just leave loginit running. It doesn't hurt anything.
2012-05-29 11:32:45 +02:00
Will Woods 31cfc9aa5e dracut-lib.sh: add copytree(), use it where applicable
copytree() recursively copies the contents of SRC into DEST.

If DEST doesn't exist it is created; if it exists the contents of SRC
get merged into it (duplicate files are overwritten).
2012-05-29 11:32:44 +02:00
Cong Wang db2b12fa91 Remove rd.neednet cmdline
rd.neednet could be removed, as we can check /tmp/net.ifaces.
After this patch, kdump can bring up the NIC without
rd.neednet.

Cc: Harald Hoyer <harald@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
2012-05-29 11:18:51 +02:00
Cong Wang cbf66c5f06 Do not use ifenslave
ifenslave is an old tool, and could be dropped,
we can use the /sys interface.

Cc: Harald Hoyer <harald@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
2012-05-29 11:18:51 +02:00
Cong Wang 037984c80e Remove netroot check in cmdline parsing code
Relax the rules for kdump, we don't specify netroot in kdump.

Cc: Harald Hoyer <harald@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
2012-05-29 11:18:51 +02:00
Cong Wang 8eb81d482c Add vlan support in network module
This patch adds basic vlan support in network module.

The cmdline syntax for vlan is:

	vlan=<vlanname>:<phydevice>

for an example:

	vlan=eth0.2:eth0

or
	vlan=vlan2:eth0

See also patch 2/8.

Cc: Harald Hoyer <harald@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
2012-05-29 11:18:51 +02:00
Harald Hoyer 0363998d0a base/init.sh: use info() instead of vinfo() for version info
Thanks to Cong Wang for the hint
2012-05-29 10:19:02 +02:00
Harald Hoyer 806572d058 systemd/module-setup.sh: add journalctl and systemctl 2012-05-29 09:17:43 +02:00
Cong Wang 81ea383998 Relax the rules for kdump, we don't specify netroot in kdump. 2012-05-29 09:17:01 +02:00
Juan RP 8442dc45b6 dmsquash-live: do not hardcode path to mount(8) in generated hook.
In some cases (at least in mine) mount(8) is in /usr/bin/mount and
not in /bin/mount as dmsquash-live-root.sh expects. PATH is set to
/usr/bin:/usr/sbin:/sbin:/bin in that script anyway.
2012-05-29 09:15:34 +02:00
Juan RP cfede42fc3 modules.d/99base/init.sh: check for a valid init in case INIT is a symlink.
Obviously we have to test if it's executable with the PATH to NEWROOT.
2012-05-29 09:15:34 +02:00
Harald Hoyer 982d59afea drop 10rpmversion module and introduce /etc/initrd-release 2012-05-22 15:22:35 +02:00
Harald Hoyer ca024e3378 renamed switch-root.{service,target} -> initrd-switch-root 2012-05-22 14:50:19 +02:00
Harald Hoyer 02805bd1fc ifcfg/write-ifcfg.sh: fixed IFS resetting 2012-05-22 11:36:41 +02:00
Jesse Keating 965d14726a Normalize dasd argument content for dasd.conf
Also overwrite any existing files, contents from CMSCONFFILE override
any boot arguments.
2012-05-21 14:19:07 -07:00
Jesse Keating b0772db56a Translate dasd arg contents into proper dasd.conf
This uses a (new) s390utils utility to normalize the range we might get
in a dasd argument and generates a properly formatted output for
dasd.conf.
2012-05-21 14:19:07 -07:00
Jesse Keating d695143329 Use the right argument for dasd module options
The legacy argument is DASD=, and the new arguments should be the same
as the arguments for populating dasd.conf.  If multiple arguments are
passed we can stack them by inserting a ',' between them.
2012-05-21 14:19:00 -07:00
Dennis Gilmore 59aa65c9b2 ARM: make sure that we get the storage modules into the initramfs 2012-05-21 11:11:31 +02:00
WANG Cong ffc5bf686d check ifenslave instead of brctl in parse-bond.sh
This is obviously wrong, ifenslave instead of brctl is needed for bonding.

Cc: Harald Hoyer <harald@redhat.com>
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
2012-05-21 11:11:11 +02:00
Vivek Goyal 8be5a0fa94 dracut:fstab-sys: Wait for devices specified using --mount option
dracut allows passing --mount option which mounts the specified devices.
But it does not wait for these devices to show up and mounting will fail
if devices do not show up by the time "mount" was called.

I am writing some patches to support kdump on iscsi target and I noticed
that one of the initqueue script was not called as we found the root
device and broke out of main loop.

There are two possible enancements to this patch.

- Introduce a time limited wait (rd.timeout something along the lines of
  rd.retry). That will allow kdump to try to dump to a backup target if
  primary targets fails to come up.

- Wait for UUID= and LABEL= to show up too. Right now kdump converts
  UUID= and LABEL= to respective devices and passes /dev/* to dracut
  --mount option. So I am not introducing the wait for UUID= or LABEL=
 in this patch.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
2012-05-16 11:44:21 +02:00
Cong Wang a6d3be9dd5 check kernel module existance
This patch adds check of kernel module existance and
propagate errors to upper callers.

In case of break other callers of instmods(), this patch
adds an option '-c' to it, only when "-c" is specified
we fail, otherwise, errors are ignored.

Reported-by: Dave Young <dyoung@redhat.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Harald Hoyer <harald@redhat.com>
2012-05-16 11:43:25 +02:00
Olivier Blin 40913ad219 90kernel-modules/module-setup.sh: install xhci-hcd
to allow booting and using kbd devices from USB 3.0
2012-05-16 11:43:25 +02:00
Harald Hoyer 38111b9622 systemd: store switch-root.conf in /run/initramfs
Store switch-root.conf in /run/initramfs/switch-root.conf, so that the
service does not fail in ExecPost after switching to the real root.
2012-05-16 11:24:42 +02:00
Harald Hoyer 41153ca4f2 systemd/switch-root.service: do not require shutdown and isolate to default
do not require shutdown.target and final.target

After switch-root isolate to the default target. This will load the
default target in the real root after systemd deserializes.
2012-05-16 11:22:28 +02:00
Harald Hoyer 3df2306981 systemd/switch-root.target: run target before switch-root.service 2012-05-16 11:21:33 +02:00
Harald Hoyer 022c5a802f systemd/dracut-pre-pivot.sh: s/udevd.service/systemd-udev.service/ 2012-05-16 11:20:59 +02:00
Harald Hoyer 832d85cbbc base/module-setup.sh: link /proc/self/mounts to $initdir/etc/mtab 2012-05-15 19:03:50 +02:00
Harald Hoyer f72318243c systemd: adapt to new switch-root mechanism 2012-05-15 18:57:29 +02:00
Harald Hoyer a82d207b8d ifcfg/write-ifcfg.sh: add s390 specific configuration options
https://bugzilla.redhat.com/show_bug.cgi?id=811521
2012-05-10 14:34:53 +02:00
Brian C. Lane 37427748d1 Fail to boot if mediacheck fails (#817419)
The return value of checkisomd5 was being ignored.
2012-05-10 11:52:45 +02:00
Harald Hoyer 5bfbfbfc22 ifcfg/write-ifcfg.sh: use PREFIX for prefix netmask form
https://bugzilla.redhat.com/show_bug.cgi?id=820185
2012-05-09 14:58:52 +02:00
Harald Hoyer 2c431e8ec4 add systemd module 2012-05-09 13:36:07 +02:00
Harald Hoyer 8aeec251e3 rootfs-block/block-genrules.sh: install systemd mount unit 2012-05-09 13:15:32 +02:00
Harald Hoyer fe98cfee37 base/dracut-lib.sh: export UDEVVERSION 2012-05-09 13:15:32 +02:00
Harald Hoyer cad10a7f80 base/init.sh: set DRACUT_QUIET only in dracut-lib.sh 2012-05-09 13:15:32 +02:00
Harald Hoyer 3734f4ae48 plymouth/plymouth-pretrigger.sh: get consoledev from /sys/class/tty/console/active 2012-05-09 11:05:40 +02:00
Harald Hoyer 65ceb56dd5 plymouth/plymouth-pretrigger.sh: check for tty dev existence 2012-05-07 16:28:16 +02:00
Harald Hoyer cce69be668 removed old udev "vol_id" 2012-05-07 16:27:48 +02:00
Will Woods 335bb5a35b ifcfg: fix resolv.conf
/etc/net.*.resolv.conf is not a useful filename; copy it to resolv.conf
2012-05-02 14:41:37 +02:00
Will Woods 982161e062 fix _getcmdline arg-duplicating bug with /etc/cmdline*
If you unset CMDLINE to make _getcmdline re-read /etc/cmdline and
/etc/cmdline.d/*, CMDLINE_ETC and CMDLINE_ETC_D would keep their
contents.

This is a serious problem if you have (e.g.) "ip=eth0:dhcp" in
/etc/cmdline.d/net.conf, because getargs ip= will return
"ip=eth0:dhcp ip=eth0:dhcp" and then parse-ip-opts.sh will die() because
you have two configurations for eth0.
2012-05-02 14:41:37 +02:00
Harald Hoyer 168952cea6 udev-rules/module-setup.sh: fixed udevd location 2012-04-25 15:58:40 +02:00
Harald Hoyer 5dc1be1df8 multipath/module-setup.sh: fix host-only/mount checks 2012-04-25 15:58:40 +02:00
Harald Hoyer cb08b0132f iscsi/module-setup.sh: fix host-only/mount checks 2012-04-25 15:58:40 +02:00
Harald Hoyer eb6e141adb ifcfg: write DNS1=... for nameserver= args (RHBZ#815369)
If you're using a static network config, you'll want to keep your
nameservers around when NM starts. Write DNS1 (and DNS2, DNS3, etc..)
into the ifcfg file.

Thanks to Mark Hamzy <hamzy@us.ibm.com>
and Will Woods <wwoods@redhat.com> for the patch.
2012-04-24 13:08:57 +02:00
Harald Hoyer c6c704fda6 network: fix ifup and netroot calling 2012-04-23 11:32:45 +02:00
Harald Hoyer eef7649e71 merge "cleanup" and "pre-pivot-cleanup" hooks 2012-04-23 11:32:45 +02:00
Harald Hoyer f8d50f60b3 base/dracut-lib.sh: add arguments for source_hook() and source_all() 2012-04-23 11:32:45 +02:00
Harald Hoyer 476eb1b345 base: add export_n() function
resembles export -n for dash
2012-04-23 11:32:45 +02:00
Harald Hoyer c32908cee3 base: add debug_on() and debug_off() functions 2012-04-23 11:32:45 +02:00
Will Woods dc1504121b url-lib: don't use --progress-bar if TERM=dumb (RHBZ#814713)
Basically, s390 is the only place I've ever seen TERM=dumb, and it's too
dumb to handle '\r', so --progress-bar produces waaaaay too much output.

The normal progress meter only prints something once per second, so
that's reasonable on terminals where '\r' doesn't work.

See also: https://bugzilla.redhat.com/show_bug.cgi?id=814713
2012-04-23 11:25:20 +02:00
Will Woods c6a91ec992 url-lib: don't add existing handlers multiple times
Every time url-lib gets imported we end up making the list of handlers
longer with redundant entries. That's silly - we shouldn't add items
that already exist.

Note that this means you'll have to manipulate the handler list yourself
if you want to change the position/priority of existing handlers.
2012-04-23 11:25:20 +02:00
Harald Hoyer 689c3e1fcd network/parse-ip-opts.sh: remove check for netroot
with anaconda and all other kind of stuff, we might want network, even
for root not on the network
2012-04-19 16:41:04 +02:00
Dave Young 1bd76bf981 move cleanup scripts to pre-pivot-cleanup hook
below cleanup scripts is moved:
40network: kill-dhclient.sh
90crypt: crypt-cleanup.sh
90multipath: multipathd-stop.sh
95iscsi: cleanup-iscsi.sh
95nfs: nfsroot-cleanup.sh

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-04-19 11:59:45 +02:00
Dave Young 2e7257a2e3 add pre-pivot-cleanup hook
Sometimes some hook script will need to be before the cleanup hook scripts
For example dhclient killing, nfs cleanup, etc. must not happen before kdump
because it will use their fuctionalities.

So here introduce a new hook pre-pivot-cleanup, all cleanup scripts will go there.
that means pre-pivot hook is splited to two hooks pre-pivot and pre-pivot-cleanup

Signed-off-by: Dave Young <dyoung@redhat.com>
2012-04-19 11:59:45 +02:00
Harald Hoyer 76b83902dc network/module-setup.sh: include all kernel/drivers/net/phy drivers 2012-04-19 11:59:39 +02:00
Harald Hoyer b4664769dc 99shutdown/shutdown.sh: export PATH 2012-04-19 11:59:39 +02:00
Harald Hoyer 7f217d7726 base/init.sh: mount tmpfs with strictatime 2012-04-19 11:59:38 +02:00
Harald Hoyer 8a1a2f6ca4 udevd moved to /lib/systemd/systemd-udevd 2012-04-19 11:59:38 +02:00
Colin Guthrie 9f630a1889 Do not run plymouth hook if the binary is missing.
There is a remove-boot-splash script in Mageia that can
strip plymouth from an initrd. Make this script a noop
if that has happened.
2012-04-17 13:18:45 +02:00
Lennert Buytenhek a7c9cbe1a2 virtfs root filesystem support
Qemu/KVM provides virtfs, a paravirtualised filesystem that is
implemented by running the Plan 9 folder sharing protocol over
virtio.

Make booting with root=virtfs:foobar use the virtfs filesystem
with mount tag 'foobar' as root filesystem, to allow booting
virtual machines off virtfs.

Note that this only handles 9p over virtio (i.e. virtfs), and
doesn't attempt to handle mounting 9p filesystems over TCP/IP,
for example.

Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
2012-04-17 12:07:14 +02:00
Harald Hoyer 324be70f80 udev-rules: remove 01-ignore.rules 2012-04-17 11:54:27 +02:00
Peter Rajnoha b8a81fb885 lvm: disable lvmetad
Currently dracut uses lvm.conf as found in the system and modifies only
global/locking_type setting. As there's a new feature introduced - the lvmetad
daemon, dracut should disable its use as well by setting "global/use_lvmetad=0"
(patch attached).

Otherwise, there's a warning message issued:

dracut: WARNING: Failed to connect to lvmetad: No such file or directory.
Falling back to internal scanning.

@@ -, +, @@
 modules.d/90lvm/lvm_scan.sh     |    2 ++
 modules.d/90lvm/module-setup.sh |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)
2012-04-16 14:46:53 +02:00
Jon Ander Hernandez c9143a63fe Debian multiarch support
Another solution could be searching in directories found at
/etc/ld.so.conf.d/*.conf or adding a new parameter. Here is a patch
which adds a new --libdirs parameter, and also a new inst_libdir_file
function which will try to expand metacharacters on each lib
directory:

    inst_libdir_file "libdevmapper-event-lvm*.so"
2012-04-16 14:46:53 +02:00
Daniel Drake 6625b74e90 rootfs-block: avoid remount when options don't change
Mounting, unmounting and then mounting a disk partition takes some
time.

On embedded systems such as OLPC XO where we disable fsck and fstab
reading, the root options are not going to change throughout the
mount_root() function, so remounting is time consuming and without
change.

Detect and optimize for this case so that the filesystem is only
mounted once.
2012-04-16 11:53:04 +02:00
Will Woods bd3bf2ce41 shutdown: use emergency_shell from dracut-lib 2012-04-16 11:53:04 +02:00
Will Woods f7cadaa843 Make splitsep work as documented with less vars than fields
According to its comment in dracut-lib.sh:

    splitsep ":" "one:all:the:rest" one two

should set two="all:the:rest". But there's no check to see if the
current field is the last field, so it just gets "all".
2012-04-16 11:53:04 +02:00
Will Woods e173f0b384 network: add save_netinfo, fix problems with nfs->NM takeover
For NetworkManager to properly take over a NFS-root system, we need to
have the interface name(s) in /tmp/net.ifaces and save the dhclient
lease. This lets the ifcfg module do its magic.

save_netinfo should properly write out /tmp/net.ifaces when needed, and
copies the dhclient files into place.
2012-04-16 11:53:04 +02:00
Will Woods 1e4a880125 run setup_net at start of initqueue/online hook
This makes sure the network is active and ready to use during the
initqueue/online hook.

It also makes it so you can run setup_net repeatedly without causing
error messages.
2012-04-16 11:53:04 +02:00
Will Woods d8f0e320c2 dracut-lib: add str_ends, to go along with str_starts 2012-04-16 11:53:04 +02:00
Harald Hoyer b80078af39 add s390 cms setup 2012-04-05 13:54:38 +02:00
Harald Hoyer 990e945ffd add mtu and macaddr to ip= 2012-04-05 13:25:41 +02:00
Harald Hoyer 8a5456e872 95nfs/nfs-lib.sh: add server-ip to nfs server search 2012-04-05 13:25:41 +02:00
Harald Hoyer 46a1738161 base/mount-hook.sh: add forgotten file 2012-04-03 17:32:52 +02:00
Harald Hoyer 6c3b8e2c17 dracut-lib.sh: emergency_shell() test for setsit --ctty option 2012-04-03 09:30:26 +02:00
Harald Hoyer b48f5e847c iscsi: renamed rd.iscsi_param to rd.iscsi.param 2012-04-03 09:30:26 +02:00
Harald Hoyer 078acb598b fips: fixed aes_generic module typo 2012-04-02 09:01:49 +02:00
Harald Hoyer 030b8a160f 90lvm/module-setup.sh: ignore DM_UDEV_DISABLE_DISK_RULES_FLAG=1
Ignore logical volumes, which have DM_UDEV_DISABLE_DISK_RULES_FLAG=1
set for the generation of hostonly cmdline parameter.
2012-03-30 10:48:37 +02:00
Harald Hoyer f1354b8af9 fstab-sys: also include the module, if --add-fstab was specified
also fixup the logic what and when to mount.

first initramfs/etc/fstab is mounted

$NEWROOT/etc/fstab.sys takes precendence over initramfs/etc/fstab.sys
2012-03-29 12:54:50 +02:00
Harald Hoyer b2de89c5dc 90dmsquash-live/dmsquash-live-root.sh: add symlink
/run/initramfs/livedev
2012-03-29 12:53:53 +02:00
Harald Hoyer 8d51acbbe9 iscsi: add rd.iscsi_param
rd.iscsi_param is directly handed over to iscsistart as a --param option
2012-03-29 12:04:26 +02:00
Harald Hoyer ac3f1c6e87 add iscsi interface binding
iscsi connections can now be bound to <iscsi_iface_name> and <netdev_name>
2012-03-29 12:02:12 +02:00
Harald Hoyer 61c4c83235 90livenet/parse-livenet.sh: unset CMDLINE, after adding parameters 2012-03-29 11:40:16 +02:00
Harald Hoyer 6dd4370eaa 95fstab-sys/mount-sys.sh: removed check for existing /dev
there are a lot of filesystems, which do not need an actual device node
2012-03-27 16:03:00 +02:00
Harald Hoyer 0441230c51 95fstab-sys/mount-sys.sh: removed bashism 2012-03-27 16:03:00 +02:00
Harald Hoyer 26433e9c1f 95nbd/nbdroot.sh: removed bashism 2012-03-27 15:59:35 +02:00
Harald Hoyer 56bf6156d6 99base/init.sh: revert the "cp" "mv" change for /run/initramfs 2012-03-22 17:05:20 +01:00
Will Woods 317191848a shutdown: fix PATH
Some systems might not use /bin:/sbin in their paths anymore, but we're
still using it in initramfs, so make sure our PATH is correct.
2012-03-22 13:43:03 +01:00
Wim Muskee b7b062ba79 provide name based nbd connects
Because nbd-server also provides name-based exports instead of
port-based ones, make it possible to connect to those.
2012-03-21 13:06:49 +01:00
Daniel Drake 4e25cf6edf Avoid use of "export -n"
"export -n" is a bash extension, not part of POSIX, and is hence
incompatible with the busybox shell.

This was breaking boot when the busybox module was used.

Reimplement the scope change in a few lines of standard shell code.
2012-03-21 13:04:58 +01:00
Will Woods 5055abb615 98selinux/selinux-loadpolicy.sh: use mount --rbind for /dev
This preserves /dev/shm and /dev/pts for the selinux relabel.
2012-03-20 13:33:10 +01:00
Harald Hoyer abbb76fe93 Do not mount --bind /run anymore
switch_root in util-linux 2.21 does mount --move /run also
2012-03-20 13:31:17 +01:00
Will Woods 478314a90e Make sure 'set -x' gets turned back on in wait_for_loginit
wait_for_loginit does set +x (to turn off debugging temporarily), but
sometimes it would return before turning it back on. Move the set +x
line to fix that, then use 'setdebug' to make sure we don't turn it back
on unless it was needed.
2012-03-15 10:20:10 +01:00
Will Woods 8cd592dfcb fix "execvp: No such file or directory" in emergency_shell
Older versions of setsid emit this message on stderr if you try to run
"setsid --help". Redirect it to /dev/null.
2012-03-15 10:20:10 +01:00
Harald Hoyer c3d81de59b remove openvt and use "setsid -c", if possible 2012-03-14 16:19:53 +01:00