FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 08-09-2012, 02:46 PM
ML mail
 
Default How to add self-compiled kernel module in debian installation

Hi,


I have a new LSI MegaRAID card which is not recognized by the Debian 6.0 squeeze installer so I thought I would modify the initrd.gz installation image which gets loaded at PXE boot in order to include my self-compiled latest version of that module (megaraid_sas.ko). I unpacked then the initrd.gz using cpio and looked at its /modules/2.6.32-5-amd64/kernel/drivers/scsi to notice that it's all empty. I conclude here that the SCSI card drivers are not located in the initrd.gz image.

Do you know where and how I can get my version of megaraid_sas.ko module driver loaded at installation time instead of the default one?

Cheers,
ML


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1344523586.30181.YahooMailNeo@web111409.mail.gq1.y ahoo.com">http://lists.debian.org/1344523586.30181.YahooMailNeo@web111409.mail.gq1.y ahoo.com
 
Old 08-09-2012, 03:43 PM
Camaleón
 
Default How to add self-compiled kernel module in debian installation

On Thu, 09 Aug 2012 07:46:26 -0700, ML mail wrote:

> I have a new LSI MegaRAID card which is not recognized by the Debian 6.0
> squeeze installer so I thought I would modify the initrd.gz installation
> image which gets loaded at PXE boot in order to include my self-compiled
> latest version of that module (megaraid_sas.ko).

So you finally managed to compile the driver for Debian, congrats! :-)

> I unpacked then the initrd.gz using cpio and looked at its
> /modules/2.6.32-5-amd64/kernel/drivers/scsi to notice that it's all
> empty. I conclude here that the SCSI card drivers are not located in the
> initrd.gz image.
>
> Do you know where and how I can get my version of megaraid_sas.ko module
> driver loaded at installation time instead of the default one?

A dirty trick can be placing/copying the kernel module under "/lib/
modules/$(uname -r)/kernel/drivers/scsi" from the installer itself.

You will need to put file into a USB stick and jump to a console to
manually mount the USB disk ("mount /dev/sdb1" /mnt) and then issue a
simple "cp /dev/sdb1/megaraid_sas.ko /lib/modules/$(uname -r)/kernel/
drivers/scsi/" (note that YMMV with names and paths, do not copy/paste
"as is"). After that I supoose you will have to "modprobe megaraid_sas"
so the module becomes available from the partitioner.

P.S. Remember that the kernel module you have self-compiled has to match
with the kernel version you are going to use, otherwise it will fail to
load ;-(

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/k00lq5$t9u$11@dough.gmane.org
 
Old 08-09-2012, 03:50 PM
ML mail
 
Default How to add self-compiled kernel module in debian installation

Indeed yes, I managed to compile the megaraid_sas module by using an older version of it (looks like the latest source code from LSI has an issue with Debian). I see you follow very well what happens on this mailing list


Thanks for your suggestion of the USB key, unfortunately that's exactly what I would like to avoid as I want to setup a fully automated installation using Debian's preseed so going to the server and add a USB key is not really an option. Can't I somehow modify the PXE netinstall initrd.gz image to add there directly my self-compiled version of the kernel module?

Cheers,
ML*



----- Original Message -----
From: Camaleón <noelamac@gmail.com>
To: debian-user@lists.debian.org
Cc:
Sent: Thursday, August 9, 2012 5:43 PM
Subject: Re: How to add self-compiled kernel module in debian installation

On Thu, 09 Aug 2012 07:46:26 -0700, ML mail wrote:

> I have a new LSI MegaRAID card which is not recognized by the Debian 6.0
> squeeze installer so I thought I would modify the initrd.gz installation
> image which gets loaded at PXE boot in order to include my self-compiled
> latest version of that module (megaraid_sas.ko).

So you finally managed to compile the driver for Debian, congrats! :-)

> I unpacked then the initrd.gz using cpio and looked at its
> /modules/2.6.32-5-amd64/kernel/drivers/scsi to notice that it's all
> empty. I conclude here that the SCSI card drivers are not located in the
> initrd.gz image.
>
> Do you know where and how I can get my version of megaraid_sas.ko module
> driver loaded at installation time instead of the default one?

A dirty trick can be placing/copying the kernel module under "/lib/
modules/$(uname -r)/kernel/drivers/scsi" from the installer itself.

You will need to put file into a USB stick and jump to a console to
manually mount the USB disk ("mount /dev/sdb1" /mnt) and then issue a
simple "cp /dev/sdb1/megaraid_sas.ko /lib/modules/$(uname -r)/kernel/
drivers/scsi/" (note that YMMV with names and paths, do not copy/paste
"as is"). After that I supoose you will have to "modprobe megaraid_sas"
so the module becomes available from the partitioner.

