From a39db63500c4482aad7d2fc17ad83edd3a56bb8f Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Wed, 16 Jun 2010 17:12:53 +0200 Subject: Add lsinitramfs to initramfs-tools useful script to quickly look into initramfs for debugger or bug reporter, inspired by similar dracut tool. Signed-off-by: maximilian attems --- debian/initramfs-tools.install | 1 + debian/initramfs-tools.manpages | 1 + lsinitramfs | 14 ++++++++++++++ lsinitramfs.8 | 31 +++++++++++++++++++++++++++++++ 4 files changed, 47 insertions(+) create mode 100755 lsinitramfs create mode 100644 lsinitramfs.8 diff --git a/debian/initramfs-tools.install b/debian/initramfs-tools.install index ebe6a14..184837f 100644 --- a/debian/initramfs-tools.install +++ b/debian/initramfs-tools.install @@ -1,3 +1,4 @@ +lsinitramfs usr/bin mkinitramfs usr/sbin mkinitramfs-kpkg usr/sbin init usr/share/initramfs-tools diff --git a/debian/initramfs-tools.manpages b/debian/initramfs-tools.manpages index 0c88045..6d78d4c 100644 --- a/debian/initramfs-tools.manpages +++ b/debian/initramfs-tools.manpages @@ -1,3 +1,4 @@ +lsinitramfs.8 mkinitramfs.8 mkinitramfs-kpkg.8 initramfs.conf.5 diff --git a/lsinitramfs b/lsinitramfs new file mode 100755 index 0000000..aea7747 --- /dev/null +++ b/lsinitramfs @@ -0,0 +1,14 @@ +#!/bin/sh + +usage() +{ + echo "Usage: $(basename $0) " + exit 1 +} + +[ $# -eq 0 ] && usage + +for i in $*; do + echo $i + zcat $i | cpio --extract --verbose --quiet --list +done diff --git a/lsinitramfs.8 b/lsinitramfs.8 new file mode 100644 index 0000000..bb809ae --- /dev/null +++ b/lsinitramfs.8 @@ -0,0 +1,31 @@ +.TH LSINITRAMFS 8 "2010/06/16" "Linux" "lsinitramfs manual" + +.SH NAME +lsinitramfs \- list content of an initramfs image + +.SH SYNOPSIS +.B lsinitramfs +.IR initramfsfile + +.SH DESCRIPTION +The +.B lsinitramfs +lists the content of given initramfs images. It allows to quickly +check the content of this specific initramfs. + +.SH EXAMPLES + +List initramfs of current running kernel: + +.PP +.B lsinitramfs /boot/initrd.img-$(uname -r) + +.SH AUTHOR +The initramfs-tools are written by Maximilian Attems +and numerous others. + +.SH SEE ALSO +.BR +.IR initramfs-tools (8), +.IR mkinitramfs (8), +.IR update-initramfs (8). -- cgit v1.2.3