Commit Graph

4000 Commits (033-502)

Author SHA1 Message Date
Chao Fan a218f3253c Change the fs_passno of nfs to 0
There is a bug that kdump-initrd contains entry requesting nfs dump
filesystem to get filesystemchecked. And there is an erro message said
that nfs need be checked. But there's no fsck for nfs utility, e.g
fsck.nfs like other file system. Whatever fs_passno 0 or 2 are passed,
no fsck is executed at all for nfs mount.But in dracut, set it to be 2
always, so the erro message appear and it should be set to 0.

In the fstab,the sixth variable fs_passno stands for that the device need
checked or not,and dracut set it to "2".To fix this issue, it should
be "0" when the device is nfs.The third variable stands for the type of
the filesystem and we can use it to judge whether the device is nfs.
So when the third variable of fstab contains "nfs", the sixth variable
fs_passno should be set to "0".

Signed-off-by: Chao Fan <cfan@redhat.com>
(cherry picked from commit 3586a7aa77)
2015-07-02 19:47:46 +02:00
Harald Hoyer fe15c6b6cb nfs/parse-nfsroot.sh: don't unset netroot, if not nfs
(cherry picked from commit afcc697cb8)
2015-07-02 19:47:46 +02:00
Harald Hoyer 00c118a93a network: don't use "ifup -m"
"ifup -m" was thought to be used by humans in the emergency shell.
Using it programatically shows some other flaw in the execution logic.

Also, "ifup -m" was configuring the interface multiple times on "add"
and "change" uevent, because the "$netif.did-setup" test was not
executed.

(cherry picked from commit 7cca5efdce)
2015-07-02 19:47:46 +02:00
Harald Hoyer 4ec362ce0b network/dhclient-script.sh: make IPv4 DHCP lease time optionally
If bootp is used, no lease time is provided in the packet from the bootp
server.

(cherry picked from commit 0f89ec314b)
2015-07-02 19:47:46 +02:00
Harald Hoyer efe5301ab9 network/dhclient-script.sh: add RENEW/REBIND
(cherry picked from commit cf627b20d0)
2015-07-02 15:16:06 +02:00
Harald Hoyer da3dacfa5e Factor out all the "type -V" commands
Add new functions require_binaries() and require_any_binary() to be used
in the check() section of module-setup.sh.

These functions print a warning line telling the user, which binary is
missing for the specific dracut module.

This unifies the way of checking for binaries and makes the life of an
initramfs creator easier, if he wants to find out why a specific dracut
module is not included in the initramfs.

(cherry picked from commit 30e6e809ed)
2015-07-02 15:16:06 +02:00
Harald Hoyer e2b5b450e7 dracut-lib.sh:info() output info to stderr
otherwise it might collide with stdout redirection

(cherry picked from commit 57fb6e67de)
2015-07-02 15:16:06 +02:00
Harald Hoyer bd98c4def1 crypt: add drbg kernel module 2015-07-02 15:16:06 +02:00
Harald Hoyer 90b5b48734 dracut.sh: add devices with x-initrd.mount in /etc/fstab to host_devs
otherwise dracut might not even be able to mount those.

