Commit Graph

2409 Commits (0a66b74b51f7d58916504e0e8bb01b6e981b489b)

Author SHA1 Message Date
Harald Hoyer dade93b4eb Revert "dmraid: let dmraid setup the partitions"
This reverts commit fbf717086e.

dmraid seems to use "p" as a seperator by default.

Reverting to kpartx, until this is fixed.
2014-01-24 12:49:17 +01:00
Colin Guthrie e3469d76c7 crypt: Prevent asking for password multiple times if non-default crypt name is used.
If a non-default device mapper name is used for an encrypted partion is
used, (i.e. not luks-$UUID) due to parsing of /etc/crypttab, then the
short-circuits put in place to prevent asking the password twice do not
work.

This would not normally be an issue as the settled job itself should be
removed after it has run and thus cannot be run again. Sadly, due to
the corresponding udev rule using ACTION="add|changed", and the fact
that trying to unlock the device (whether successful or not) seems to
trigger a changed event, it means the settled job is recreated with
each itteration thus causing the whole loop to run again.

It is this situation that the short-circuit exits would normally come
into play but sadly do not work when non-standard names are used.

By the time the /tmp/cryptroot-asked-$2 file is written near the end of
the script, the value of $2 has already been lost due to the argument
parsing code's use of 'shift'. So while on systems where the default
name is used are protected by checking /dev/mapper/xxxx, the
/tmp/cryptroot-asked-$2 file didn't help on systems where this was not
used due to this bug.

So this commit shuffles things around somewhat such that:

 1. The /dev/mapper/xxxx device is checked *after* resolving $2 (which
    contains the default name) to whatever /etc/crypttab specifies.
 2. The cryptroot-asked-xxxx file also uses the translated name both
    for the initial check and to flag when it's written.

As a separate fix, it might make sense to change the udev rule to only
act on add events rather than add|change events, but I'm not sure of the
ramifications of such a change and there may be cases where the add
event is missed and thus the change event needs to be included.
2014-01-24 12:49:17 +01:00
Alexander Tsoy 64fb0900cb udev-rules: add eudev rules
eudev configured with "--enable-modules --disable-libkmod" installs
80-drivers-modprobe.rules instead of 80-drivers.rules

https://bugs.gentoo.org/show_bug.cgi?id=494188
2014-01-24 12:49:16 +01:00
Cristian Rodríguez 314929920f systemd: ensure autofs4 and ipv6 are included
Systemd tries to load this modules very early.
Even though they are not strictly required it it is a good
thing to have them around.

[Edited-by: Harald Hoyer: moved to installkernel() ]
2014-01-24 12:48:08 +01:00
Harald Hoyer c7e15f0891 iscsi: more iscsiroot fixes
handle iscsiroot with firmware more gracefully
2014-01-22 17:40:10 +01:00
Harald Hoyer e2ecc2d8c6 base/dracut-lib.sh: "halt" the machine in systemd mode for die()
and only go in emergency shell if "rd.debug" is specified

https://bugzilla.redhat.com/show_bug.cgi?id=1053655
2014-01-22 11:18:47 +01:00
Harald Hoyer 21a3aab720 iscsi: call "iscsistart -b" until it succeeds 2014-01-17 14:52:01 +01:00
Harald Hoyer ee9938572e network: add rd.bootif=0 to ignore BOOTIF
https://bugzilla.redhat.com/show_bug.cgi?id=1044623
2014-01-17 14:52:01 +01:00
Harald Hoyer 256c91f837 systemd/module-setup.sh: make use of "ln_r" 2014-01-17 14:52:01 +01:00
Harald Hoyer 8229d06b05 systemd: add seat udev rules and mask loginctl 2014-01-17 14:52:01 +01:00
Harald Hoyer a0cab31ab8 systemd: add 71-seat.rules 73-seat-late.rules
otherwise plymouth does not work
2014-01-17 14:52:01 +01:00
Harald Hoyer d0d61e44be systemd/rootfs-generator.sh: ignore legacy root=/dev/nfs 2014-01-17 14:52:01 +01:00
Harald Hoyer 75e4cbb7be systemd/rootfs-generator.sh: exit 0 2014-01-17 14:52:01 +01:00
Harald Hoyer 7e916ae4e0 network: include all ethernet drivers 2014-01-15 14:40:12 +01:00
Harald Hoyer 8c828f329b iscsi/iscsiroot.sh: do not trust iscsistart return value 2014-01-13 09:51:04 +01:00
Harald Hoyer 9a3676a88f systemd/dracut-initqueue.sh: fstab is not a directory 2014-01-13 09:51:04 +01:00
Harald Hoyer 53cf50e00f fcoe-uefi: do not include, if fcoe utils not installed 2014-01-13 09:51:04 +01:00
Harald Hoyer df6e79bfd2 resume/parse-resume.sh: fixed printf formatting
https://bugzilla.redhat.com/show_bug.cgi?id=1045704
2014-01-13 09:51:03 +01:00
Harald Hoyer bb1ba3a1ca resume: fixed udev rule for /dev/resume instead of /dev/dev/resume
https://bugzilla.redhat.com/show_bug.cgi?id=1045116
2013-12-19 17:09:55 +01:00
Harald Hoyer 3ad42552ca network: include usbnet drivers 2013-12-19 17:06:48 +01:00
Harald Hoyer 3aa35b727f kernel-modules: add more block driver
e.g. nvme
2013-12-19 12:37:47 +01:00
Harald Hoyer ac5bff2b6f dracut-lib/wait_for_dev(): prevent systemd daemon-reload
prevent a systemd daemon-reload, if it is not necessary to do.
2013-12-18 15:22:27 +01:00
Harald Hoyer ab6f4a825e iscsi: do iscsi_firmware regardless of network
Do the iscsi_firmware iscsistart at least once, even if the network is
not up, to activate offload HBA iSCSI.

https://bugzilla.redhat.com/show_bug.cgi?id=1031160
2013-12-18 15:22:24 +01:00
Harald Hoyer 831625d29e lvm: fixed lvm thin check 2013-12-13 11:13:40 +01:00
Harald Hoyer 89031be373 move uefi-lib to a seperate module 2013-12-12 09:49:06 +01:00
Harald Hoyer ab173bb4c1 fcoe: move uefi parsing to fcoe-uefi module 2013-12-12 09:21:44 +01:00
Alexander Tsoy ded4c82ace usrmount: always install
/usr should be mounted by initramfs even if /sbin/init lives in /
2013-12-11 14:38:28 +01:00
Harald Hoyer f11712ea21 base/rdsosreport.sh: add "ip a" output 2013-12-10 12:58:37 +01:00
Harald Hoyer 3934ca8e6c systemd/dracut-initqueue.sh: fixed waiting in the loop if PW asked
continue the main loop instead of the for loop, if a password is
currently asked
2013-12-05 18:38:35 +01:00
Harald Hoyer 45845cb6a5 i18n: introduce i18n_install_all, to install everything
if i18n_install_all is set to "yes", then install all keyboard layouts
and fonts regardless of the hostonly setting.

