LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   How to install intel i211 LAN driver to initrd.img (https://www.linuxquestions.org/questions/slackware-14/how-to-install-intel-i211-lan-driver-to-initrd-img-4175621001/)

wangwy 01-05-2018 06:57 AM

How to install intel i211 LAN driver to initrd.img
 
Hello,

Is anyone know how to install the Intel i211 LAN to initrd.img in Slackware?


Thanks.

Paulo2 01-05-2018 07:22 AM

Hello, welcome to LQ Slackware forum :)
Searching the Internet with Google, I found that the driver name is 'igb'.
You could generate a new initrd with the 'mkinitrd' command as root.
Code:

mkinitrd -m igb:ext4
This will generate a initrd file for the running kernel (if you want for
another version add e.g. '-k 4.14.7') with the ext4 and igb modules.

You must run 'lilo' again after generate a new initrd.gz file.

wangwy 01-08-2018 10:50 AM

Quote:

Originally Posted by Paulo2 (Post 5802351)
Hello, welcome to LQ Slackware forum :)
Searching the Internet with Google, I found that the driver name is 'igb'.
You could generate a new initrd with the 'mkinitrd' command as root.
Code:

mkinitrd -m igb:ext4
This will generate a initrd file for the running kernel (if you want for
another version add e.g. '-k 4.14.7') with the ext4 and igb modules.

You must run 'lilo' again after generate a new initrd.gz file.

Hello,

Thanks for your answer. I found the "igb" driver but I don't want to generate a new initrd.img file. I want to add the driver to an existed initrd.img file. Do you know how to do? Thanks.

Darth Vader 01-08-2018 11:29 AM

Why someone will want to load a LAN driver in initrd? What utility has to do that?

After all, this driver will do something useful AFTER the network services are started by /etc/rc.d/rc.M (the final multiuser stage) ;)

Paulo2 01-08-2018 11:43 AM

Quote:

Originally Posted by wangwy (Post 5803656)
Hello,

Thanks for your answer. I found the "igb" driver but I don't want to generate a new initrd.img file. I want to add the driver to an existed initrd.img file. Do you know how to do? Thanks.

I think if you don't use the mkinitrd '-c' option, '/boot/initrd-tree' won't be cleared and all the
other modules will be avialable, but I don't know for sure.


edit-
I think I misunderstood the question
'I don't want to generate a new initrd.img file. I want to add the driver to an existed initrd.img file. Do you know how to do?'
Adding directily a file to the initrd.gz would be just add the file to the compressed initrd.gz, but I don't know if this is a good practice.
If you use Lilo, you should run lilo again anyway, with grub I think it isn't necessary.

But if you run 'mkinitrd -m igb' you will see that some other files will be added as well,
so I think it is better to run mkinitrd with a list of the modules you want.

wangwy 01-09-2018 07:48 AM

Quote:

Originally Posted by Darth Vader (Post 5803673)
Why someone will want to load a LAN driver in initrd? What utility has to do that?

After all, this driver will do something useful AFTER the network services are started by /etc/rc.d/rc.M (the final multiuser stage) ;)

For PXE.

Alien Bob 01-09-2018 09:01 AM

Quote:

Originally Posted by wangwy (Post 5804108)
For PXE.

You need more than just a network driver if you want to PXE-boot a Slackware OS.
The initrd.img of the Slackware installer already contains the 'igb' driver but it also contains a DHCP client, plus the code to initialize the interface and get an IP address. It will be a lot of work to add this. I know because I added PXE support to Slackware Live.


All times are GMT -5. The time now is 03:32 AM.