(cherry picked from commit 916559e073)
2015-07-02 15:16:06 +02:00
Harald Hoyer 1ad2884d82 dracut-pre-pivot: call udevadm settle one last time
Some Hardware needs initialization and killing modprobe or modprobe
scripts would harm the process.
2015-06-16 13:58:05 +02:00
Harald Hoyer e863891c15 network/net-lib.sh:iface_has_link() wait 5s for the carrier to appear
https://bugzilla.redhat.com/show_bug.cgi?id=1088808
2015-05-07 14:47:58 +02:00
Harald Hoyer 10e5b14705 network:dhcp:wait_for_ipv6_dad() in PREINIT6 2015-05-07 14:42:49 +02:00
Harald Hoyer a503d1dda9 rearrange fips module ordering due to zlib
[    1.220106] alg: pcomp: Failed to load transform for zlib: -2
[    1.221346] alg: pcomp: Failed to load transform for zlib: -2
2015-05-07 14:29:22 +02:00
Harald Hoyer 8f1febc874 fips: add some s390 kernel modules
(cherry picked from commit 822a7ae504)
2015-05-05 18:16:47 +02:00
Harald Hoyer cf3098064c dracut.sh: add $tmpfilesdir to install files to /usr/lib/tmpfiles.d
(cherry picked from commit 3a04bddeed)
2015-04-02 16:13:24 +02:00
Harald Hoyer 9eb6db5b9a do not symlink /var/log to /run/log
some programs e.g. systemd-journald expect a directory in /var/log as
the marker to do some actions. Here journald tries to flush
/run/log/journal to /var/log/journal, if the directory is seen.

/var/log is now a symlink to /run/initramfs/log.

(cherry picked from commit 99d4fd6bb7)
2015-04-02 16:11:31 +02:00
Harald Hoyer 3f7d943141 network: do not destroy the team interface on teamd shutdown
when doing switch-root teamd gets killed, which tears down the team
interface, if teamd is not started with "-N".

(cherry picked from commit 2a12e97475)
2015-02-19 12:33:33 +01:00
Harald Hoyer f2558ddcc1 fips: add drbg kernel module
(cherry picked from commit 7e9341434f)
2015-02-19 11:05:59 +01:00
Harald Hoyer b9372137fd network:ifup source team info if present 2015-01-21 13:39:28 +01:00
Harald Hoyer 4f992675ae network/net-lib.sh:parse_iscsi_root(): fix c&p bug
fix iscsi_target_name for eui.* and naa.* target names

(cherry picked from commit 7cddd7b838)
2015-01-15 10:37:56 +01:00
Harald Hoyer 6914b67545 dracut: fixed module dependency handling
Fail for "--modules" and "--force-add" dracut modules, if they or their
dependencies cannot be included.

(cherry picked from commit ab2f95e45e)
2015-01-14 11:46:39 +01:00
Harald Hoyer 4c88c2859e network: enhance team support
Install ifcfg-* files with team configuration in the initramfs.

Improve the slave configuration of the team interface, by looking up
ifcfg files in the initramfs.

Create a default loadbalance team config, if none present in the
initramfs.
2015-01-14 11:41:21 +01:00
Harald Hoyer c984ddda6a test: add "fs-lib" to dracut module list
(cherry picked from commit eda73c0ad2)
2015-01-14 11:41:21 +01:00
Harald Hoyer 368f08cb7e network: add support for comma separated autoconf options
ip=eth0:auto6,dhcp

might work now
2015-01-14 11:41:21 +01:00
Harald Hoyer 7bbee6ac49 systemd: add 90-vconsole.rules
run systemd-vconsole-setup if fbcon device shows up

(cherry picked from commit 027565d023)
2015-01-13 15:10:35 +01:00
Minfei Huang 0b7fad2837 40network: Fix the syntax to correct the judgment sentence
In the judgment sentence, it will print the following warning message,
becasuse of lacking the blank on the left of ']'.