This way, people can switch keyboard layouts, without having to recreate
the initramfs.
2013-12-05 16:42:05 +01:00
Harald Hoyer c21c4dc2b4 lvm: install thin tools, only when needed in hostonly 2013-12-05 15:57:42 +01:00
Hannes Reinecke 1c89fd148d Fixup script permissions
Scripts with a shebang should be marked as executable.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2013-12-05 15:13:29 +01:00
Hannes Reinecke 1d3496b4c1 Fixup keymap setting for openSUSE
openSUSE is using compressed keymaps.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2013-12-05 15:13:29 +01:00
Hannes Reinecke d6f0467edf Add zfcp scripts for SUSE
SuSE is storing the zfcp configuration in udev files, so we should
be including these.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2013-12-05 15:13:29 +01:00
Hannes Reinecke bfa1db78cd Add DASD configuration for SuSE
On SuSE the DASD configuration is kept in udev rules, one rule
file per device. So add a new module for copying and creating
these rules during boot.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2013-12-05 15:13:29 +01:00
Hannes Reinecke dda7ae7dcd 95znet: Make installation optional
znet_cio_free is a RedHat-specific tool, so do not install this
module on systems where the program is missing.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2013-12-05 15:13:29 +01:00
Hannes Reinecke 61c0665dad 95zfcp: Make installation optional
zfcp_cio_free is a RedHat-specific tool, so do not install this
module if the program isn't present.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2013-12-05 15:13:29 +01:00
Hannes Reinecke 8b2b77e460 95dasd_mod: make dasd_cio_free optional
dasd_cio_free is a RedHat-specific tool, so make it optional.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2013-12-05 15:13:29 +01:00
Hannes Reinecke 07cacb2455 95dasd: Only install module if normalize_dasd_arg is present
normalize_dasd_arg is a RedHat specific script, so no point
installing this module if the script isn't present.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2013-12-05 15:13:29 +01:00
Hannes Reinecke 690905cea0 95dasd: Install kernel modules only once
Move kernel module selection to 95dasd_mod and make 95dasd depend
on that module.

Signed-off-by: Hannes Reinecke <hare@suse.de>
2013-12-05 15:13:29 +01:00
Harald Hoyer 443fb52487 10i18n/parse-i18n.sh: fixed vconsole.conf/locale.conf generation 2013-12-05 15:13:29 +01:00
Harald Hoyer 8064f68d60 resume: no more autoresume 2013-12-03 16:21:04 +01:00
Harald Hoyer 40da1e5a31 resume: autoconf resume 2013-12-03 16:21:04 +01:00
Harald Hoyer b92896ece4 base/dracut-lib.sh:wait_for_dev() relax requirement
Do not "require" the devices, but "want" them. This might boot more
systems, where:
- the UUID changed
- swap devices do not show up
2013-12-03 16:21:04 +01:00
Harald Hoyer 271cd19dbe network/ifup.sh: before doing dhcp, check, if the link has a carrier 2013-12-03 16:21:04 +01:00
Harald Hoyer 7c8da72c11 network/net-lib.sh:iface_has_link() fixup
Just echo'ing the flags IFF_UP|IFF_RUNNING does _not_ reflect the
carrier state immediately. So wait for it to really show up.
2013-12-03 16:21:04 +01:00
Harald Hoyer 56ee31ccfe network/net-lib.sh:wait_for_if_up() wait for "state UP"
really wait for "state UP", otherwise it returns earlier than we want
2013-12-03 16:21:04 +01:00
Harald Hoyer 928da57447 fips: fix RHEV vmlinuz check 2013-12-03 16:21:04 +01:00
Peter Rajnoha 297b8edc05 lvm: do not run pvscan for lvmetad update
The lvmetad daemon is not yet running in initramfs so there's no
need to run pvscan (or instantiate any lvm2-pvscan systemd service).
If pvscan was called in this case (either directly or via systemd
instantiated service), it would fail because there's no lvmetad
daemon to update. This could cause confusion, especially in systemd
instantiated service which is run only once!
2013-12-03 16:20:25 +01:00
Harald Hoyer 28609baf6e kernel-modules: add ohci-pci to the list of forced module installs 2013-11-14 10:07:04 +01:00
Harald Hoyer 7e4f74f504 systemd: do not exit the initqueue, if systemd asks a password
this prevents bailing out the initqueue, while passwords are still to be
asked
2013-11-12 17:02:44 +01:00
Harald Hoyer c2ab990938 iscsi,nbd: do not fail in hostonly mode 2013-11-11 16:57:09 +01:00
Harald Hoyer 185e940e27 fips: also install /etc/system-fips in the initramfs 2013-11-04 17:32:22 +01:00
Harald Hoyer fa9384b1c0 iscsi/nbd: do not try to mount the whole disk, if root= is missing
only mount the whole disk for root=dhcp
2013-10-30 17:38:43 +01:00
Kyle McMartin 0a8e91bb24 fips: include crct10dif_generic
Resolves: rhbz#1024455
2013-10-30 12:35:27 +01:00
Harald Hoyer 4d7c18c7c0 Handle crypto modules with and without modaliases
If new kernels have modules split out, handle the case, where modules
have to modalias and just install them.

Also add the crypto drivers and names to host_modalias.
2013-10-30 12:24:37 +01:00
Alexander Tsoy 0106da599a usrmount/module-setup.sh: fixed typo 2013-10-25 17:06:44 +02:00
Harald Hoyer 5d623b1775 lvm: always install thin utils for lvm 2013-10-21 09:09:26 +02:00
Harald Hoyer 76a4478264 kernel-modules(ARM): add mmc_block usb_storage to statis list of kernel mods 2013-10-18 14:56:51 +02:00
Harald Hoyer 56903458d7 mkdir basic dirs in /run
for systemd initramfs, /run is also mounted
for non-systemd the contents of /run is copied over, when mounting /run
2013-10-16 11:49:57 +02:00
Harald Hoyer 8795467533 network/fcoe: only redirect output to loginit.pipe, if exists 2013-10-16 11:39:34 +02:00
Harald Hoyer aabea6f7b9 lvm: fix thin recognition
The global var setting was happening in a pipe and did not have an
effect.

