Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys-fs/zfs and initramfs #91

Open
gcs-github opened this issue Jan 29, 2018 · 16 comments
Open

sys-fs/zfs and initramfs #91

gcs-github opened this issue Jan 29, 2018 · 16 comments

Comments

@gcs-github
Copy link
Contributor

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.

@InBetweenNames
Copy link
Owner

@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.

@Thunderbottom
Copy link
Contributor

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.

@InBetweenNames
Copy link
Owner

Thanks -- I wonder what it is about the initramfs that doesn't play nice with LTO. Worth some investigating for sure.

@Thunderbottom
Copy link
Contributor

yes, although it will take me around 12 hours to recompile everything I have with these optimizations. I'll skip zfs this time around.

@preney
Copy link
Contributor

preney commented Feb 7, 2018

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.)

@Thunderbottom
Copy link
Contributor

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.

@Thunderbottom
Copy link
Contributor

works fine for me with -flto enabled. hm.. weird..

@Thunderbottom
Copy link
Contributor

i use dracut though. Since zfs on. genkernel is buggy and adds 30+ seconds to boot time

@preney
Copy link
Contributor

preney commented Feb 8, 2018

Perhaps dracut is something I try then? If it means those packages can be LTO then would be interesting.

@preney
Copy link
Contributor

preney commented Feb 8, 2018

Has anyone else here used dracut with LVM and an encrypted root (i.e., LUKS)?

@Thunderbottom
Copy link
Contributor

Thunderbottom commented Feb 8, 2018

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>"

@preney
Copy link
Contributor

preney commented Feb 8, 2018

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).

@Thunderbottom
Copy link
Contributor

it is not necessary to be on systemd to use crypttab.

@preney
Copy link
Contributor

preney commented Feb 8, 2018

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.

@InBetweenNames
Copy link
Owner

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.

@javashin
Copy link

????

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants