Brian C. Lane [Tue, 8 Oct 2013 13:13:44 +0000 (15:13 +0200)]
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.
Thomas Renninger [Fri, 27 Sep 2013 18:18:59 +0000 (20:18 +0200)]
mkinitrd-dracut.sh: Also allow -d to specify the root_fs and -s dummy
-d is the SUSE mkinitrd version option to pass the rootfs.
-s is to enable splash which may not be needed, but some callers rely on it,
not to return an error.
Thomas Renninger [Fri, 27 Sep 2013 18:18:58 +0000 (20:18 +0200)]
mkinitrd-dracut.sh: Allow mkinitrd call without passing any parameters
Before this gave a "usage" error.
Now boot_dir (by default /boot) is scanned for available kernels and sane
initrd default targets get defined and the corresponding initramfs files
are generated.
Thomas Renninger [Fri, 27 Sep 2013 18:18:57 +0000 (20:18 +0200)]
mkinitrd-dracut.sh: Implement --quiet|-q option
Dracut is rather verbose. This optional parameter is to limit the output
to the essential: For each generated initrd show the kernel, target and
possibly additional options passed to dracut.
Thomas Renninger [Fri, 27 Sep 2013 18:18:55 +0000 (20:18 +0200)]
mkinitrd-dracut.sh: Introduce -i -k parameters
In SUSE, one can pass a list of kernel files via -k parameter.
For each an initrd is generated as passed via -i parameters.
Make the dracut mkinitrd wrapper compatible to those.
For now only one kernel file and initrd target can be specified.
This will get enhanced with a follow-up patch.
Peter Rajnoha [Fri, 4 Oct 2013 08:41:24 +0000 (10:41 +0200)]
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.
Thomas Renninger [Fri, 27 Sep 2013 18:10:39 +0000 (20:10 +0200)]
dracut: Implement ACPI table overriding
An example config file for this feature could be:
/etc/dracut.conf.d/03-acpi-override.conf
with this content:
acpi_override="yes"
acpi_table_dir="/etc/dracut.conf.d/acpi_tables"
Then all files ending with *.aml will be put into the early cpio
(kernel/firmware/acpi) and will be used to replace the BIOS provided tables
if the kernel supports this feature.
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Thomas Renninger <trenn@suse.de>
Thomas Renninger [Fri, 27 Sep 2013 18:10:38 +0000 (20:10 +0200)]
dracut: Do not create early_cpio if no suitable microcode exist in hostonly case
Intel microcodes only exist for very specific family/model/stepping CPUs.
If no microcode gets added, there is no need to create an empty
(only directories) cpio later that gets glued to the initrd.
This also fixes:
*** Constructing GenuineIntel.bin ****
cat: /lib/firmware/intel-ucode/06-3c-03: No such file or directory
in hostonly mode if there is no suitable microcode for the CPU.
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Thomas Renninger <trenn@suse.de>
Thomas Renninger [Fri, 27 Sep 2013 18:10:37 +0000 (20:10 +0200)]
dracut: Generlize microcode early cpio usage
ACPI early table override also may need to place files into an early cpio.
Reflect this in variable and file names.
This change is renaming only and does not introduce any real change.
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Thomas Renninger <trenn@suse.de>
Colin Walters [Wed, 11 Sep 2013 13:04:45 +0000 (09:04 -0400)]
dracut.sh: Fixup previous commit to only read /sys and /proc in hostonly mode
The gnome-ostree build system generates dracut initramfs images on the
build server, therefore not in hostonly mode. The build system at the
moment doesn't mount /sys, and the previous commit caused a hard
failure due to lack of /sys/devices.
Because we only want /sys/devices in hostonly mode, just move those
bits inside the hostonly conditional above.
WANG Chao [Wed, 4 Sep 2013 16:10:37 +0000 (00:10 +0800)]
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.
WANG Chao [Tue, 3 Sep 2013 17:29:58 +0000 (01:29 +0800)]
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.
Harald Hoyer [Fri, 16 Aug 2013 09:52:07 +0000 (11:52 +0200)]
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"
WANG Chao [Mon, 12 Aug 2013 08:43:52 +0000 (16:43 +0800)]
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.