Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lz4 legacy format (Linux kernel compression) #1235

Merged
merged 2 commits into from
Mar 16, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions usr/share/rear/pack/GNU/Linux/900_create_initramfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ pushd "$ROOTFS_DIR" >/dev/null
start_seconds=$( date +%s )
case "$REAR_INITRD_COMPRESSION" in
(lz4)
# Create initrd.lz4 with lz4 default -1 compression (fast speed but less compression)
# Create initrd.lz4 with lz4 -l compression (fast speed but less compression)
# -l = Legacy format (typically for Linux Kernel compression)
REAR_INITRD_FILENAME="initrd.lz4"
LogPrint "Creating recovery/rescue system initramfs/initrd $REAR_INITRD_FILENAME with lz4 compression"
if find . ! -name "*~" | cpio -H newc --create --quiet | lz4 > "$TMP_DIR/$REAR_INITRD_FILENAME" ; then
LogPrint "Creating recovery/rescue system initramfs/initrd $REAR_INITRD_FILENAME with lz4 -l compression"
if find . ! -name "*~" | cpio -H newc --create --quiet | lz4 -l > "$TMP_DIR/$REAR_INITRD_FILENAME" ; then
needed_seconds=$(( $( date +%s ) - start_seconds ))
LogPrint "Created $REAR_INITRD_FILENAME with lz4 compression ($( stat -c%s $TMP_DIR/$REAR_INITRD_FILENAME ) bytes) in $needed_seconds seconds"
else
Expand Down