Open gcs-github opened 6 years ago
@preney can you comment on this? I think you were the one who suggested initramfs LTO workarounds. I don't have a non-empty initramfs myself so I'm not sure about the details on this one.
I'll try this tonight, I have once failed to boot and now I think it might've been -flto
. I'll try disabling flto for zfs and building new initramfs.
Thanks -- I wonder what it is about the initramfs that doesn't play nice with LTO. Worth some investigating for sure.
yes, although it will take me around 12 hours to recompile everything I have with these optimizations. I'll skip zfs this time around.
Yes, I have my filesystems encrypted and use initramfs boot in a small unencrypted mount. I use genkernel to avoid manually having to build all of the tools + the kernel and if the LTO settings are not suppressed, this has caused my kernel+initramfs builds to fail. So I did a pull request for those packages --until someone figures out what can be done with respect to this.
@Thunderbottom Please let us know your results, i.e., it isn't just my configurations where one encounters such. If you experience the same, then it makes sense we add ZFS to the list. (I am not using ZFS.)
I have been using dracut instead of genkernel, the initramfs built fine for me the last time around but didnt boot. Let me tell you I had a working system before that, and the exact same config. I think it might be the -flto
flag and so I'll take another chance here and compile without it.
works fine for me with -flto
enabled. hm.. weird..
i use dracut though. Since zfs on. genkernel is buggy and adds 30+ seconds to boot time
Perhaps dracut is something I try then? If it means those packages can be LTO then would be interesting.
Has anyone else here used dracut with LVM and an encrypted root (i.e., LUKS)?
yes you just add lvm as a dracut module and include crypttab and crypto_key if you have one in dracut using install_items+="/etc/crypttab <keyfile>"
I am not using systemd so I don't have a crypttab file. I will figure out the settings (not in the near future though).
it is not necessary to be on systemd to use crypttab.
Sure, but, whenever I have tried to have tools make use of crypttab, it has been overall an exercise in non-success --so I've not used it and simply pass those details to the boot command line.
Until we can find out what the real problem is, I agree we should accept the zfs workaround as suggested. However, I see no technical reason why LTO should not work with an initramfs. Perhaps I'll make a simple one this week to see if I can nail down what's going on here.
????
Looking into this repository, I've seen an exception being made for packages which can end up being included inside an initramfs. (#31)
I'm not sure why the exception was necessary (I couldn't find the reason why genkernel was failing), but, assuming it's for good reasons, one should probably add sys-fs/zfs to the exception list for ZFS-based systems as well.