An exception is multipath devices, child and top layer device may have
same uuid. As dm devices maintain /dev/mapper/* as persistent names,
just do not doing converting for them.
No automatic assembly is done anymore by default. You will have to
specify exactly what devices to assemble
("rd.md.uuid=" "rd.luks.uuid" ...)
or use "rd.auto=1" or "rd.auto" on the kernel command line.
For big servers with thousands of disks we don't want to assemble
everything by default (error prone, slow).
"inst busybox" no longer seems to work when busybox is at
/sbin/busybox. Reproduced on Fedora 18 (dracut-023-39.git20120910).
Use type -P to find the full path to busybox to solve this problem.
For devices with filesystem, udev /dev/disk/by-uuid/* links are always
reliable. So improve the get_persistent_dev() by using by-uuid/* firstly,
and fallback to use by-id/*
Signed-off-by: Dave Young <dyoung@redhat.com>
ismounted handles both find-by-dev and find-by-mnt, but there's two issues:
1. for find-by-dev, it use readlink to get the canonical dev name, but
lvm is different with other devices, the canonical name for lvm devices
are symlinks like /dev/mapper/vg-lv00
2. for nfs mounting, just use [ -b $dev ] is not enough, it need being handled
seperately.
Per Karel Zak's suggestion, findmnt util is suitable for this purpose, it
handles these cases well, so just use findmnt instead of implement all the
logic by ourselves. Thanks, Karel.
Signed-off-by: Dave Young <dyoung@redhat.com>
kdump module also need to convert dev name to udev symlinks.
So better to move function get_persistent_dev() to dracut-functions.sh
Also in this patch improvement and fix the original function:
a) use udevadm info --query=name to get the kernel name.
This will fix the issue caused by passing symbolic link of a device.
b) fix a bug to compare $_tmp instead of $i with $_dev. Really sorry,
should have tested more carefully.
Signed-off-by: Dave Young <dyoung@redhat.com>
/run will get mounted at $NEWROOT/run after switch_root, but it's not
there yet. bind-mount it in place so updates for /run actually land in
/run.
(also: remove a redundant check for existing directories. mkdir -p
doesn't do anything if the directory already exists.)
When emergency_shell() happens, it does 'setsid --help' to figure out if
the setsid binary supports the '-c' flag (to set the controlling tty).
This output shows up in the logs (and on-screen if you're using
rd.debug), which keeps confusing people looking for other problems.
Using "case" instead of "strstr" lets us avoid this.
It looks like ip=ibft has been busted since
25aa3c5 network: refactor stuff from netroot/parse-ip-opts to net-lib
which moved ibft parsing code out to the ibft_to_cmdline function.
The use of ifname_mac was partially replaced by a local mac, but not
completely, causing ibft_to_cmdline to abort without generating network
configuration options.
Signed-off-by: Chris Leech <cleech@redhat.com>
Name based connects fail because of the quotes around the $nbdport.
For name based connects, the -N option also gets included. For
instance nbd-client 192.168.0.1 '-N ltsp' /dev/nbd0.
I believe the quotes are not necessary for actual port numbers.
Currently anaconda provides rd.md=0 on kernel's command line as a boot
time optimization if root is not on md device. But this leads to kdump
failure. We copy the command line from first kernel and if dump target
is on md device, it fails as we never try to assemble md devices as
rd.md=0.
We have already set rd.md.uuid though in /etc/cmdlind.d/ dir providing
dracut the info about what md devices to assemble. So this patch overrides
rd.md settings if rd.md.uuid is provided.
This is a stop gap measure to get kdump working on software raid
devices. Harald seems to have bigger cleanup plans for rd.md. Once
that happens, this patch will not be needed and things should
automatically be fixed.
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
for_each_host_dev_and_slaves currently is used in some module check()
functions and it's not necessary iterate all slaves. So use
check_block_and_slaves instead of check_block_and_slaves_all is fine.
Signed-off-by: Dave Young <dyoung@redhat.com>
splitsep() would drop escapes from its inputs. For example:
splitsep ':' 'first:middle:\e\s\c\a\p\e\d' a b c
gave a='first', b='middle', c='escaped'. Even worse:
splitsep ':' '\e\s\c\a\p\e\d:middle:last' a b c
gave a='escaped', b='escaped', c='escaped:middle:last'.
This fixes the quoting so both calls return the values you'd expect
(e.g. 'first', 'middle', '\e\s\c\a\p\e\d').
To properly perform verification in FIPS mode,
we need to install fipscheck and libssl explicitly.
(cryptsetup seems to be the first user of this verification in ramdisk...)
Signed-off-by: Milan Broz <mbroz@redhat.com>
In recent Fedora distro are all hmac files located in /lib
(to avoid multiarch conflict).
When installing hmac file, also install files from these locations.
Signed-off-by: Milan Broz <mbroz@redhat.com>