[Bug 1729836] Re: update-initramfs generating unbootable initrd files when using stderred LD_PRELOAD hook
** Changed in: initramfs-tools (Ubuntu) Status: Incomplete => Triaged ** Changed in: initramfs-tools (Ubuntu) Importance: Undecided => Low -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1729836 Title: update-initramfs generating unbootable initrd files when using stderred LD_PRELOAD hook To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1729836/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1729836] Re: update-initramfs generating unbootable initrd files when using stderred LD_PRELOAD hook
Logged at https://github.com/sickill/stderred/issues/63 ** Bug watch added: github.com/sickill/stderred/issues #63 https://github.com/sickill/stderred/issues/63 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1729836 Title: update-initramfs generating unbootable initrd files when using stderred LD_PRELOAD hook To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1729836/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1729836] Re: update-initramfs generating unbootable initrd files when using stderred LD_PRELOAD hook
I think I figured out the cause. Basically PEBCAK.. There's a program called stderred (https://github.com/sickill/stderred) which colorizes stderr to differentiate it from stdout, via a LD_PRELOAD hook. I have had this set for years in my ~/.bashrc: root@jturner-home:~# echo $LD_PRELOAD /home/jturner/src/github/stderred/build/libstderred.so When I examine the initrd file as follows, I see half the binaries in bin/ contain ANSI escape codes, and the libstderred.so library has been pulled in: root@jturner-home:/boot# update-initramfs -u -k 4.13.0-25-generic update-initramfs: Generating /boot/initrd.img-4.13.0-25-generic root@jturner-home:/boot# mkdir bad root@jturner-home:/boot# ( cd bad; zcat ../initrd.img-4.13.0-25-generic | cpio -idmv; ) root@jturner-home:/boot# ls bad/home/jturner/src/github/stderred/build/libstderred.so bad/home/jturner/src/github/stderred/build/libstderred.so root@jturner-home:/boot# ls -1 bad/bin ?[0m ?[0m?[1m?[31m[[?[0m?[1m?[31m ?[0m?[1m?[31macpid?[0m?[1m?[31m ?[0m?[1m?[31mash?[0m?[1m?[31m ?[0m?[1m?[31mawk?[0m?[1m?[31m ?[0m?[1m?[31mbasename?[0m?[1m?[31m ?[0m?[1m?[31mblockdev?[0m?[1m?[31m ?[0m?[1m?[31mcat?[0m?[1m?[31m ... ?[1m?[31m[?[0m?[1m?[31m busybox cat chroot cpio dash date dd ... The output of update-initramfs goes red halfway. Perhaps update-initramfs could sanitize its environment, or explicitly unset LD_PRELOAD. Hard to be idiot-proof when there's such sophisticated idiots :) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1729836 Title: update-initramfs generating unbootable initrd files when using stderred LD_PRELOAD hook To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1729836/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1729836] Re: update-initramfs generating unbootable initrd files
Sure, I've attached update-initramfs -v output, and confirmed that the generated initrd is unusable, both with kvm and a real computer. ** Attachment added: "Output of 'update-initramfs -v' that generates an unusable initrd." https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1729836/+attachment/5039270/+files/update-initramfs-output.txt ** Summary changed: - update-initramfs generating unbootable initrd files + update-initramfs generating unbootable initrd files when using stderred LD_PRELOAD hook -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1729836 Title: update-initramfs generating unbootable initrd files when using stderred LD_PRELOAD hook To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1729836/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1729836] Re: update-initramfs generating unbootable initrd files
Can your provide the terminal output of running update-initramfs with the -v switch? Thanks in advance. ** Changed in: initramfs-tools (Ubuntu) Status: Confirmed => Incomplete -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1729836 Title: update-initramfs generating unbootable initrd files To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1729836/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1729836] Re: update-initramfs generating unbootable initrd files
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: initramfs-tools (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1729836 Title: update-initramfs generating unbootable initrd files To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1729836/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs