On Sep 28, 2020 9:45 AM, "Pierre Labastie via blfs-support" < [email protected]> wrote: > > On Sun, 2020-09-27 at 14:37 -0500, DJ Lucas via blfs-support wrote: > > > > On 9/27/2020 6:45 AM, Alexey Orishko via blfs-support wrote: > > > Hi guys, > > > > > > Every time I use mkinitramfs I get a warning on the screen: > > > Creating initrd.img-5.8.11... ln: failed to create symbolic link > > > '/tmp/initrd-work.dIMxI8Ugai/bin/sh': File exists > > > done. > > > Image created is fully functional. > > > > > > I added ls commands in the script to check the reason before ln > > > command: > > > ls /tmp/initrd-work.dIMxI8Ugai/bin/sh > > > -rwxr-xr-x 1 root root 3785752 Sep 27 13:39 /tmp/initrd- > > > work.dIMxI8Ugai/bin/sh > > > ls /bin/bash > > > -rwxr-xr-x 1 root root 3785752 Sep 5 21:44 /bin/bash > > > > > > Both sh and original bash are the same. Do we really need command > > > below? > > > line 136: ln -s bash $WDIR/bin/sh > > > > > > /Alexey > > > > > > > I ran into this when writing the modular mkinitramfs script that I am > > working on and forgot about it. I believe the correct fix is to > > remove 'sh' from $binfiles (let it create the link and not waste the > > tiny bit of space in the archive). > > > > Actually, this link is not needed. The only script that is used while > in the initrd is mkinitramfs, which has #!/bin/sh in its first line. > > Actually, it seems all the modifications made on May 14th were bogus. I > think I've inadvertently committed a patch sent to the -dev list, and > that I was going to just try. But I guess I run "svn diff" on the BOOK > directory for committing another modification, and didn't check that > something unwanted went in.
The issue is sh is copied to the initramfs staging area. When the symlink for sh tries to get created it complains and bails, as it should, because sh already exists and is a copy of bash. For consistency I say replace sh with bash in binfiles. Leave the symlink in but move it up in the script.
-- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