Use <<<$() instead.

< <() cannot be used, because dracut is called in chroot's environments,
where /dev/fd does not point to /proc/self/fd, but bash wants
/dev/fd/<num> for this construct.
2013-10-16 11:30:08 +02:00
Alexander Tsoy 1aedbb7886 resume: remove resume-genrules.sh
parse-resume.sh already contains all the code from resume-genrules.sh.
Also parse-resume.sh is executed before resume-genrules.sh, so there is
no point to keep the latter.

This fixes the following error messages:
dracut-initqueue: ln: failed to create symbolic link '/dev/resume': File exists
dracut-initqueue: rm: cannot remove '/lib/dracut/hooks/initqueue/settled/resume.sh': No such file or directory
dracut-initqueue: rm: cannot remove '/lib/dracut/hooks/initqueue/timeout/resume.sh': No such file or directory
2013-10-09 16:21:50 +02:00
Alexander Tsoy cfdec163f9 resume: fix swap detection in hostonly
Check for other possible fs types. This fixes swap detection when using
TuxOnIce kernel.

Note that parse-resume.sh generate udev rules with support for
ID_FS_TYPE=suspend, but we do not include it here, because it is
libvolume_id thing and host_fs_types is populated using blkid.
2013-10-09 16:21:50 +02:00
Harald Hoyer ab2676d291 base/init.sh: also mkdir /run/lock 2013-10-09 08:20:39 +02:00
Brian C. Lane 3622d6d7b0 dmsquash-live: add /dev/mapper/live-base
This is similar to the reason for adding the
/run/initramfs/live-baseloop symlink -- access to the original live
image without overlays.

livemedia-creator does not create a osmin.img, so there is no mountable
device for it to use when rsyncing the live image to the target. It
needs a device that points to the original live image without overlays.

Note that lmc won't be creating osmin.img, since really isn't needed any
longer. Its purpose was to provide a minimal image that could be dd'd to
the target. Now that we use rsync this is no longer necessary.

The included patch adds a /dev/mapper/live-base device that Anaconda can
use whether or not there is an osmin present.
2013-10-08 15:13:44 +02:00
Harald Hoyer 6c8fc6e377 10i18n/parse-i18n.sh: parse rd.vconsole and rd.locale
and removed systemd part, because parse-i18n.sh is not even installed in
systemd driven initramfs images.
2013-10-08 15:05:21 +02:00
Harald Hoyer 8bcfd683bd */module-setup.sh: add comments for dracut called functions 2013-10-08 10:37:56 +02:00
Harald Hoyer a3c0cef9a7 lvm: install thin utils for non-hostonly 2013-10-08 10:30:00 +02:00
Harald Hoyer 50f5bbbbaf btrfs: use inst_hook to install the timeout hook 2013-10-07 17:25:58 +02:00
Harald Hoyer c4c1c4f456 rootfs-block: add support for the rootfallback= kernel cmdline option 2013-10-07 17:25:58 +02:00
Harald Hoyer 46cc29261f fcoe: add FCoE UEFI boot device support 2013-10-07 15:18:38 +02:00
Alexander Tsoy ecc13ef17e mdraid/module-setup.sh: fixes for mdadm-3.2.6+
mdadm-3.2.6+:
Incremental assembly rule contains "--offroot" arg. Update
regexp to catch this variant.

mdadm-3.3+:
Rules was splitted into two files: 63-md-raid-arrays.rules
and 64-md-raid-assembly.rules. Install them both and edit
the latter.
2013-10-04 13:56:41 +02:00
Alexander Tsoy 5bcf262d59 mdraid/module-setup.sh: install configs from /etc/mdadm.conf.d
/etc/mdadm.conf.d directory is supported since mdadm-3.3
2013-10-04 13:56:41 +02:00
Harald Hoyer 49268028b9 bcache: removed, it's in the upstream bcache-tools package 2013-10-04 10:43:02 +02:00
Peter Rajnoha b874d4b5be lvm/mdraid: Fix LVM on MD activation
The 69-dm-lvm-metad.rules set some udev env. variables that makes it
possible to detect the right time to activate LVM on MD. The MD is very
similar to DM during activation - it's usable only after proper device
activation - the CHANGE event. We need to make a difference between a
CHANGE event that comes from this activation and CHANGE event that is
the outcome of the WATCH udev rule (otherwise we'd end up with LVM
activation done on each CHANGE event - which is wrong).

So we need the udev databse to be persistent during pivot to root fs
even for MD devices.
2013-10-04 10:41:24 +02:00
WANG Chao 63f3bcd852 ifup: do not dhcp on network interface of secondary stack
Configure cmdline to:
 ip=br0:dhcp bridge=br0:bond0 bond=bond0:eth0

By default ifup bond0 will run dhcp on bond0, which is wrong. bond0
isn't the top interface. we should really run dhcp on br0.

So if we ifup an network interface on secondary stack, we should not
dhcp. Fix this issue with this patch.
2013-09-13 17:04:16 +02:00
Harald Hoyer e0aa98a1df network: correctly name iBFT vlan devices 2013-09-11 09:56:57 +02:00
Harald Hoyer e684eab878 nfs/nfsroot-cleanup.sh: silently try to umount rpc_pipefs 2013-09-10 10:50:23 +02:00
Harald Hoyer debf483d4d network/ifup.sh: ifup with dhcp, if no ip= params specified 2013-09-10 10:49:51 +02:00
Harald Hoyer d681df8e5f network/net-genrules.sh: react also on NAME
Recent systemd-udevd network renaming rules work on NAME.
Also enqueue only one unique initqueue job.
2013-09-10 10:48:18 +02:00
Harald Hoyer 12beb05a73 bcache: newer util-linux supports bcache with blkid
and probe-bcache should not be needed in that case
2013-09-09 16:51:44 +02:00
Harald Hoyer e6aafacb23 dmsquash-live/iso-scan: do the iso scan regardless of /dev/loop0
The loop driver could be a module and would never be loaded, so the
iso-scan never takes place.

To let the iso-scan happen, it is now placed into the initqueue/settled
unconditionally.
2013-09-09 16:49:45 +02:00
Harald Hoyer 8d3d72a68c no more global $CMDLINE
Do not use the global variable CMDLINE anymore. Use
CMDLINE=$(getcmdline)
2013-09-05 09:57:48 +02:00
WANG Chao b2fab575dc dracut-lib: do not use cached CMDLINE in _getcmdline
Cached CMDLINE doesn't work 100%. For example the following case,

