diff --git a/50-dracut.install b/50-dracut.install index d05abb9a..38e672f7 100755 --- a/50-dracut.install +++ b/50-dracut.install @@ -12,7 +12,7 @@ case "$COMMAND" in if [[ -f ${INITRD_IMAGE_PREGENERATED} ]]; then # we found an initrd at the same place as the kernel # use this and don't generate a new one - cp "$INITRD_IMAGE_PREGENERATED" "$BOOT_DIR_ABS/initrd" \ + cp --reflink=auto "$INITRD_IMAGE_PREGENERATED" "$BOOT_DIR_ABS/initrd" \ && chown root:root "$BOOT_DIR_ABS/initrd" \ && chmod 0600 "$BOOT_DIR_ABS/initrd" \ && exit 0 diff --git a/51-dracut-rescue-postinst.sh b/51-dracut-rescue-postinst.sh index 23158552..67f5b717 100755 --- a/51-dracut-rescue-postinst.sh +++ b/51-dracut-rescue-postinst.sh @@ -57,7 +57,7 @@ if [[ ! -f $INITRDFILE ]]; then fi if [[ ! -f $NEW_KERNEL_IMAGE ]]; then - cp "$KERNEL_IMAGE" "$NEW_KERNEL_IMAGE" + cp --reflink=auto "$KERNEL_IMAGE" "$NEW_KERNEL_IMAGE" ((ret+=$?)) fi diff --git a/51-dracut-rescue.install b/51-dracut-rescue.install index 9abd9d73..91522184 100755 --- a/51-dracut-rescue.install +++ b/51-dracut-rescue.install @@ -71,7 +71,7 @@ case "$COMMAND" in [[ -d "$BOOT_DIR_ABS" ]] || mkdir -p "$BOOT_DIR_ABS" - if ! cp "$KERNEL_IMAGE" "$BOOT_DIR_ABS"/linux; then + if ! cp --reflink=auto "$KERNEL_IMAGE" "$BOOT_DIR_ABS"/linux; then echo "Can't copy '$KERNEL_IMAGE to '$BOOT_DIR_ABS/linux'!" >&2 fi