Skip to content

Instantly share code, notes, and snippets.

@brant-ruan
Created September 2, 2022 06:57
Show Gist options
  • Save brant-ruan/784808bc192fff533d8be22932c4e2b6 to your computer and use it in GitHub Desktop.
Save brant-ruan/784808bc192fff533d8be22932c4e2b6 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Decompress a .cpio.gz packed file system
rm -rf ./initramfs && mkdir initramfs
pushd . && pushd initramfs
cp ../initramfs.cpio.gz .
gzip -dc initramfs.cpio.gz | cpio -idm &>/dev/null && rm initramfs.cpio.gz
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment