Gentoo Archives: gentoo-user

From: thegeezer <thegeezer@×××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] systemd and initramfs
Date: Wed, 21 Aug 2013 20:09:50
Message-Id: 52151E85.9040807@thegeezer.net
In Reply to: Re: [gentoo-user] systemd and initramfs by Neil Bothwick
1 On 08/21/2013 07:52 PM, Neil Bothwick wrote:
2 > On Wed, 21 Aug 2013 17:56:36 +0100, thegeezer wrote:
3 >
4 >> anyone have any good pointers to an initramfs interrogator, maybe that
5 >> takes as argument kernel command line ?
6 > I posted a script fragment that compares the contents of the kernel's
7 > initramfs config file with the live filesystem. Dracut users could use
8 > the same method by parsing the output from lsinitrd.
9 >
10 >
11 hiya,
12 the script you posted referenced /usr/src/init.cfg -- not sure if this
13 is a dracut thing but i don't have that.
14 i was actually thinking something like the following (warning needs work)
15
16 #!/bin/bash
17 # get contents of lsinitrd | awk for month,day,time, /filename | list
18 the awked filename
19 lsinitrd /boot/boot/initramfs-genkernel-x86_64-`uname -r` | awk '{ print
20 $6" "$7" "$8" /"$9; };' | xargs ls -alhd | awk '{ print $6" "$7" "$8"
21 "$9; };' > existingfiles.tmp
22 # get contents of lsinitrd
23 lsinitrd /boot/boot/initramfs-genkernel-x86_64-`uname -r` | awk '{ print
24 $6" "$7" "$8" /"$9; };' > initrdfiles.tmp
25 # do a diff to see whats newer in initrd
26 diff initrdfiles.tmp existingfiles.tmp | grep '<'
27
28 improvements gratefully received
29 :)

Replies

Subject Author
Re: [gentoo-user] systemd and initramfs Neil Bothwick <neil@××××××××××.uk>