P.S. Remember that the kernel module you have self-compiled has to match
with the kernel version you are going to use, otherwise it will fail to
load ;-(

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/k00lq5$t9u$11@dough.gmane.org


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1344527447.26190.YahooMailNeo@web111408.mail.gq1.y ahoo.com">http://lists.debian.org/1344527447.26190.YahooMailNeo@web111408.mail.gq1.y ahoo.com
 
Old 08-09-2012, 04:55 PM
Camaleón
 
Default How to add self-compiled kernel module in debian installation

On Thu, 09 Aug 2012 08:50:47 -0700, ML mail wrote:

> Indeed yes, I managed to compile the megaraid_sas module by using an
> older version of it (looks like the latest source code from LSI has an
> issue with Debian). I see you follow very well what happens on this
> mailing list

I have an special interest when it comes to hardware RAID controllers
(I've developed a love-hate relationship with them).

> Thanks for your suggestion of the USB key, unfortunately that's exactly
> what I would like to avoid as I want to setup a fully automated
> installation using Debian's preseed so going to the server and add a USB
> key is not really an option.

Mmm... then maybe you can add the kernel module to the ISO before you
burn the image into a CD/DVD :-?

> Can't I somehow modify the PXE netinstall initrd.gz image to add there
> directly my self-compiled version of the kernel module?

For this I can't tell. I know the initrd can be tweaked for preseeding
but to include a kernel module, I don't know.

Check if this helps:

http://wiki.debian.org/DebianInstaller/Modify/CustomKernel

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/k00q1n$t9u$15@dough.gmane.org
 
Old 08-09-2012, 10:04 PM
ML mail
 
Default How to add self-compiled kernel module in debian installation

Well I am also starting to develop some kind of love/hate relationship with these RAID cards...


Unfortunately, the link doesn't help much and I am still trying to figure out where these RAID card modules are loaded from during the installation...

I thought adding a new RAID card module to the installation would be as "easy" as adding a closed-source firmware network adapter module such as bnx2... but it looks like this is not the case.


Best,

ML



----- Original Message -----
From: Camaleón <noelamac@gmail.com>
To: debian-user@lists.debian.org
Cc:
Sent: Thursday, August 9, 2012 6:55 PM
Subject: Re: How to add self-compiled kernel module in debian installation

On Thu, 09 Aug 2012 08:50:47 -0700, ML mail wrote:

> Indeed yes, I managed to compile the megaraid_sas module by using an
> older version of it (looks like the latest source code from LSI has an
> issue with Debian). I see you follow very well what happens on this
> mailing list

I have an special interest when it comes to hardware RAID controllers
(I've developed a love-hate relationship with them).

> Thanks for your suggestion of the USB key, unfortunately that's exactly
> what I would like to avoid as I want to setup a fully automated
> installation using Debian's preseed so going to the server and add a USB
> key is not really an option.

Mmm... then maybe you can add the kernel module to the ISO before you
burn the image into a CD/DVD :-?

> Can't I somehow modify the PXE netinstall initrd.gz image to add there
> directly my self-compiled version of the kernel module?

For this I can't tell. I know the initrd can be tweaked for preseeding
but to include a kernel module, I don't know.

Check if this helps:

http://wiki.debian.org/DebianInstaller/Modify/CustomKernel

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/k00q1n$t9u$15@dough.gmane.org


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1344549846.20925.YahooMailNeo@web111414.mail.gq1.y ahoo.com">http://lists.debian.org/1344549846.20925.YahooMailNeo@web111414.mail.gq1.y ahoo.com
 
Old 08-10-2012, 02:28 PM
Ralf Mardorf
 
Default How to add self-compiled kernel module in debian installation

On Thu, 2012-08-09 at 07:46 -0700, ML mail wrote:
> Hi,
>
>
> I have a new LSI MegaRAID card which is not recognized by the Debian 6.0 squeeze installer so I thought I would modify the initrd.gz installation image which gets loaded at PXE boot in order to include my self-compiled latest version of that module (megaraid_sas.ko). I unpacked then the initrd.gz using cpio and looked at its /modules/2.6.32-5-amd64/kernel/drivers/scsi to notice that it's all empty. I conclude here that the SCSI card drivers are not located in the initrd.gz image.
>
> Do you know where and how I can get my version of megaraid_sas.ko module driver loaded at installation time instead of the default one?
>
> Cheers,
> ML

Don't you think you need to compile it, for each different kernel
version?



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/1344608908.1261.20.camel@localhost.localdomain
 
Old 08-10-2012, 02:51 PM
Camaleón
 
Default How to add self-compiled kernel module in debian installation

On Thu, 09 Aug 2012 15:04:06 -0700, ML mail wrote:

> Well I am also starting to develop some kind of love/hate relationship
> with these RAID cards...

And those cards from LSI are one of the most valued RAID cards in the
market, at least when it comes to their hardware specs. But then it comes
the problem for the installation, that's when you really value a
manufacturer which provides an open source driver for your new toy :-)

> Unfortunately, the link doesn't help much and I am still trying to
> figure out where these RAID card modules are loaded from during the
> installation...

Sorry to hear that ;-(

Modules are loaded from the kernel package which is included in the CD/
DVD; "initrd" is just the "initiator". But it would be nice to have an
option in the installer that can allow the user to load additional kernel
modules from a predefined location (a network share such as samba/ssh/ftp
or from external device).

> I thought adding a new RAID card module to the installation would be as
> "easy" as adding a closed-source firmware network adapter module such as
> bnx2... but it looks like this is not the case.

A firmware is not a kernel module. Anyway, automated installations are
fine when you have a 100% compatible set of hardware/chipset as you won't
expect any problem but your RAID card seems too new for the stock kernel
included in Squeeze, I'd expect some kind of manual intervention.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/k0375p$qus$4@dough.gmane.org
 

Thread Tools




All times are GMT. The time now is 03:30 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org