Skip to content

Instantly share code, notes, and snippets.

@harish2704
Created August 7, 2016 14:52
Show Gist options
  • Save harish2704/8493d960a599d8b1db72eaf660dfcf44 to your computer and use it in GitHub Desktop.
Save harish2704/8493d960a599d8b1db72eaf660dfcf44 to your computer and use it in GitHub Desktop.
Repack/create a initrd image from a existing initrd directory tree
# Run from root of the initrd tree
find ./ | cpio -H newc -o | lzma -9 - > ../initrd.lz
# Extract initrd file.
# create a empty dir and cd to it
# lzma -d < ../initrd.lz | cpio --extract
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment