You are not logged in.

#1 2016-09-01 16:51:05

Zopper
Member
Registered: 2010-02-02
Posts: 15

networking in initramfs

Hi all. I was going through this DM-crypt section with a goal to put ssh server into initramfs, so I could remotely unlock LUKS-encrypted / partition. That part I got working, but the system doesn't load wifi drivers when netconf hook is active. I thought that probably the network devices has to be all initialized while in initramfs now, so I added iwlwifi module to mkinitcpio.conf. That didn't help, though - no matter if I have it in MODULES="" or not, dmesg contains only these relevant lines:

[1.5yyyyy] iwlwifi 0000:03:00.0: Direct firmware load for iwlwifi-8000C-XX.ucode failed with error -2 # multiple lines like this with XX being a number in range 16 to 21
[1.513536] iwlwifi: 0000:03:00.0: no suitable firmware found!

Mkinitcpio does not report any error or warning when building this image. I can get the wifi working once the system boots up by unloading and reloading the iwlwifi module (in rc.local for autostart), but that is far from ideal solution. I tried to find out how to include the missing firmware into initramfs, but so far without a success.

Can someone point me out how to either get the firmware there, or how prevent netconf from initializing the wifi? I need it only on eth0.

Offline

#2 2016-09-01 17:18:59

frostschutz
Member
Registered: 2013-11-15
Posts: 1,417

Re: networking in initramfs

Sounds more like you want to exclude the iwlwifi module instead of including it. According to your dmesg it got loaded at 1.x seconds, that's before you unlock the LUKS over cable eth0 right?

Does it work if you write an initramfs hook that unloads this module?

Online

#3 2016-09-01 17:43:55

Zopper
Member
Registered: 2010-02-02
Posts: 15

Re: networking in initramfs

Yes. I have wrote a hook that only calls "rmmod iwlwifi" and put it right behind netconf hook and wifi runs ok after the system fully boots up, thank you for the idea. This looks a bit better than the rc.local hack, though I'm still interested in preventing this issue rather than fixing a hack over it, if possible.

Offline

#4 2016-09-01 18:32:58

frostschutz
Member
Registered: 2013-11-15
Posts: 1,417

Re: networking in initramfs

Well, the question is why it includes this module in the first place when it's not needed... and how to prevent inclusion. If it's not included you don't need to rmmod either.

Alternatively if it's just about missing firmware you could try adding the file via FILES in mkinitcpio.conf - not sure if that helps.

I can't help you much there I'm afraid... no network in my initramfs, instead I opted for the self-decrypting solution, myself. wink ( https://wiki.gentoo.org/wiki/Custom_Ini … ing_Server or bottom of that post https://bbs.archlinux.org/viewtopic.php … 1#p1502651 )

Last edited by frostschutz (2016-09-01 18:33:12)

Online

#5 2016-09-01 19:00:54

Zopper
Member
Registered: 2010-02-02
Posts: 15

Re: networking in initramfs

I could look for the correct firmware file and supply it, but I don't think it is any better than the hook solution - if I put the disk into another machine, I would be at the beginning, the hook should work everywhere.

And the self-decrypting thing is not what I need here, even if it looks nice. It is a laptop, so I want it protected against theft of the entire device, but as I'm leaving it in the office lot of the time overnight, I want to be able to reboot remotely.

Offline

Board footer

Powered by FluxBB