On Mon, Feb 08, 2021 at 08:45:40AM +0800, Cao Xueliang wrote:
On Sun, Feb 07, 2021 at 09:25:25PM +0800, Xu Xijian wrote:
[Why] When start an os, it will output awk: command not found in dracut stage. See errlog, this happens in 40network module, so let's install awk.
[errlog] [ 7.417877] dracut-initqueue[368]: /lib/net-lib.sh: line 125: awk: command not found
Why not install awk in Dockerfile?
Thanks, Xueliang
Dockerfile can only ensure the docker image has the awk, cannot ensure the initrd generated from this image has the awk, because we just generate by cmd dracut in the docker, This operation is to add the awk in the docker to the initrd.
Thanks, Xijian
Signed-off-by: Xu Xijian hdxuxijian@163.com
container/dracut-initrd/bin/setup-dracut.sh | 1 + 1 file changed, 1 insertion(+)
diff --git a/container/dracut-initrd/bin/setup-dracut.sh b/container/dracut-initrd/bin/setup-dracut.sh index f7119ec..8f03fa8 100755 --- a/container/dracut-initrd/bin/setup-dracut.sh +++ b/container/dracut-initrd/bin/setup-dracut.sh @@ -16,3 +16,4 @@ rm -rf /var/lib/apt/lists/* cp -a /usr/local/bin/cifs-lib.sh /usr/lib/dracut/modules.d/95cifs/
cat overlay-lkp.sh >> /usr/lib/dracut/modules.d/90overlay-root/overlay-mount.sh
+sed -i "/install() {/ainst /usr/bin/awk" /usr/lib/dracut/modules.d/40network/module-setup.sh
2.23.0