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>
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).
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.
As described in https://bugzilla.redhat.com/show_bug.cgi?id=541410#c2,
if you want NetworkManager to take over an interface that you're using
for NFS root (or other network root device), you need to:
a) set UUID=<uuid> in ifcfg-<iface>, and
b) save the lease file as /var/lib/dhclient-<uuid>-<iface>.lease
This patch should make write-ifcfg handle both these things.
Given that we boot into a modern Linux distribution with the "/run" toplevel
directory, we can easily mount move the whole /run directory to the real
root in the end and have the complete initramfs later on in
/run/initramfs. All log files and /run states are still accessible and
to save space /run/initramfs can be removed later on.
Because the kernel does not mount a tmpfs on /run prior to unpacking the
initramfs cpio image, we have to copy ourselves very early to a tmpfs
and mount it on /run.
Due to lazy umount the old initramfs binaries should
be removed in the end by switch_root.
This feature can be turned on with "--prefix".
We want all "/var/run" information to live in /dev/.run, until the real
root is mounted.
Therefore we mount a tmpfs on /dev/.run, which can/will be bind/move mounted
on /var/run later on.
Format:
bond=<bondname>[:<bondslaves>:[:<options>]]
bondslaves is a comma-separated list of physical (ethernet) interfaces.
options is a comma-separated list on bonding options (modinfo bonding for
details) in format compatible with initscripts.
If options include multi-valued arp_ip_target option, then its values
should be separated by semicolon.
bond without parameters assumes bond=bond0:eth0,eth1:balance-rr