Thomas Renninger [Thu, 11 Dec 2014 14:46:20 +0000 (15:46 +0100)]
dracut: Do not stop installing drivers if one fails
--add-drivers and --filesystems kernel drivers are added via:
instmods -c
The check option makes the function return if one driver could not get
installed without trying to install further drivers which is bad.
The user is still informed ($_silent is by default no), but all modules
passed to instmods are tried to be loaded, even if one fails.
Thomas Renninger [Thu, 11 Dec 2014 14:46:16 +0000 (15:46 +0100)]
dracut.sh: Fix UUID= fstab parsing in case --mount option is passed
Dracut parses /etc/fstab when --mount is option is passed (e.g. kdump).
In host_devs variable the real block device must be stored, not UUID=
There are other /etc/fstab syntax possibilities we now warn that they
are not correctly parsed. This will be fixed by another patch
when there is time to test this properly.
jloeser [Thu, 11 Dec 2014 14:46:14 +0000 (15:46 +0100)]
Check for logfile (--logfile option) and create it if necessary
If a logfile is passed to dracut via --logfile option and doesn't
exist, dracut doesn't create it and logs nothing. Instead, dracut
should try to touch the file and print a warning if creating fails.
References: bnc#892191 Signed-off-by: Thomas Renninger <trenn@suse.de>
Hannes Reinecke [Thu, 11 Dec 2014 14:46:11 +0000 (15:46 +0100)]
Handle module alias properly
Some modules (like ext4) provide aliases by which the modules
can be accessed, too. But when using aliases directly dracut
fails to include the correct module. So translate the alias
into the correct module name before checking the module.
References: bnc#886839
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Thomas Renninger <trenn@suse.de>
Hannes Reinecke [Thu, 11 Dec 2014 14:46:10 +0000 (15:46 +0100)]
99base: warn on invalid command for initqueue
When 'initqueue' is called with an invalid command it'll generate
invalid job scripts. This will lead to confusing error messages
later on.
So abort in these cases and print out a warning.
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Thomas Renninger <trenn@suse.de>
Hannes Reinecke [Thu, 11 Dec 2014 14:46:06 +0000 (15:46 +0100)]
Do not call 'lvm' for non-LVM device-mapper devices
If a device-mapper device is not created by LVM it's pointless
to call any 'lvm' programs got extract details; they'll be
failing anyway. So check the UUID before calling 'lvm'.
This speeds up initrd creation and avoids I/O errors on
multipath devices.
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Thomas Renninger <trenn@suse.de>
Hannes Reinecke [Thu, 11 Dec 2014 14:46:05 +0000 (15:46 +0100)]
Implement 'rd.timeout' to modify the device timeout
When generating units for devices the administrator might
want to use a different timeout than the default.
So implement a new parameter 'rd.timeout' for this.
References: bnc#878770
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Thomas Renninger <trenn@suse.de>
Thomas Renninger [Thu, 11 Dec 2014 14:46:04 +0000 (15:46 +0100)]
iscsi: iscsi.initiator and others can and must only show up once
Make sure duplicates of iscsi.initiator vanish.
Only get one rd.iscsi.* paramter value. If getargs is used and several
parameters are parsed, one gets two values separated by whitespace in a
variable which breaks later code and is not suppported.
Hannes Reinecke [Thu, 11 Dec 2014 14:46:01 +0000 (15:46 +0100)]
95iscsi: Fixup bnx2i offload booting
bnx2i is using a separate iSCSI offload engine with a separate
MAC address. As a result, the iBFT information is displaying
a MAC address which does not relate to any MAC address from
the network interfaces.
In addition, the iSCSI offload engine works independently on
the NIC, so we do not need to enable the NIC for iSCSI offload
to work.
This patch modifies the automatic iBFT detection to not set
the 'ip=ibft' flag when bnx2i offload is detected.
References: bnc#855747
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Thomas Renninger <trenn@suse.de>
However this appraoch is slightly different:
"$netroot" instead of "'$netroot'", etc.
initqueue will process the arguments, assuming the first non-option
argument to be the program to be executed. Putting the entire
commandline into this argument confuses both, initqueue and the
program in question.
References: bnc#879038
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Thomas Renninger <trenn@suse.de>
Hannes Reinecke [Thu, 11 Dec 2014 14:45:57 +0000 (15:45 +0100)]
95iscsi: Autodetect iSCSI firmware
Some iSCSI initiator present firmware information in
/sys/firmware/ibft or /sys/firmware/iscsi_bootX
Whenever we detect one of those directories we should assume
that the iSCSI devices should be activated.
Also incorporates SUSE patches:
0049:
95iscsi: Use 'ip=ibft' for ibft autoconfiguration
For iBFT autoconfiguration we should be setting 'ip=ibft'
instead of rd.neednet. This should instruct dracut to only
enable the iBFT interfaces and leave the rest alone.
References: bnc#879038
0054:
95iscsi: update commandline printing
dracut has a separate callout 'cmdline' which should be used
for printing out the generated commandline.
Signed-off-by: Pavel Wieczorkiewicz <pwieczorkiewicz@suse.com> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Thomas Renninger <trenn@suse.de>
Hannes Reinecke [Thu, 11 Dec 2014 14:45:55 +0000 (15:45 +0100)]
95udev-rules: Include correct sg3_utils rules
sg3_utils now provides two rules 55-scsi-sg3_id.rules and
58-scsi-sg3_symlink.rules, which need to be included instead
of the older 59-scsi-sg3_utils.rules.
References: bnc#873151
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Thomas Renninger <trenn@suse.de>
Thomas Renninger [Thu, 11 Dec 2014 14:45:52 +0000 (15:45 +0100)]
mkinitrd-suse: Update to sles12 SUSE state
Incorporates these patches:
- 0013 mkinitrd-suse: do not update bootloader if no kernel was found
bnc#858268
- 0018 mkinitrd-suse: Fix whitespaces when adding drivers
- 0032 mkinitrd-suse.sh: Use '--hostonly' and '--hostonly-cmdline' correctly
bnc#874000,bnc#874905,bnc#874363
- 0039 Remove --force parameter from mkinitrd
- 0041 mkinitd-suse: remove --hostonly and --hostonly-cmdline
Should be set via configuration files, not in the script itself.
- 0051 mkinitrd-suse: add 'update bootloader' message
- 0120 mkinitrd-suse.sh: Bail out with exit 1 if initrd cannot be generated
bnc#886630
Harald Hoyer [Mon, 1 Dec 2014 11:36:20 +0000 (12:36 +0100)]
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.
Harald Hoyer [Tue, 25 Nov 2014 12:44:54 +0000 (13:44 +0100)]
dmsquash-live: do not abort, if user pressed ESC on checkisomd5
If the user pressed ESC while checkisomd5 runs the media check, it will
exit with "2". Previously that would mean, that the media check was not
successful.
Hannes Reinecke [Thu, 20 Nov 2014 14:56:45 +0000 (15:56 +0100)]
90multipath: install dracut-specific service file
The multipathd package might install a service and a socket
file. Using the original service file from the installed
system without the socket file triggers a bug in systemd,
causing systemd to crash.
As we don't actually need to socket file in the initrd we
should be installing our own service file which does not
reference the socket file at all.
References: bnc#871610
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Thomas Renninger <trenn@suse.de>
Colin Guthrie [Mon, 10 Nov 2014 14:17:39 +0000 (14:17 +0000)]
base: Set udevd log level via environment var to cover early startup.
udevd will these days default to 'info' logging and thus will
often print out the 'starting version nnn' message (which is
logged at level 'info'), thus spamming the console, even on
'quiet' boots.
We generally expect a udev log level of err (the old default
from pre-October 2013) so we should set that explicilty before
launching udevd in order to suppress the spurious 'info' message.
As we are using the environment variable approach anyway, we
may as well use this method rather than setting the log level
later via udevadm control commands when rd.udev.info/debug are
given on the kernel command line.
The enviroment variable has been around since udev 6b493a20e1
around 2005 so should be safe to use in all cases without version
checks.
Vaughan Cao [Thu, 9 Oct 2014 08:41:31 +0000 (16:41 +0800)]
Add hyperv-keyboard kernel module for Hyper-V Gen2 VM
The synthetic keyboard of a Gen2 Linux VM doesn't work before the
hyperv_keyboard module is loaded. Without it, we can't cancel the media check
phase if boot with rd.live.check option.
Gen1 Linux VM doesn't have the same issue because the host emulates the legacy
i8042 keyboard for Gen1 VM.
Signed-off-by: Vaughan Cao <vaughan.cao@oracle.com>
Lukas Wunner [Mon, 6 Oct 2014 11:43:58 +0000 (13:43 +0200)]
shutdown/shutdown.sh: loop over shutdown hooks until all succeed
Up until now, _check_shutdown() returns true if at least one of
the shutdown hooks succeeded. Change this to only return true if
*all* succeeded. To prevent an infinite loop, introduce an upper
bound of 40 iterations.