/lib/net-lib.sh: line 110: [: missing `]'

Signed-off-by: Minfei Huang <mhuang@redhat.com>
(cherry picked from commit c440d302f1)
2015-01-13 12:49:32 +01:00
Harald Hoyer b96ce4a6fd cms/cms-write-ifcfg.sh: turn SUBCHANNELS into lowercase
(cherry picked from commit 3ae03005b8)
2015-01-13 12:48:23 +01:00
Harald Hoyer 509a3b2c33 ssh-client: s/key/$key
GlobalKnownHostsFile was not installed, because key was not $key

Thanks Jan Stodola!

(cherry picked from commit 4ba44e899c)
2015-01-12 14:22:41 +01:00
Harald Hoyer 20700e3dea net-lib.sh:parse_iscsi_root() fix target parsing
For targets with colons in the iSCSI target name:
  "iqn.2000-09.com.foo:storage-system.e2000:00000001cm1p1"

the parser was confused with the optional iscsi_iface_name and
iscsi_netdev_name.

This patch reintroduces the old IQN, EUI and NAA parsing and enhances
the fallback parser by checking the LUN for a numerical value.

(cherry picked from commit 36e8ce4fb0)
2015-01-12 14:11:23 +01:00
Harald Hoyer 8964abbd40 fips: remove c&p "and"
(cherry picked from commit 4089949033)
2015-01-09 14:55:32 +01:00
Harald Hoyer eeb68f0a16 fips: add libfreeblpriv3.so and libfreeblpriv3.chk
(cherry picked from commit 3659d64df3)
2014-11-28 15:42:56 +01:00
Harald Hoyer c4c24171bf ifcfg/write-ifcfg: only write DEVICE for non-kernel names
Rename an interface to the kernel namespace is not allowed, so don't add
DEVICE="<iface>", if HWADDR is given.

(cherry picked from commit 3947f07d93)
2014-10-29 14:07:39 +01:00
Harald Hoyer 0630273048 network/net-lib.sh:is_persistent_ethernet_name() eth* is not
eth* is _not_ a persistent ethernet name... tsk, tsk, tsk

(cherry picked from commit 05065741f0)
2014-10-23 14:38:25 +02:00
Will Woods aa5313ca0e do 'ip route replace default' instead of 'add'
When you define the gateway for an interface, dracut sets it up with:

  ip route add default via $gw dev $netif

If a default route is already set (e.g. if you have multiple NICs), this
will fail with the message "RTNETLINK answers: File exists".

So, if your first NIC isn't usable as a default route

Using "ip route replace default" instead allows ifup/dhclient-script to
correctly change the default route to the new interface.
2014-09-12 10:22:13 +02:00
Harald Hoyer 815ab93fe9 dracut-functions.sh: exit for missing --force-add or --add dracut modules
Better exit with fail early, so there is no surprise on reboot.

(cherry picked from commit a49cac2e65)
2014-09-12 10:20:45 +02:00
Harald Hoyer c5c57f3f19 qemu: install virtio_console kernel module
https://bugzilla.redhat.com/show_bug.cgi?id=1097999
(cherry picked from commit 5058ae2d29)
2014-09-12 10:04:30 +02:00
Harald Hoyer b44b3ed036 cms/cmssetup.sh: understand DASD="none"
Treat DASD="none" as unset.

https://bugzilla.redhat.com/show_bug.cgi?id=1096979
(cherry picked from commit 2f954621cc)
2014-09-12 10:00:23 +02:00
Harald Hoyer 49a23aa426 cms/cmssetup.sh: fixed indention
(cherry picked from commit d681635512)
2014-09-12 10:00:19 +02:00
Harald Hoyer efaa5b05df ifcfg/write-ifcfg.sh: bind bond and bridge interfaces to HW
either by s390 SUBCHANNELS or HWADDR, if the interface name is not
persistent.

Previously, this was bound unconditionally with HWADDR.

(cherry picked from commit 80043e21c1)
2014-09-12 09:53:20 +02:00
Alex Harpin 4fa660ba8f bridging: update the ifcfg files generated for bridge slaves
Update the ifcfg files generated for bridge slaves so they reference
the bridge they are part of.  Related to early patch submitted as a
fix for Bug #1123552.

Bug #1123552 https://bugzilla.redhat.com/show_bug.cgi?id=1123552

(cherry picked from commit 32125a976b)
2014-09-12 09:53:13 +02:00
Harald Hoyer 19bb8937ed fixed bridge setup
renamed "ethnames" in bridge.info to "bridgeslaves"

fixed ifcfg generation

(cherry picked from commit 2db6d71118)
2014-09-12 09:53:04 +02:00
Brian C. Lane 17c1f640fa Support spaces in mount_nfs (#1109933)
nfs paths may contain spaces, make sure they are preserved when passed
to nfs_to_var and mount.

Related: rhbz#1109933
(cherry picked from commit 7e692cfd43)
2014-09-10 11:09:07 +02:00
Harald Hoyer e03b09212a replaced ip=auto with ip=dhcp in the documentation
https://bugzilla.redhat.com/show_bug.cgi?id=1086931
2014-09-09 13:35:13 +02:00
Harald Hoyer f86fa29cda network/net-lib.sh:parse_iscsi_root() do not enforce target name
https://bugzilla.redhat.com/show_bug.cgi?id=1078867

cherry-picked from 29763cb72d
2014-09-09 13:33:16 +02:00
Hari Bathini f2c5c5c961 Dracut: Add a new argument "--rebuild"
Add "rebuild" option to dracut to  append the current  arguments
to those with  which the input initramfs image was  built.  This
option helps in incrementally building initramfs for testing.

    Usage: dracut [output_file] --rebuild input_file

If optional output file  is not provided, input file provided to
rebuild will be used as output file.

This patch alters  the creation of the initramfs image by adding
the file "/tmp/params.txt" to the image. Command line parameters
excluding "--rebuild",  input  &  output image names and "kernel
version" are stored in this file.  In case "--rebuild" parameter
is specified, "/tmp/params.txt" file, if present in input image,
is read and its contents "prepend"ed to the current command line
parameters, that is if such a file is already present. Also,  it
stores the  cumulative parameters to the file "/tmp/params.txt",
in the  new image. This patch  has been tested successfully on a
PowerBox with f19. It does not alter the behaviour of any of the
existing  options.

Signed-off-by: Manik Bajpai <manibajp@linux.vnet.ibm.com>
Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>

[Edited-by: Harald Hoyer]
Simplified the cpio extraction process by using 'lsinitrd'.

(cherry picked from commit 659dc319d9)
2014-09-04 12:57:43 +02:00
Hannes Reinecke 81a6e87f0f Make logfile configurable
Add '--logfile' option to make the log file configurable during
runtime.

Signed-off-by: Hannes Reinecke <hare@suse.de>
(cherry picked from commit ee54b8404c)
2014-09-04 12:47:36 +02:00
Harald Hoyer 52923f5f2a dracut-functions.sh: do not force require modules.builtin*
(cherry picked from commit b29cb51654)
2014-09-04 12:47:31 +02:00
Harald Hoyer c46be83492 dracut.sh: no need to make subdirs in run
(cherry picked from commit 8d89fc6bb1)
2014-09-04 12:47:27 +02:00
Harald Hoyer c2ce987e38 dracut.sh: also mkdir /run/lock, which is copied to
(cherry picked from commit 68b736b50f)
2014-09-04 12:47:23 +02:00
Hari Bathini 564c0c4577 lsinird: Adding option "-m|--mod" to list dracut modules in the image
This patch adds option "-m|--mod" to lsinitrd to list dracut
modules in the image  because sometimes  having an option to
only list the dracut modules in the image could be handy.

Sample output:
--------------

[hbathini@localhost dracut]$ sudo ./lsinitrd.sh initramfs-3.11.10-100.fc18.x86_64.img -m
Image: initramfs-3.11.10-100.fc18.x86_64.img: 33M
========================================================================
Version: dracut-029-1.fc18.2

dracut modules:
i18n
network
ifcfg
drm
plymouth
btrfs
crypt
dm
dmraid
kernel-modules
lvm
mdraid
cifs
iscsi
nfs
resume
rootfs-block
terminfo
udev-rules
biosdevname
systemd
usrmount
base
fs-lib
shutdown
========================================================================

Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
(cherry picked from commit 05d2a14526)
2014-09-04 12:26:35 +02:00