1. dracut starts to run dracut-cmdline.sh. CMDLINE is cached when calling
   getarg 'rd.break=cmdline'.
2. In 92-parse-ibft.sh, ibft_to_cmdline() calls $(set_ifname ibft xx:xx..)
   multiple times in each subshell.
3. In 1st call, set_ifname() will check $(getargs ifname) and write out
   ifname=xxxx accordingly.
4. In 2nd call, set_ifname() will check $(getargs ifname) and it's wrong here.
   Because in step 3, we introduce a new cmdline arg ifname=xxx, but CMDLINE
   isn't updated. Thus we fail to get the new ifname arg.

It's doable to unset CMDLINE every time after a new cmdline arg is in. But
unset should be done in the parent process, because unset CMDLINE in a
subshell won't unset CMDLINE in its parent or sibling process. And also it's
painful to unset CMDLINE every time. In the future, functions and code
snippet could probably separate or move to other file, the unset CMDLINE could
malfunction again like this time.

So I'm thinking not to cache CMDLINE. It's doesn't hurt to re-read all the
cmdline args everytime. Because it's in initramfs, a non cached _getcmdline()
should be fast enough.

Please consider!

Thanks
WANG Chao
2013-09-05 08:45:39 +02:00
Harald Hoyer de74e1ef41 Rewrite "rootok" and "netroot" logic
Previously if "$rootok" = 1, parsing of netroot command line arguments
was skipped. For multiple netroot arguments, all parse scripts have to
run.

Previously only the first netroot argument was taken into account for
the parsing scripts. Now every netroot argument is processed.
2013-09-04 09:49:19 +02:00
WANG Chao f2cbd4cbd6 net-lib: ibft_to_cmdline() fixes
Fix 3 issues in ibft_to_cmdline():
- unset local variables at the beginning of each loop
- only write vlan.conf when we write out ip=xxx
- when vlan id is 0, don't write out vlan.conf. Because 0 means untagged
  and we don't actually need vlan interface.
2013-09-04 08:04:20 +02:00
Harald Hoyer 5ecc117a25 iscsi: parse iscsi parameter, even if rootok=1 2013-09-03 15:23:28 +02:00
Harald Hoyer cb73315dd6 resume: debian's resume is in /usr/lib/uswsusp
Hurray! Everybody reinvents the wheel!
2013-08-28 10:57:23 +02:00
Harald Hoyer 281327f72c dmraid/mdraid: improve hostonly recognition
Factor out get_devpath_block(), which also fixes a dmraid hostonly bug.

Also only include dmraid and mdraid, if they are actually in use.
2013-08-26 14:04:56 +02:00
Harald Hoyer da119ab18c dmraid/parse-dm.sh: if rd.md=0, use dmraid for imsm and ddf 2013-08-26 12:46:51 +02:00
Harald Hoyer 87bd8907a6 i18n: check for setfont and loadkeys binaries 2013-08-26 10:19:49 +02:00
Harald Hoyer a242ef13e0 network: move ibft parsing before all other network cmdline parser
otherwise the config produced by ibft will not get processed
2013-08-26 10:18:47 +02:00
Harald Hoyer ffc68f357e use ${var:+val} rather than ${var+val}
${var:+val} also catches var=""
2013-08-22 11:24:01 +02:00
Harald Hoyer 5c274467d6 url-lib.sh: handle 0-size files with curl
https://bugzilla.redhat.com/show_bug.cgi?id=989133#c9
2013-08-20 16:15:17 +02:00
Harald Hoyer f34e1d6b0e network: do not depend on ifcfg
rather let ifcfg return 0 if /etc/sysconfig/network-scripts exists
2013-08-20 15:09:33 +02:00
Harald Hoyer 575733aa25 add newline to cmdline config files 2013-08-20 13:08:52 +02:00
WANG Chao 55c912ae40 systemd: pre-pivot hooks runs after /sysroot is mounted
If rootflags=nofail, sysroot.mount won't strictly run "Before"
initrd-root-fs.target. So we need to order dracut-pre-pivot after
sysroot.mount.
2013-08-19 15:50:57 +02:00
Harald Hoyer 324ea606da dracut.sh: add --persistent-policy option
--persistent-policy <policy>:
    Use <policy> to address disks and partitions.
    <policy> can be any directory name found in /dev/disk.
    E.g. "by-uuid", "by-label"
2013-08-16 11:52:07 +02:00
Harald Hoyer df478eee75 base/dracut-lib.sh: move warn() definition before usage 2013-08-16 11:00:45 +02:00
Harald Hoyer 1743473b2b add parameter --print-cmdline
This prints the kernel command line parameters for the current disk
layout.

$ dracut --print-cmdline
rd.luks.uuid=luks-e68c8906-6542-4a26-83c4-91b4dd9f0471
rd.lvm.lv=debian/root rd.lvm.lv=debian/usr root=/dev/mapper/debian-root
rootflags=rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered
rootfstype=ext4
2013-08-15 16:06:37 +02:00
Harald Hoyer 8df0b654dc rootfs-block: search all host_devs for a journal device 2013-08-15 11:14:47 +02:00
Harald Hoyer 69f7ed9610 Create initramfs without using udevadm
This enables building a hostonly image, without the udev database
populated.
2013-08-15 10:44:20 +02:00
WANG Chao 613ed5cd76 network: also wait for ethernet interfaces to setup
We only wait for master interfaces for bridge/bonding/team/vlan case.
If none of these complex network is configured, we should wait for
ethernet interface (bootdev) instead.
2013-08-14 15:04:05 +02:00
Harald Hoyer 3605b48508 shutdown: fixed killall_proc_mountpoint() 2013-08-14 15:04:05 +02:00
Harald Hoyer a13bf117d5 crypt: only manually activate systemd-cryptsetup, if not in crypttab
Only additional rd.luks.UUID have to be manually activated.
2013-08-13 10:26:29 +02:00
Harald Hoyer 730b9b8b77 crypt/crypt-run-generator: also skip if UUID match in crypttab 2013-08-13 01:20:06 +02:00
Harald Hoyer 5e264a5d3e add bash module 2013-08-13 00:39:10 +02:00
Harald Hoyer 4baac4b291 crypt/module-setup.sh: use crypttab in hostonly and don't install cmdline 2013-08-13 00:35:10 +02:00
Harald Hoyer 1f4f8fb9e3 fs-lib/module-setup.sh: install fsck and fsck.ext* 2013-08-13 00:19:05 +02:00
Harald Hoyer e8b9702c0a systemd/dracut-initqueue.sh: added missing "then" 2013-08-12 13:08:17 +02:00
Harald Hoyer 109283a883 base: don't install switch_root, if systemd is used 2013-08-12 12:57:41 +02:00
Harald Hoyer e84d115b93 multipath: need_shutdown if multipath devices exist
https://bugzilla.redhat.com/show_bug.cgi?id=994913
2013-08-09 10:44:34 +02:00
Harald Hoyer 7929ec198f iscsi/module-setup.sh: install some modules regardless of hostonly 2013-08-09 10:33:27 +02:00
Harald Hoyer 0b11ea7199 network/net-lib.sh: fix ibft interface configuration
also skip ibft$num names, which have been already given

