Skip to content

Instantly share code, notes, and snippets.

@lukeross
Created February 18, 2024 17:38
Show Gist options
  • Save lukeross/5d6c63ddc68197ff6bfcbb43c825281f to your computer and use it in GitHub Desktop.
Save lukeross/5d6c63ddc68197ff6bfcbb43c825281f to your computer and use it in GitHub Desktop.
Decompress an initrd with microcode
#!/bin/sh
# decompress-initrd
#
# Decompress Linux kernel initrds where they consist of a microcode update
# followed by the actual initrd.
#
# This script was taken from that contributed by woolpool at
# <https://unix.stackexchange.com/questions/163346/why-is-it-that-my-initrd-only-has-one-directory-namely-kernel>.
(cpio -id; zstdcat | cpio -id) < $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment