- Create a directory and switch into it:
# mkdir test
# cd test - Then uncompress and extract the initrd:
# zcat /boot/initrd.img | cpio -idmv - Edit the contents (if needed)
- Repack and compress the initrd image:
# find . | cpio -o -c | gzip -9 > /boot/test.img - For image compressed with xz format, use commands below to extract the initrd image.
# mkdir /tmp/initrd
# cd /tmp/initrd
# xz -dc < initrd.img | cpio --quiet -i --make-directories - Edit the contents (if needed)
- Repack and compress the initrd image:
# cd /tmp/initrd
# find . 2>/dev/null | cpio --quiet -c -o | xz -9 --format=lzma >"initrd.img"
found on: https://access.redhat.com/solutions/24029
Keine Kommentare:
Kommentar veröffentlichen