https://bugzilla.redhat.com/show_bug.cgi?id=989944
2013-08-07 16:05:59 +02:00
James Lee 7deba0428a crypt: Fix typo--/etc/crypttab not /etc/cryptab
1ae8b8a breaks the crypt module for those who use keyfiles due to a
typo leading to the exclusion of /etc/crypttab from the initrd.
2013-08-07 10:33:15 +02:00
Harald Hoyer af11946054 dracut-functions.sh: inst_multiple == dracut_install 2013-08-07 10:33:15 +02:00
Harald Hoyer 226e3710b4 systemd/dracut-initqueue.sh: continue to boot if finished failed
but /sysroot/etc/fstab exists.
2013-08-07 10:33:14 +02:00
WANG Chao ff66b6dad3 95terminfo: install vt102
systemd uses vt102 as default term for tty:

commit acda6a0
Author: Lennart Poettering <lennart@poettering.net>
Date:   Sun Apr 22 02:45:39 2012 +0200

    default to v102 everywhere, instead of vt100, to synchronize with agetty

Signed-off-by: WANG Chao <chaowang@redhat.com>
2013-08-01 12:55:55 +02:00
Harald Hoyer 64a7eace88 cms/cmssetup.sh: correct port for zfcp.conf 2013-07-31 17:29:12 +02:00
Harald Hoyer 051de5aadc lvm: add "--yes" to lvm lvchange 2013-07-31 17:17:37 +02:00
Baoquan He d2765b5175 Change the implementation of action_on_fail
Currently when action_on_fail is enabled, the emergency_shell won't be called.
In kdump even though user specify the default action as emergency_shell,
dracut skip it. Now change the implementation of action_on_fail to depend
on a file which is created by kdump when making kdump initrd, then remove it
at the beginning of kdump. This can solve the explicit emergency_shell problem.

And action_on_fail won't need paramenters, remove the relevant description in
dracut man page.

Signed-off-by: Baoquan He <bhe@redhat.com>
2013-07-31 16:23:39 +02:00
Harald Hoyer d27cd4dfdd Revert "base: setup correct system time and time zone in initrd"
This reverts commit 77364fd6bb.

Too many problems with adjtime in the initramfs

https://bugzilla.redhat.com/show_bug.cgi?id=981617
2013-07-31 15:55:22 +02:00
Radek Vykydal 030b00b8a5 Generate correct ifcfg file for vlan= option. 2013-07-31 15:47:33 +02:00
Harald Hoyer 868f935e23 kernel-modules/module-setup.sh: silently omit some filesystem drivers 2013-07-31 13:56:03 +02:00
Harald Hoyer dc7085ceeb systemd: use systemd in the initramfs, if installed on the system
and systemd version is >= 198
2013-07-31 13:56:03 +02:00
Harald Hoyer 9444bf6161 network: add vlan support for iBFT 2013-07-31 13:17:24 +02:00
Harald Hoyer dd82da4e27 network/net-lib.sh: safeguard against incomplete iBFT settings 2013-07-31 12:00:53 +02:00
Harald Hoyer 190047f161 fips: handle checksum checks for RHEV kernels
https://bugzilla.redhat.com/show_bug.cgi?id=947729
2013-07-31 11:31:13 +02:00
Harald Hoyer 748867d177 fips: cope with module aliases, when checking modules
Also do not fail, if module aliases try to load CPU specific modules
like crc32c_intel.
2013-07-31 11:26:46 +02:00
Harald Hoyer 904a76376f base/init.sh: create static device nodes with kmod 2013-07-30 16:20:05 +02:00
Harald Hoyer 52814c0ee3 systemd/dracut-pre-trigger.service: run after systemd-tmpfiles-setup-dev 2013-07-30 16:18:51 +02:00
Harald Hoyer d124904f2b systemd: include systemd-tempfiles 2013-07-30 16:18:03 +02:00
Harald Hoyer 71bb2ecd79 base: hard depend on systemd, if system was started by systemd 2013-07-30 15:28:47 +02:00
James Lee 6e0348f33b crypt: Wait for udev to settle before unlocking disk
To eliminate a race condition that occurs when unlocking one device
depends on the result of unlocking a device before it, the crypt
module must wait for udev to settle between each unlock attempt.

Example

/etc/crypttab:

  keyfile /dev/md1 none luks
  sda4_crypt /dev/sda4 /dev/mapper/keyfile luks
  sdb4_crypt /dev/sdb4 /dev/mapper/keyfile luks

Without this patch, sometimes /dev/sda4 fails to unlock because udev
doesn't have time to create /dev/mapper/keyfile before it's needed.
2013-07-30 15:28:47 +02:00
Harald Hoyer 27458b10ff url-lib/module-setup.sh: fixed grepping libcurl 2013-07-30 15:28:46 +02:00
Harald Hoyer bf27e473cb mdraid/mdmon-pre-shutdown.sh: removed unneeded code 2013-07-30 15:28:46 +02:00
Harald Hoyer 549442cc2a base/dracut-lib.sh: check for /proc/cmdline existance 2013-07-30 15:28:46 +02:00
Harald Hoyer d988dc30df systemd: add support for kmod static devnodes 2013-07-30 11:58:33 +02:00
Harald Hoyer c5f8b69ad7 network:ifup handle bootif style interfaces
e.g. ip=77-77-6f-6f-64-73:dhcp
2013-07-29 16:06:28 +02:00
Amadeusz Żołnowski 1ae8b8aa02 crypt: Skip /etc/crypttab if not present
Prevents following error message:

