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.
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
The find_kernel_modules_by_path function shouldn't filter out modules not
located underneath the /lib/modules/ver/kernel directory as out-of-tree
drivers may reside in /lib/modules/ver/extra and updated drivers in
/lib/modules/ver/updates.
Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com>
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
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>
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>
This also changes the command line switch to be --add-device and the
config directive is set to add_device. This was chosen as device= in the
config file seems too generic and not quite as consistent with other
directives (i.e. drivers/add_drivers)
The --device command line is still supported but it should be considered
deprecated in favour of --add-device.
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>
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>
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>
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>