Re: rebuild kernel and modules
On Mon, 14 Feb 2000 11:42:33 -0800, brian moore [EMAIL PROTECTED] was crying out from somewhere about: Re: rebuild kernel and modules bem Indeed, after avoiding it for months, I finally actually built a kernel bem 'the debian way' and found it a breeze. No more 'make bzImage make bem modules make modules_install' and then digging the kernel out of bem arch/i386/boot, etc. It just worked. bem bem I'll try to behave myself in the future and use make-kpkg on future bem kernel builds. One more step towards a debian way would be doing : $ make xconfig $ fakeroot make-kpkg . $ sudo dpkg -i ../kernel. #by the way, you need to set up yourself as a sudoers, using visudo. #and need the packages fakeroot and sudo. and probably doing it in your $home directory. Whats more ... if, for example you do... (example session) $ mkdir for486 $ cd for486 $ tar xvIz ../linux-2.2.13.tar.bz2 $ cd linux $ make xconfig $ fakeroot make-kpkg --revision for486.1.0 binary-arch #note that you don't need to become root, or have any permission to become #one here... and copy the .deb file over to the machine, you can safely make a kernel for your 486 machine, without changing your main Pentium machine configuration. Finding this out after a long while of hacking around with the Debian way, I thought this must make it into the FAQ. The FAQ doesn't say much about it (in slink). Kernel-package docs say a bit more. --- dancer, a.k.a. Junichi Uekawa a member of the Dept. of Knowledge Engineering and Computer Science, Doshisha University. ... I pronounce Linux as in [Day-bee-enne]
Re: rebuild kernel and modules
Lee Bradshaw [EMAIL PROTECTED] writes: On Mon, Feb 14, 2000 at 10:22:11AM -0600, Timothy C. Phan wrote: Hi, I'm in the middle of rebuild the 2.2.13 kernel for potato to include IP-MASQ plus some other modules. I'd like to know after the kernel and some modules were built, how would I go about install the modules. I learned that I can re-install the new kernel by simply dpkg -i. But, for module, what is the command to install or unstall. Thanks! After you do something like: make-kpkg --revision=custom.1.0 kernel_image add: make-kpkg modules_image Install both the kernel-image and pcmcia-modules .deb files. See /usr/share/kernel-package/README.modules for more info. First, it seems that Timothy is not using the kernel-package package. You'll want to use this Timothy since it makes life a lot easier on our Debian systems, and it is the Debian Way (TM). Now, what Lee said only applies to extra modules, like PCMCIA. The modules that are part of the kernel source tree are included in the kernel image file that is generated by make-kpkg. Read the docs for the kernel-package package to learn how to use it. It's pretty straightforward. An example session for building a kernel: % cd /usr/src/kernel-source-2.2.13 % make menuconfig % make-kpkg --revision homePC.1 --bzimage kernel_image % cd .. % dpkg -i kernel-image-2.2.14_homePC.1_i386.deb and you're done. Gary
Re: rebuild kernel and modules
On Mon, Feb 14, 2000 at 09:57:32AM -0700, Gary Hennigan wrote: Lee Bradshaw [EMAIL PROTECTED] writes: On Mon, Feb 14, 2000 at 10:22:11AM -0600, Timothy C. Phan wrote: Hi, I'm in the middle of rebuild the 2.2.13 kernel for potato to include IP-MASQ plus some other modules. I'd like to know after the kernel and some modules were built, how would I go about install the modules. I learned that I can re-install the new kernel by simply dpkg -i. But, for module, what is the command to install or unstall. Thanks! After you do something like: make-kpkg --revision=custom.1.0 kernel_image add: make-kpkg modules_image Install both the kernel-image and pcmcia-modules .deb files. See /usr/share/kernel-package/README.modules for more info. First, it seems that Timothy is not using the kernel-package package. You'll want to use this Timothy since it makes life a lot easier on our Debian systems, and it is the Debian Way (TM). Timothy was using dpkg -i to install his new kernel. I assumed he was asking about extra modules since the .deb he installed would have the standard modules. Maybe he just didn't realize the modules were in the .deb file. Now, what Lee said only applies to extra modules, like PCMCIA. The modules that are part of the kernel source tree are included in the kernel image file that is generated by make-kpkg. Read the docs for the kernel-package package to learn how to use it. It's pretty straightforward. An example session for building a kernel: % cd /usr/src/kernel-source-2.2.13 % make menuconfig % make-kpkg --revision homePC.1 --bzimage kernel_image % cd .. % dpkg -i kernel-image-2.2.14_homePC.1_i386.deb and you're done. Gary -- Lee Bradshaw [EMAIL PROTECTED] (preferred) Alantro Communications [EMAIL PROTECTED]
Re: rebuild kernel and modules
Hi All, Thank you for the replies. I'll use the kernel-package since it will make my life easier :) Could someone send me the kernel-package/README.modules since I do not have my potato-box with me :) Thanks! Gary Hennigan wrote: Lee Bradshaw [EMAIL PROTECTED] writes: On Mon, Feb 14, 2000 at 10:22:11AM -0600, Timothy C. Phan wrote: Hi, I'm in the middle of rebuild the 2.2.13 kernel for potato to include IP-MASQ plus some other modules. I'd like to know after the kernel and some modules were built, how would I go about install the modules. I learned that I can re-install the new kernel by simply dpkg -i. But, for module, what is the command to install or unstall. Thanks! After you do something like: make-kpkg --revision=custom.1.0 kernel_image add: make-kpkg modules_image Install both the kernel-image and pcmcia-modules .deb files. See /usr/share/kernel-package/README.modules for more info. First, it seems that Timothy is not using the kernel-package package. You'll want to use this Timothy since it makes life a lot easier on our Debian systems, and it is the Debian Way (TM). Now, what Lee said only applies to extra modules, like PCMCIA. The modules that are part of the kernel source tree are included in the kernel image file that is generated by make-kpkg. Read the docs for the kernel-package package to learn how to use it. It's pretty straightforward. An example session for building a kernel: % cd /usr/src/kernel-source-2.2.13 % make menuconfig % make-kpkg --revision homePC.1 --bzimage kernel_image % cd .. % dpkg -i kernel-image-2.2.14_homePC.1_i386.deb and you're done. Gary -- Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] /dev/null
Re: rebuild kernel and modules
Hi Lee, So, when I do a dpkg -i kernel_image, would this allowed me to install the modules one by one or it would just install all the modules that I configure to build before rebuilding the kernel? Secondly, when I installed the module during the fresh installation, I selected a several modules and the system would prompt me for some command line options to the modules that I selected, what are the available options? I believe at the same time, it also display some warning message about unavailable of some document... Thanks! Lee Bradshaw wrote: On Mon, Feb 14, 2000 at 09:57:32AM -0700, Gary Hennigan wrote: Lee Bradshaw [EMAIL PROTECTED] writes: On Mon, Feb 14, 2000 at 10:22:11AM -0600, Timothy C. Phan wrote: Hi, I'm in the middle of rebuild the 2.2.13 kernel for potato to include IP-MASQ plus some other modules. I'd like to know after the kernel and some modules were built, how would I go about install the modules. I learned that I can re-install the new kernel by simply dpkg -i. But, for module, what is the command to install or unstall. Thanks! After you do something like: make-kpkg --revision=custom.1.0 kernel_image add: make-kpkg modules_image Install both the kernel-image and pcmcia-modules .deb files. See /usr/share/kernel-package/README.modules for more info. First, it seems that Timothy is not using the kernel-package package. You'll want to use this Timothy since it makes life a lot easier on our Debian systems, and it is the Debian Way (TM). Timothy was using dpkg -i to install his new kernel. I assumed he was asking about extra modules since the .deb he installed would have the standard modules. Maybe he just didn't realize the modules were in the .deb file. Now, what Lee said only applies to extra modules, like PCMCIA. The modules that are part of the kernel source tree are included in the kernel image file that is generated by make-kpkg. Read the docs for the kernel-package package to learn how to use it. It's pretty straightforward. An example session for building a kernel: % cd /usr/src/kernel-source-2.2.13 % make menuconfig % make-kpkg --revision homePC.1 --bzimage kernel_image % cd .. % dpkg -i kernel-image-2.2.14_homePC.1_i386.deb and you're done. Gary -- Lee Bradshaw [EMAIL PROTECTED] (preferred) Alantro Communications [EMAIL PROTECTED] -- Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] /dev/null
Re: rebuild kernel and modules
How are you guys compiling your kernel??? Why don't you 'just' config the thing and do: make dep make clean make bzImage make modules make modules_install After that, simply edit your /etc/lilo.conf, run lilo and add your modules using modprobe or insmod (you could also use modconf) and done. No package needed (except of course for gcc and all that) Ron === TO BOLDLY CODE WHERE NO MAN HAS CODED BEFORE. === On Mon, 14 Feb 2000, Gary Hennigan wrote: Lee Bradshaw [EMAIL PROTECTED] writes: On Mon, Feb 14, 2000 at 10:22:11AM -0600, Timothy C. Phan wrote: Hi, I'm in the middle of rebuild the 2.2.13 kernel for potato to include IP-MASQ plus some other modules. I'd like to know after the kernel and some modules were built, how would I go about install the modules. I learned that I can re-install the new kernel by simply dpkg -i. But, for module, what is the command to install or unstall. Thanks! After you do something like: make-kpkg --revision=custom.1.0 kernel_image add: make-kpkg modules_image Install both the kernel-image and pcmcia-modules .deb files. See /usr/share/kernel-package/README.modules for more info. First, it seems that Timothy is not using the kernel-package package. You'll want to use this Timothy since it makes life a lot easier on our Debian systems, and it is the Debian Way (TM). Now, what Lee said only applies to extra modules, like PCMCIA. The modules that are part of the kernel source tree are included in the kernel image file that is generated by make-kpkg. Read the docs for the kernel-package package to learn how to use it. It's pretty straightforward. An example session for building a kernel: % cd /usr/src/kernel-source-2.2.13 % make menuconfig % make-kpkg --revision homePC.1 --bzimage kernel_image % cd .. % dpkg -i kernel-image-2.2.14_homePC.1_i386.deb and you're done. Gary -- Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] /dev/null
Re: rebuild kernel and modules
Ron Rademaker [EMAIL PROTECTED] writes: How are you guys compiling your kernel??? Why don't you 'just' config the thing and do: make dep make clean make bzImage make modules make modules_install After that, simply edit your /etc/lilo.conf, run lilo and add your modules using modprobe or insmod (you could also use modconf) and done. No package needed (except of course for gcc and all that) The main reason NOT to do that is that it confuses Debian package management. For example, suppose you install kernel-image-2.2.13-2 from your favorite Debian mirror, but then decide you want to customize it so you use your method. You install it, as you stated, and you're off to the races. Now suppose the kernel maintainer finds a bug and decides to install a patch and releases kernel-image-2.2.13-3. 'apt-get upgrade' dutifully notices this and upgrades your kernel-image. BAM! Your custom kernel and all the changes are wiped in one fell swoop. Of course you could manually put the kernel-image-2.2.13-2 on hold, but that's not really what's installed on your system, since you bypassed Debian's package management. This is one of the reasons for the kernel-package package. With it you assign your own version number for the kernel image and it can live quite nicely with any of the stock kernel-image files you wish to keep and won't be overwritten when the stock kernel-image gets upgraded. In addition, make-kpkg automates many, if not all, of the steps you give above. I simply do a 'make menuconfig', 'make-kpkg ...', 'dpkg -i kernel-image-whatever' and it prompts me for the necessary changes to /etc/lilo.conf and asks me if I want to run lilo, etc. make-kpkg is a nice piece of software, and IMHO, well worth looking into if you're using Debian and like keeping up your own kernels. Gary
Re: rebuild kernel and modules
Your story is right if you install kernel-images, not if, like I always do, download source code untar and gunzip it and ... On Mon, 14 Feb 2000, Gary Hennigan wrote: Ron Rademaker [EMAIL PROTECTED] writes: How are you guys compiling your kernel??? Why don't you 'just' config the thing and do: make dep make clean make bzImage make modules make modules_install After that, simply edit your /etc/lilo.conf, run lilo and add your modules using modprobe or insmod (you could also use modconf) and done. No package needed (except of course for gcc and all that) The main reason NOT to do that is that it confuses Debian package management. For example, suppose you install kernel-image-2.2.13-2 from your favorite Debian mirror, but then decide you want to customize it so you use your method. You install it, as you stated, and you're off to the races. Now suppose the kernel maintainer finds a bug and decides to install a patch and releases kernel-image-2.2.13-3. 'apt-get upgrade' dutifully notices this and upgrades your kernel-image. BAM! Your custom kernel and all the changes are wiped in one fell swoop. Of course you could manually put the kernel-image-2.2.13-2 on hold, but that's not really what's installed on your system, since you bypassed Debian's package management. This is one of the reasons for the kernel-package package. With it you assign your own version number for the kernel image and it can live quite nicely with any of the stock kernel-image files you wish to keep and won't be overwritten when the stock kernel-image gets upgraded. In addition, make-kpkg automates many, if not all, of the steps you give above. I simply do a 'make menuconfig', 'make-kpkg ...', 'dpkg -i kernel-image-whatever' and it prompts me for the necessary changes to /etc/lilo.conf and asks me if I want to run lilo, etc. make-kpkg is a nice piece of software, and IMHO, well worth looking into if you're using Debian and like keeping up your own kernels. Gary -- Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] /dev/null
Re: rebuild kernel and modules
On Mon, Feb 14, 2000 at 12:13:53PM -0700, Gary Hennigan wrote: make-kpkg is a nice piece of software, and IMHO, well worth looking into if you're using Debian and like keeping up your own kernels. Indeed, after avoiding it for months, I finally actually built a kernel 'the debian way' and found it a breeze. No more 'make bzImage make modules make modules_install' and then digging the kernel out of arch/i386/boot, etc. It just worked. I'll try to behave myself in the future and use make-kpkg on future kernel builds. -- Brian Moore | Of course vi is God's editor. Sysadmin, C/Perl Hacker | If He used Emacs, He'd still be waiting Usenet Vandal | for it to load on the seventh day. Netscum, Bane of Elves.
Re: rebuild kernel and modules
On Mon, Feb 14, 2000 at 12:13:53PM -0700, Gary Hennigan wrote: [ snip] : make-kpkg is a nice piece of software, and IMHO, well worth looking : into if you're using Debian and like keeping up your own kernels. Besides, kernel-package lets you leverage your (or your friend's) fast machine for building kernels ... no more waiting around for that 486 to build a kernel! Once you've got the kernel deb you just scp it over and install it ... -- Nathan NormanNetwork Magician, Eclectic Engineer GPG Key ID 1024D/51F98BB7 Eschew Obfuscation Key fingerprint = C5F4 A147 416C E0BF AB73 8BEF F0C8 255C 51F9 8BB7 pgplGIBxoi9mp.pgp Description: PGP signature
Re: rebuild kernel and modules
On Mon, Feb 14, 2000 at 08:28:16PM +0100, Ron Rademaker wrote: : Your story is right if you install kernel-images, not if, like I always : do, download source code untar and gunzip it and ... Gosh, I wish I'd known that before I built 30 or so kernels using kernel-package and the tarballs from www.kernel.org ... hmm, I wonder why they work??? hint: you don't need to install kernel-source-bla or kernel-image-bla to enjoy kernel-package! Besides, you already have a kernel-image package installed as part of base. As far as debian can tell this is the current kernel rev even if you've rolled your own. Having said that, if you persist in doing things the hard way that's no big deal to me :- -- Nathan NormanNetwork Magician, Eclectic Engineer GPG Key ID 1024D/51F98BB7 Eschew Obfuscation Key fingerprint = C5F4 A147 416C E0BF AB73 8BEF F0C8 255C 51F9 8BB7 pgpDDol0vmVa3.pgp Description: PGP signature
Re: rebuild kernel and modules
On Mon, Feb 14, 2000 at 12:07:46PM -0600, Timothy C. Phan wrote: Hi Lee, So, when I do a dpkg -i kernel_image, would this allowed me to install the modules one by one or it would just install all the modules that I configure to build before rebuilding the kernel? dpkg -i install the modules onto the disk. Some other mechanism is required to install the modules into memory when you boot. The command should install (onto the disk) all the modules that you compiled into a directory under /lib/modules (/lib/modules/2.2.14 for example). You can put specific modules to load (into memory) in the file /etc/modules or use auto to have the kernel get them automatically (if you compiled the kernel with support for this feature.) You can also install modules (into memory) with 'modprobe modulename' by hand. Secondly, when I installed the module during the fresh installation, I selected a several modules and the system would prompt me for some command line options to the modules that I selected, what are the available options? Look in /etc/modutils and edit whatever seems to be the appropriate file, or make a new file called options. Add a line of the form: options module module_options Then run update-modules. This command will process the files in /etc/modutils and generate a single /etc/modules.conf file. I believe at the same time, it also display some warning message about unavailable of some document... Thanks! -- Lee Bradshaw [EMAIL PROTECTED] (preferred) Alantro Communications [EMAIL PROTECTED]
Re: rebuild kernel and modules
Ron Rademaker writes: Your story is right if you install kernel-images, not if, like I always do, download source code untar and gunzip it and ... Kernel-package does not require Debian kernel sources. -- John Hasler [EMAIL PROTECTED] (John Hasler) Dancing Horse Hill Elmwood, WI
Re: rebuild kernel and modules
Gary Hennigan writes: 'apt-get upgrade' dutifully notices this and upgrades your kernel-image. BAM! Your custom kernel and all the changes are wiped in one fell swoop. Which he deserves for not putting his local customized kernel source in /usr/local/src. -- John Hasler [EMAIL PROTECTED] Dancing Horse Hill Elmwood, Wisconsin