I: *** Including module: crypt ***
/usr/lib/dracut/modules.d/90crypt/module-setup.sh: line 31: /etc/crypttab: No such file or directory
2013-07-26 08:03:15 +02:00
Harald Hoyer 8f092d0dda bcache: add support for bcache 2013-07-24 14:35:19 +02:00
Harald Hoyer 5decf6d813 add debian udev rule files 2013-07-24 13:42:17 +02:00
Harald Hoyer 1a1c80febe usrmount: do not install, if /sbin/init does not live in /usr 2013-07-24 13:41:57 +02:00
Harald Hoyer 56b58c0a94 modsign: do not install, if no keys present
also fixed inst_hook
2013-07-24 10:34:19 +02:00
Kyle McMartin ad2565c8ff dracut: 90kernel-modules/module-setup.sh: add ehci-tegra.ko on arm
kernel-tegra is now part of the base kernel package, so bits and pieces
ended up modular, and as a result, if you boot off the internal USB, you
drop to a dracut shell with no way of getting to root.
2013-07-24 10:23:10 +02:00
Peter Jones 9f3d191fce Load kernel module signing keys before we start doing any real work.
This loads kernel module signing keys, so that we can verify signed
modules in secure boot mode.

Signed-off-by: Peter Jones <pjones@redhat.com>
2013-07-24 10:23:09 +02:00
Brandon Philips f17c5fa573 95rootfs-block: fix PARTUUID parsing
In the kernel comments PARTUUID is shown using uppercase A-F:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/init/do_mounts.c?id=HEAD#n183

However, dracut tries to use the value of PARTUUID directly in
/dev/disks/by-partuuid/ which expects the hex to be lowercase. This will
cause root to never be found, oops!

Fix dracut so it can, like the Kernel, accept either casing.

Untested but I added a hack on my local system that was similar.
2013-07-24 10:23:09 +02:00
Colin Walters 99369bea1c systemd: Replace prefdm.service with display-manager.service
The former is dead, the latter is the new name.  See:

http://cgit.freedesktop.org/systemd/systemd/commit/?id=b2c9cbafb8b1a2742978e1faf37fbb3cf4fb5d44
https://fedoraproject.org/wiki/Features/DisplayManagerRework
2013-07-24 10:23:08 +02:00
Harald Hoyer 45ef8eb723 base: provide pidof() shell function 2013-07-23 12:56:20 +02:00
Harald Hoyer bc6eae15ab init.sh: don't check for systemd-udevd in lower version branch 2013-07-23 12:26:06 +02:00
Harald Hoyer 34b56de12a resume: do not include in hostonly, if no swap is present 2013-07-18 14:41:31 +02:00
Harald Hoyer 951cedf8cb Revert "systemd: add systemd-fsck-root.service"
This reverts commit 35857f556c.
2013-07-17 15:05:30 +02:00
Harald Hoyer c33488feb1 rename sosreport to rdsosreport
Renamed sosreport to rdsosreport to differ from the sosreport tool on
the real root.
2013-07-17 14:31:59 +02:00
Harald Hoyer fbf717086e dmraid: let dmraid setup the partitions 2013-07-17 12:07:19 +02:00
Harald Hoyer 35857f556c systemd: add systemd-fsck-root.service 2013-07-17 12:00:04 +02:00
Harald Hoyer a6865e6897 rootfs-block: do not touch root-fsck
in systemd environments, we use systemd in the initramfs
2013-07-17 11:58:55 +02:00
Harald Hoyer 55068924f7 i18n: do not moan about missing kbd directory 2013-07-17 11:58:17 +02:00
Harald Hoyer 16addb86fc base: remove RD_TIMESTAMP 2013-07-17 11:26:55 +02:00
Harald Hoyer 85231e1ff3 base/module-setup.sh: do not add devs to initqueue/finished
when need-initqueue is not set in systemd mode
2013-07-12 10:15:10 +02:00
Harald Hoyer 88396c383c base/module-setup.sh: do not include systemd-timestamp
when using systemd in the initramfs
2013-07-12 10:14:15 +02:00
Harald Hoyer df03141dbc dracut-cmdline.service: remove Before: systemd-vconsole-setup.service 2013-07-12 09:47:24 +02:00
Harald Hoyer bf9cdc472c systemd/module-setup.sh: create emtpy /etc/machine-id
Even in hostonly mode, if none was found on the system.
2013-07-11 12:15:17 +02:00
Harald Hoyer f734347ae7 modules.d/10i18n/module-setup.sh: handle empty vconsole.conf
if /etc/vconsole.conf exists and is empty, then do not install anything.
2013-07-05 15:48:40 +02:00
Harald Hoyer 4aca0017e8 terminfo: only install l/linux v/vt100 and v/vt220 2013-07-05 15:32:58 +02:00
Harald Hoyer 1e057b352a add PARTLABEL and PARTUUID 2013-07-05 15:32:38 +02:00
Harald Hoyer 431b86c8e9 masterkey/module-setup.sh:check() check for $hostonly rather than "-h" 2013-07-04 12:31:31 +02:00
Harald Hoyer b093aa2dc7 beautified shell code
checked with shellcheck http://www.shellcheck.net/about.html
2013-07-04 12:31:15 +02:00
Harald Hoyer 32bd2fbb4c use "rm --" to guard against filenames beginning with "-" 2013-06-28 10:31:18 +02:00
Harald Hoyer f13deabd22 systemd/module-setup.sh: add slices.target 2013-06-28 09:58:03 +02:00
Harald Hoyer 68cb510f18 systemd: add system.slice unit 2013-06-26 09:15:34 +02:00
Harald Hoyer 5e60145449 use findmnt with "--source" or "--target"
This avoids hanging on stale NFS mounts, which are not part of the boot
process.

https://bugzilla.redhat.com/show_bug.cgi?id=975401
2013-06-24 12:47:53 +02:00
Harald Hoyer 282e0583b0 udev-rules: add 75-net-description.rules
we need IMPORT{builtin}="net_id" for the persistent network names
2013-06-18 17:54:30 +02:00
WANG Chao 32d115f385 selinux: umount $NEWROOT/dev and its submounts
$NEWROOT/dev and its submounts should be umounted after we use it.
Otherwise it fails other scripts that umount /sysroot only.

Signed-off-by: WANG Chao <chaowang@redhat.com>
2013-06-18 08:56:11 +02:00
Baoquan He 8a9a5838f3 90lvm/module-setup.sh: redirect error message of lvs to /dev/null
Signed-off-by: Baoquan He <bhe@redhat.com>
2013-06-13 15:49:20 +02:00
Harald Hoyer b819f519cb network: refix BOOTIF logic 2013-06-13 15:15:19 +02:00
Harald Hoyer 4961910fe3 systemd/module-setup.sh: mkdir /etc/systemd 2013-06-13 14:44:13 +02:00
Will Woods 3d0da653f0 net-lib: fix set_ifname()
/sys/class/$name$num isn't ever going to work; /sys/class/net/$name$num
(e.g. /sys/class/net/ibft0) should work right.
2013-06-13 14:07:17 +02:00
Will Woods 4ef0e2d92a net-lib: add configured_ifaces()
configured_ifaces is a function that returns the names of each interface
that the user wanted configured.

