If the directory where the .img file is saved has no enough space, or in
other wrong conditions, dracut will get an incomplete file xxx.img. But
sometimes this .img file will be loaded when rebooting the system. And then
some bugs will happen because this .img file is wrong.
So I think dracut should remove the incomplete file because this .img file
with problems was made by dracut. And then the wrong file will not be loaded
anymore.
Signed-off-by: Chao Fan <cfan@redhat.com>
openSUSE has things stored in different places, so fixup the
paths here.
Signed-off-by: Christian Rodrigues <crrodriguez@opensuse.org>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Thomas Renninger <trenn@suse.de>
There is a bug that kdump-initrd contains entry requesting nfs dump
filesystem to get filesystemchecked. And there is an erro message said
that nfs need be checked. But there's no fsck for nfs utility, e.g
fsck.nfs like other file system. Whatever fs_passno 0 or 2 are passed,
no fsck is executed at all for nfs mount.But in dracut, set it to be 2
always, so the erro message appear and it should be set to 0.
In the fstab,the sixth variable fs_passno stands for that the device need
checked or not,and dracut set it to "2".To fix this issue, it should
be "0" when the device is nfs.The third variable stands for the type of
the filesystem and we can use it to judge whether the device is nfs.
So when the third variable of fstab contains "nfs", the sixth variable
fs_passno should be set to "0".
Signed-off-by: Chao Fan <cfan@redhat.com>
The only reason we add swap devices to host-only mode (added in
dd5875499e) is to allow us to process
resume= arguments passed on the kernel command line when the swap
partition lives on something slightly more complex than a normal
partion (e.g. in an LVM or RAID setup).
By adding the device to host_devs, the necessary LVM and RAID hooks
are added and thus the underlying storage will be initialised OK, and
the 95resume module handles the waiting for the device (via udev rules
creating the /dev/resume symlink).
So ultimately, we do not need to hard-code the waiting for the swap
devices into the initramfs at build time as the waiting part can be
dynamic.
This makes things more resiliant to swap partitions disappearing and
being reformatted etc.
Inspired by a patch by Martin Whitaker on Mageia bug:
https://bugs.mageia.org/show_bug.cgi?id=12305
With an EFI stub, the kernel, the initramfs and a kernel cmdline can be
glued together to a single UEFI executable, which can be booted by a
UEFI BIOS.
When reading the --include part of the script, we had the following
issues to make the code easy to read:
- src & tgt were extract for the original options
- i variable was a file or a directory from src
- s variable was the directory name in case $i was a directory
"s" sounds very close to "src" while "s" is on the "tgt" side. Very
confusing.
"s" was defined before the "if it's a directory" statement while it's
only used inside the "if".
"i" was commit from the "src" but wasn't really explicit.
Having some lines mixing "i" and "s" takes a little time to get read
properly.
This patch offer the following changes:
- "i" is renamed to "objectname" as we don't know if its a file or a
directory
- "s" is renamed to "object_destdir" as the object name becomes a
directory on the destdir
- "object_destdir" (former "s") is moved inside the "if" statement as it's
only used here
- tgt is finally renamed to "target" to be more explicit. We are not all
native english ;o)
My 2 (semantic) cents,
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>