When including a directory, the files were considered in the directory
name which lead to messages like :
cp: failed to access '/var/tmp/initramfs.L9s2zO///init-func': No such file or directory
This patch does make the destdir more explicit and copy files into the
destination directory instead of destdir/filename/
95rootfs-block would not terminate the commandline parameter with
a space or newline, instead it'll rely on the main routine from
dracut.sh to do this.
Which will cause unexpected problems for any modules called
after this.
So terminate the commandline parameters correctly here and remove
the newline from dracut.sh.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
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.
Signed-off-by: Thomas Renninger <trenn@suse.de>
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>
When generating the initramfs we should be printing out the
generated dracut commandline used for booting.
This will simplify debugging.
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
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.
/var/log is now a symlink to /run/initramfs/log.
loginstall specifies a directory, in which dracut-install records all
files, which were installed from the host system to the initramfs.
Use case is e.g. to create a list of packages to watch for updates, to
maybe trigger a recreation of the initramfs.
Which will not only add listed drivers, but also enforce that they are
tried to be loaded at early boot time.
This is needed if drivers which are not autoloaded (e.g. loop and a lot
others) shall get loaded via initramfs.
Otherwise dracut-logger.sh outputs an empty version on journal testing.
Aug 20 10:15:49 lenovo dracut[11144]: dracut-
Aug 20 10:15:49 lenovo dracut[11148]: Executing: /sbin/dracut
With the same source of files, it should be possible to generate the
same image file with every dracut run.
To accomplish this, we modify the timestamps of the files we generate at
runtime, call gzip with "-n" and cpio with "--reproducible".
The cpio --reproducible option is not yet upstream though, so if you
feel like it should be then please nag at the cpio mailing list.
http://lists.gnu.org/archive/html/bug-cpio/2014-08/msg00000.html
DRACUT_PATH can now be used to specify the PATH used by dracut
to search for binaries instead of the default
/usr/sbin:/sbin:/usr/bin:/bin
This should be set in the distribution config file
/usr/lib/dracut/dracut.conf.d/01-dist.conf
It's useful for passing a full fstab line including like fs_passno so fsck
can take effect.
Previously it's assumed that there's no fs_freq and fs_passno in fstab lines
so original code just append "0 0" at the end of each fstab lines.
Improve this issue by assign default value in case they are not passed in.
Three field are handled here:
fs_mntops: default to "defaults"
fs_freq: default to "0"
fs_passno: default to "2"
Signed-off-by: Dave Young <dyoung@redhat.com>
--hostonly-cmdline:
Store kernel command line arguments needed in the initramfs
--no-hostonly-cmdline:
Do not store kernel command line arguments needed in the initramfs
This caused the root_dev variable not to be set which in turn meant that
the root device was not whitelisted in 99base/module-setup.sh when injecting
compile-time devexists hooks in hostonly initrds. This ties the generated
initrd to the root fs device (typically the UUID) rather than relying solely
only the root= kernel command line.
While it is hostonly, not hardcoding e.g. UUIDs is still desirable. Any
swap partition on the host device is still added however.
If the root user generates the initramfs image, preserve the ownership
of the files. This of course cannot be done for non-root users
generating an initramfs image.
Add "rebuild" option to dracut to append the current arguments
to those with which the input initramfs image was built. This
option helps in incrementally building initramfs for testing.
Usage: dracut [output_file] --rebuild input_file
If optional output file is not provided, input file provided to
rebuild will be used as output file.
This patch alters the creation of the initramfs image by adding
the file "/tmp/params.txt" to the image. Command line parameters
excluding "--rebuild", input & output image names and "kernel
version" are stored in this file. In case "--rebuild" parameter
is specified, "/tmp/params.txt" file, if present in input image,
is read and its contents "prepend"ed to the current command line
parameters, that is if such a file is already present. Also, it
stores the cumulative parameters to the file "/tmp/params.txt",
in the new image. This patch has been tested successfully on a
PowerBox with f19. It does not alter the behaviour of any of the
existing options.
Signed-off-by: Manik Bajpai <manibajp@linux.vnet.ibm.com>
Signed-off-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
[Edited-by: Harald Hoyer]
Simplified the cpio extraction process by using 'lsinitrd'.
This removes the dependency on 'getconf' as well, which is not installed by default on my embedded systems.
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
dracut-install could not handle output like:
/lib/$LIB/liblsp.so => /lib/lib64/liblsp.so (0x00007faf00727000)
also unset LD_PRELOAD, so we get a clean environment