Currently, this is accomplished by reading the list from
/tmp/net.ifaces. But if we want to allow the user to specify an
interface by its MAC address or IP or something, we need a function that
will read the cache and convert the MACs etc. to names.

(Obviously this conversion only works once udev starts, so it will warn
you if you try it too early.)
2013-06-13 14:07:17 +02:00
Will Woods bd0f2c034a net-lib: add find_iface_with_link()
Add a function to look at the system network interfaces and return the
first one it finds with an active link (if any.)
2013-06-13 14:07:17 +02:00
Will Woods d8a698713e Don't explode when mixing BOOTIF and ip=
Now that we can use a MAC as a device identifier, we can just bring up
the device specified by BOOTIF as a normal interface.

So instead of ignoring everything but BOOTIF, we'll put BOOTIF in the
IFACES list and bring it up as normal, defaulting to DHCP if nothing
else is specified.

We can also handle anaconda-style 'ksdevice=bootif' this way.
2013-06-13 14:07:17 +02:00
Will Woods 57f2579281 net-genrules: accept MAC address for $iface, cleanups
A MAC address is a unique identifier for a particular network interface.

We can use the MAC to generate udev rules to bring up that interface,
like we currently do with BOOTIF.

This patch allows interfaces to be specified as a MAC address, either
in the usual colon-separated form or the PXE-style dash-separated form.

(The latter is more useful on the commandline, since it allows for
arguments like: "ip=77-77-6f-6f-64-73:dhcp")

