Skip to content

tonyhutter/edit-initramfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

edit-initramfs.sh - A simple initramfs editor

edit-initramfs.sh is a simple script to extract, edit, and rebuild an initramfs image. This makes it easy to quickly make edits to the contents of an initramfs. The script works in a three step process:

  1. Extract the initramfs image to a empty directory
  2. Edit the extracted initramfs files
  3. Rebuild a new initramfs image

Usage:

Extract initramfs:

edit-initramfs.sh  INITRAMFS_IMAGE  EXTRACTED_INITRAMFS_DIR

Rebuild initramfs:

edit-initramfs.sh  EXTRACTED_INITRAMFS_DIR  NEW_INITRAMFS_IMAGE

Example:

mkdir /tmp/my_initramfs_files
edit-initramfs.sh initramfs.img /tmp/my_initramfs_files
echo hello world > /tmp/my_initramfs_files/part1/etc/hello.txt
edit-initramfs.sh /tmp/my_initramfs_files new_initramds.img

edit-initramfs.sh is distributed under the terms of the MIT license. All new contributions must be made under this license.

LLNL-CODE-850891

About

Easily edit an initramfs image

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages