Another Quick note as I keep running into this and every time go hunting for what I did to fix it last time.
When doing update/upgrades I run into the error cp: cannot stat `/lib/libnss_*’: No such file or directory when it’s running update-initramfs
This seems to be because of the dropbear hooks, that I use to decrypt a filesystem remotely.
https://bugs.launchpad.net/ubuntu/+source/dropbear/+bug/834174
Has all the info, but the basic steps for me are:-
nano -w /usr/share/initramfs-tools/hooks/dropbear
search for the line
cp /lib/libnss_* "${DESTDIR}/lib/"
Add x86_64-linux-gnu into the path making the line
cp /lib/x86_64-linux-gnu/libnss_* "${DESTDIR}/lib/"
UPDATE: This is valid for a 64bit system. For a 32bit system the path is more likely to be /lib/i386-linux-gnu/
This would make the line
cp /lib/i386-linux-gnu/libnss_* "${DESTDIR}/lib/"
Then run
update-initramfs -u
and no error.
Thanks for the tip!
BTW, for the 32 bit system, you still have to have the root “/” at the beginning, so it should be:
cp /lib/i386-linux-gnu/libnss_* “${DESTDIR}/lib/”
Users can verify if this is the correct path on their system by doing:
sudo find / | grep ‘libnss_*’
Thanks again.
Well spotted. I’ve updated the line 🙂
Thanks for the feedback, I thought no-one reads this.