This is useful since it's common for a user who is booting a new OS for
the first time to know the MAC of the device, but not know what the
kernel name will be.
2013-06-13 14:07:17 +02:00
Will Woods 215ff169db move fix_bootif to net-lib
This might be useful to other parts of dracut; move it to net-lib.sh.
2013-06-13 13:54:16 +02:00
Harald Hoyer 638cad7c97 add dracut-shutdown.service.8.asc manpage 2013-06-13 12:55:26 +02:00
Harald Hoyer 0fbb79d54f move dracut-shutdown.service to modules.d/98systemd 2013-06-13 11:42:26 +02:00
Harald Hoyer 373efa4427 systemd: make unit files symlinks 2013-06-13 11:08:03 +02:00
Harald Hoyer cee4599131 systemd/dracut-pre-pivot.service: also execute for cleanup hooks or rd.break 2013-06-13 10:37:45 +02:00
Harald Hoyer c6011f2add i18n: make the default font configurable
To set the default font for your distribution, add
i18n_default_font="latarcyrheb-sun16"
to your /lib/dracut/dracut.conf.d/01-dist.conf distribution config.
2013-06-13 09:29:17 +02:00
Harald Hoyer f8b958dc62 network: wait 40 seconds for IPv6 auto configuration
https://bugzilla.redhat.com/show_bug.cgi?id=973719
2013-06-12 17:42:35 +02:00
Harald Hoyer 391d605790 rename kernel command line param action_on_fail to rd.action_on_fail 2013-06-12 13:16:33 +02:00
Harald Hoyer aef0f55791 dmsquash-live/iso-scan: wait until the iso-scan/filename is found
Do not only run once, but wait until all devices are found.
2013-06-12 12:49:03 +02:00
Harald Hoyer 66ed711ccf systemd/dracut-initqueue.service: specify all initqueues 2013-06-07 13:56:16 +02:00
WANG Chao 437a56dc6b dracut-initqueue.service: Fix systemd start condition
Scripts in dracut initqueue hooks are placed under
/usr/lib/dracut/hooks/initqueue/*/ directory.

And also start initqueue service when kernel cmdline has
rd.break=initqueue

Signed-off-by: WANG Chao <chaowang@redhat.com>
2013-06-07 12:38:36 +02:00
Harald Hoyer 630aed8b66 udev-rules: add 80-net-name-slot.rules 2013-06-06 15:40:29 +02:00
Harald Hoyer af6292f0fc cms/cmssetup.sh: untabify 2013-06-06 14:13:36 +02:00
Harald Hoyer b710520a3d cms/cmssetup.sh: reload udev rules after adding them 2013-06-06 14:13:01 +02:00
Harald Hoyer 66e092bb53 cms/cmssetup.sh: fix LAYER2 ccw.conf setup 2013-06-06 12:32:36 +02:00
Harald Hoyer fdc1037b19 cms/cmsifup.sh: correctly set MACADDR and MTU for the ip line
https://bugzilla.redhat.com/show_bug.cgi?id=971025
2013-06-06 12:28:34 +02:00
Harald Hoyer 76df206685 cms/cmssetup.sh: do not echo newlines for ccw.conf
https://bugzilla.redhat.com/show_bug.cgi?id=970982
2013-06-06 12:27:19 +02:00
WANG Chao 77364fd6bb base: setup correct system time and time zone in initrd
Currently in initrd, hardware clock is always considered to use UTC time
format and system time zone is also UTC. Thus system time isn't correct
if hw clock is localtime or we're using other time zone in real root.

To fix this, install /etc/adjtime and /etc/localtime to initrd. If not
using systemd, install /usr/sbin/hwclock for dracut init to setup system
time.

[harald: combined the two hostonly if's]

Signed-off-by: WANG Chao <chaowang@redhat.com>
Signed-off-by: Harald Hoyer <harald@redhat.com>
2013-06-06 12:10:50 +02:00
Harald Hoyer ad45024416 lvm: fixed "thin" recognition 2013-06-06 09:40:26 +02:00
Dennis Gilmore 3ae5ac28af include panel-tfp410 module on arm systems in the initramfs needed for framebuffer on omap systems 2013-06-06 09:38:44 +02:00
Harald Hoyer d18fd0235b dmsquash-live/dmsquash-live-root.sh: fixup 32214acb3a 2013-05-31 09:04:55 +02:00
Harald Hoyer caf207afa7 ifcfg/write-ifcfg.sh: fixed logic
seems like nobody tested this with recent dracut versions.
2013-05-30 14:37:41 +02:00
Harald Hoyer 57937cf480 lvm: add tools for thin provisioning
https://bugzilla.redhat.com/show_bug.cgi?id=921235
2013-05-30 12:02:59 +02:00
Harald Hoyer feaf30ffaa network: wait for all required interfaces if "rd.neednet=1"
also set bootdev to the first configured interface, if missing

https://bugzilla.redhat.com/show_bug.cgi?id=801829
2013-05-30 11:38:23 +02:00
Harald Hoyer dcae873414 systemd/emergency.service: do not run for action_on_fail=continue
same as for dracut-emergency.service
2013-05-30 11:14:39 +02:00
Harald Hoyer 32214acb3a dmsquash-live/dmsquash-live-root.sh: add parameter rd.live.squashimg
rd.live.squashimg names the squash image in the rd.live.dir
and defaults to squashfs.img

https://bugzilla.redhat.com/show_bug.cgi?id=789036
https://bugzilla.redhat.com/show_bug.cgi?id=782108
2013-05-30 09:27:54 +02:00
Harald Hoyer e64bcf5a99 kernel-modules/module-setup.sh: add hid-hyperv and hv-vmbus 2013-05-30 08:38:40 +02:00
Harald Hoyer 62cb52f431 base/dracut-lib.sh: export DRACUT_SYSTEMD and NEWROOT 2013-05-30 08:32:18 +02:00
dyoung@redhat.com cf8b1b7853 selinux: load_policy script fix
chroot load_policy will use selinuxfs which should be mounted
in $NEWROOT/sys/fs/selinux for Fedora 19, but because there's
no $NEWROOT/sys/fs, so later process will fail.

Fixing this by bind mount /sys to $NEWROOT/sys.

Signed-off-by: Dave Young <dyoung@redhat.com>
2013-05-30 08:28:11 +02:00
Dan Horák bc97e005fa use system provides udev rule and initialization script 2013-05-30 08:28:10 +02:00
Baoquan He 679fa7ed3c 99fs-lib/fs-lib.sh: Let user specify the action after fail for fsck
The fsck is ignored when replace emergency_shell with action_on_fail,
now add it.

Signed-off-by: Baoquan He <bhe@redhat.com>
2013-05-30 08:28:08 +02:00
Harald Hoyer 4f084f3ab5 fs-lib/module-setup.sh: add xfs_metadump 2013-05-29 17:51:57 +02:00
Harald Hoyer af2716626a kernel-modules/module-setup.sh: add nvme kernel module
apparently not caught by the block driver regexp

https://bugzilla.redhat.com/show_bug.cgi?id=910734
2013-05-29 14:48:13 +02:00
Harald Hoyer 6625c085ae ifcfg/write-ifcfg.sh:
- fix ONBOOT for slaves
- set TYPE=Bond for bonding

https://bugzilla.redhat.com/show_bug.cgi?id=919001
2013-05-29 14:38:52 +02:00
Harald Hoyer af2578562c udev-rules/module-setup.sh: optionally install /etc/pcmcia/config.opts
https://bugzilla.redhat.com/show_bug.cgi?id=920076
2013-05-29 14:29:02 +02:00
Harald Hoyer 8099e7b1ba crypt-loop/module-setup.sh: install loop kernel module 2013-05-29 13:31:54 +02:00
Harald Hoyer 0a3e348225 i18n/module-setup.sh: install default font latarcyrheb-sun16 2013-05-29 13:27:03 +02:00
Harald Hoyer b78e6ac2c3 dracut-emergency.service: do not start for "action_on_fail=continue" 2013-05-29 11:33:25 +02:00
Dennis Schridde cbfe65c2fe [40network] Provide a hostname fallback function, in case there is no executable of this name 2013-05-29 11:32:57 +02:00
Harald Hoyer 284d62da81 ifcfg/write-ifcfg.sh: proper NAME the interfaces
https://bugzilla.redhat.com/show_bug.cgi?id=965842
2013-05-28 16:56:40 +02:00
Harald Hoyer c6df70fb48 btrfs: include btrfs-zero-log in the initramfs
https://bugzilla.redhat.com/show_bug.cgi?id=963257
2013-05-28 16:34:56 +02:00
Harald Hoyer 1b8616adee url-lib/url-lib.sh: turn off curl globbing
https://bugzilla.redhat.com/show_bug.cgi?id=907497
2013-05-28 16:16:26 +02:00
Baoquan He 15b93069bb 01fips/module-setup.sh: add libssl.so.10 to make kdump work with fips mode
FIPS can work well in 1st kernel, but failed in kdump kernel. the
libssl.so.10 and related hmac file are needed. Now add it and it
works.

Signed-off-by: Baoquan He <bhe@redhat.com>
2013-05-28 14:26:31 +02:00
Harald Hoyer 780cb33741 systemd: set environment vars DRACUT_SYSTEMD, NEWROOT in service file 2013-05-28 12:50:57 +02:00
Adam Williamson 8d7c07f191 don't specify "p" as a separator for dmraid arrays (RHBZ #966162)
As per RHBZ #966162, parted stopped unconditionally using "p" as a
separator for dmraid device names in version 3.1, so other things need
to fall in line with that convention now.
2013-05-27 10:08:53 +02:00
Colin Guthrie d57b8833c4 usrmount: Fix miss-detection of btrfs subvolumes.
This causes the root FS options to be incorrectly applied to to /usr
In some cases this can cause boot failure e.g. due to and XFS /usr
not supporting the 'acl' option from the ext4 root FS.

https://bugs.mageia.org/show_bug.cgi?id=9884
2013-05-06 14:06:07 +02:00
Harald Hoyer 9584c6ae90 zfcp: match udev rule against KERNEL=="zfcp"
zfcp_cfdc will go away in the future

	tt
2013-04-30 18:56:15 +02:00
WANG Chao b6f2e05819 _emergency_shell: Show current working directory correctly in shell.
When dropped to emergency shell, for example, use rd.break=pre-pivot,
the PS1 won't correctly show current directory we're in:

pre-pivot:/# cd /sysroot/
pre-pivot:/#
(still shows "/")

Let's take a look at PS1 variable:

(I'm adding prefix/suffix 'x' to make it clear):
pre-pivot:/# echo x${PS1}x
xpre-pivot:/# x
(PS1 isn't dynamic)

Regarding the current dracut code, it should be:

pre-pivot:/# cd /sysroot/etc
pre-pivot:/sysroot/etc#

With this patch:

pre-pivot:/# echo x${PS1}x
xpre-pivot:${PWD}# x
(Now PS1 is dynamic, it will show the directory correctly)

I tested for both normal boot and kdump boot.

Signed-off-by: WANG Chao <chaowang@redhat.com>
2013-04-30 12:13:56 +02:00
Harald Hoyer 26a077fc7e fips: do not fail immediatly after loading the crypto modules
Fail only if tcrypt insmod failed.
2013-04-29 11:34:26 +02:00
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