On 08/21/2013 07:52 PM, Neil Bothwick wrote:
> On Wed, 21 Aug 2013 17:56:36 +0100, thegeezer wrote:
>
>> anyone have any good pointers to an initramfs interrogator, maybe that
>> takes as argument kernel command line ?
> I posted a script fragment that compares the contents of the kernel's
> initramfs config file with the live filesystem. Dracut users could use
> the same method by parsing the output from lsinitrd.
>
>
hiya,
the script you posted referenced /usr/src/init.cfg -- not sure if this
is a dracut thing but i don't have that.
i was actually thinking something like the following (warning needs work)

#!/bin/bash
# get contents of lsinitrd | awk for month,day,time, /filename | list
the awked filename
lsinitrd /boot/boot/initramfs-genkernel-x86_64-`uname -r` | awk '{ print
$6" "$7" "$8" /"$9; };' | xargs ls -alhd | awk '{ print $6" "$7" "$8"
"$9; };' > existingfiles.tmp
# get contents of lsinitrd
lsinitrd /boot/boot/initramfs-genkernel-x86_64-`uname -r` | awk '{ print
$6" "$7" "$8" /"$9; };' > initrdfiles.tmp
# do a diff to see whats newer in initrd
diff initrdfiles.tmp existingfiles.tmp | grep '<'

improvements gratefully received
:)




Reply via email to