/bin/mountpoint was copied to the initramfs only when --multipath
is enabled. Now, I'm not sure why we need the full blown mountpoint
when there is busybox mountpoint which exposes the same cmdline
interface. Furthermore, bb mountpoint can be used to determine if
a filesystem is already mounted.
genkernel's initramfs image is built incrementally by appending to the
cpio file. The introduction of copy_binaries resulted in copying
libraries from the host system, which causes the cpio to include certain
libraries multiple times whenever different stages depended upon the
same library. We address this by extracting the cpio to a temporary
directory and then compressing it again to "finalize" it. The extraction
eliminates the duplicate files.
This makes generated initramfs images slightly smaller and in theory,
should make the initramfs load slightly faster.
Signed-off-by: Richard Yao <ryao@gentoo.org>
Conflicts:
gen_initramfs.sh
zpool.cache and zdev.conf are optional files, so instead of warning when
they are missing, we print a message when they are copied.
Signed-off-by: Richard Yao <ryao@gentoo.org>
Users were seeing the following error message printed:
cp: cannot stat ‘/etc/zfs/zdev.conf’: No such file or directory
Both zdev.conf and zpool.cache are optional files. We print a warning
when they are absent, but cp printed its own error in addition to our
warning. We suppress that.
Signed-off-by: Richard Yao <ryao@gentoo.org>
Some executables (namely: udevadm) may link against libraries in
non-standard paths. For this reason, and as dracut does, we must
copy /etc/ld.so.conf{.d/*,} over and generate a custom ld.so.cache
file.
Our modprobe is an ancient heritage from the past, probably dating to
a time where busybox's modprobe features were limited. There is no reason
at all to keep using our own version instead of the busybox one.
This commit also makes modules_scan 15% faster.
On some system the output from the new lddtree does not match with what
genkernel expects, however lddtree have insted gained a new option that
essentially gives what we want with less code.
Signed-off-by: Peter Hjalmarsson <xake@rymdraket.net>
Whenever /etc/zfs/{zdev.conf,zpool.cache} was missing, we would fail.
zpool.cache is not generated during cross compilation, which causes a
failure in Catalyst when building LiveCDs. Users that do not follow a
strict set of installation instructions can also suffer failures as a
consequence of this.
zpool.cache includes information about known pools that enables ZFS to
detect situations where an entire pool disappears. It is also required
to do pool import in corner cases, such as those those involving
file-based pools, and has the beneficial effect of reducing pool import
times. Unconditional omission of zpool.cache in general is not an
option, but for the situations identified, it is okay to convert the
failure into a warning, which is what we do.
Reported-by: Rick Farina <zero_chaos@gentoo.org>
Reported-by: Alexander Zubkov <green@msu.ru>
Signed-off-by: Richard Yao <ryao@gentoo.org>
Somewhere in the mists of time we lost part of the multipath patch, so
we were bundling the userspace, but not the kernel modules, or ever
using it.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>