summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2010-06-16 17:12:53 +0200
committermaximilian attems <maks@debian.org>2010-06-17 13:59:38 +0200
commita39db63500c4482aad7d2fc17ad83edd3a56bb8f (patch)
tree4c506005eeb464dd389ef88ca94c8508b6c07c13
parent20313797a36d115827f1060cffe48255852a387f (diff)
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 <maks@debian.org>
-rw-r--r--debian/initramfs-tools.install1
-rw-r--r--debian/initramfs-tools.manpages1
-rwxr-xr-xlsinitramfs14
-rw-r--r--lsinitramfs.831
4 files changed, 47 insertions, 0 deletions
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) <initramfs file>"
+ 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 <maks@debian.org>
+and numerous others.
+
+.SH SEE ALSO
+.BR
+.IR initramfs-tools (8),
+.IR mkinitramfs (8),
+.IR update-initramfs (8).