LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   command to make initrd.img (https://www.linuxquestions.org/questions/debian-26/command-to-make-initrd-img-225948/)

utanja 09-02-2004 09:17 PM

command to make initrd.img
 
i need to setup initrd.img for grub....

what is the command for this....i forget to include --initrd in the make-kpkg command for the custom kernel (2.6.8.xxx)

serz 09-02-2004 11:16 PM

Isn't it make initrd?

osvaldomarques 09-03-2004 12:18 AM

Hi,
At least in kernel 2.4, the command is "mkinitrd".

HappyTux 09-03-2004 12:20 AM

Re: command to make initrd.img
 
Quote:

Originally posted by utanja
i need to setup initrd.img for grub....

what is the command for this....i forget to include --initrd in the make-kpkg command for the custom kernel (2.6.8.xxx)

I think it is mkinitrd -o /lib/modules/2.6.8.??? /boot/initrd.img but you may want to consult the man page it has been a long time since I used one. BTW since you are compiling your own kernel why are you not just compiling the support you need to boot directly into the kernel? You would need to change the .??? to the proper directory and would want a unique name for the initrd.img so you will not overwrite an existing image.

utanja 09-03-2004 04:43 AM

thank you so much....

yes....i am aware or what you say....i need the headers and when i add ---initrd to the make-kpkg command no header file is generated...

HappyTux 09-03-2004 09:23 AM

Quote:

Originally posted by utanja
thank you so much....

yes....i am aware or what you say....i need the headers and when i add ---initrd to the make-kpkg command no header file is generated...

There's the problem then to get the headers you would use fakeroot make-kpkg kernel_image kernel_headers as the compile line and you get two .deb one for the image itself and one for the headers. I really do not see why you need the headers though you have the fully configured source tree installed so as long as you have ln -s /usr/src/linux-2.6.8 /usr/src/linux any program that requires the kernel source should be able to find it.

utanja 09-04-2004 03:03 PM

Quote:

Originally posted by HappyTux
There's the problem then to get the headers you would use fakeroot make-kpkg kernel_image kernel_headers as the compile line and you get two .deb one for the image itself and one for the headers. I really do not see why you need the headers though you have the fully configured source tree installed so as long as you have ln -s /usr/src/linux-2.6.8 /usr/src/linux any program that requires the kernel source should be able to find it.
yes i believe you are correct ...however i have yet to be able to use sh NVIDIA-xxxx.run without the headers....i have try with the sym link to /usr/src/linux and it does not work for me....

this is my sym link target ..../usr/src/kernel-source-2.6.8:confused:

HappyTux 09-04-2004 04:02 PM

Quote:

Originally posted by utanja
yes i believe you are correct ...however i have yet to be able to use sh NVIDIA-xxxx.run without the headers....i have try with the sym link to /usr/src/linux and it does not work for me....

this is my sym link target ..../usr/src/kernel-source-2.6.8:confused:

Hmm that is a strange one I use the Nvidia drivers with the kernel source linked and it finds them without problems.
Code:

>$ ls -l /usr/src/linux
lrwxrwxrwx  1 stephen src 11 2004-09-03 12:53 /usr/src/linux -> linux-2.6.8

As you can see I use the kernel.org sources with the ck patches but that should make no difference. I still compile the headers as well so I can install them on my other machines if necessary. What error do you get? About the only thing I can think of that may be causing you problems is the build directory for your running kernel not being linked properly.

Code:

>$ ls -l /lib/modules/2.6.8.1-ck6/build
lrwxrwxrwx  1 root root 20 2004-09-03 13:20 /lib/modules/2.6.8.1-ck6/build -> /usr/src/linux-2.6.8


utanja 09-04-2004 04:19 PM

would your renaming kernel-source -2.6.8.xxxx to linux-2.6.8 be the reason?

HappyTux 09-04-2004 05:06 PM

Quote:

Originally posted by utanja
would your renaming kernel-source -2.6.8.xxxx to linux-2.6.8 be the reason?
The directory name came from the kernel.org source that is how they name it and is what gets created when I extract the tarball, your name came from the Debian source that you downloaded and extracted. The different names should have nothing to do with any problems it would be the links that are in place. The Nvidia driver looks for the /usr/src/linux link and/or the /lib/modules/2.6.8.???/build one as I understand it if they are present it should build without problems or it always has here at least. It is basically a 30 second procedure from the time I have booted the new kernel compiled the driver then restarting KDM so I can login. Can you show us the links and detail the steps you are taking when you compile, install the kernel and then compile the driver after booting the new kernel?

utanja 09-04-2004 07:37 PM

i must have make typo mistake or something because now it work according to your method....

i have always use debian kernel....is there advantage to kernel .org ?...if so what advantage?

thank you so much for the help.....i hope to be able tocontribute as much help as i get...:)

HappyTux 09-04-2004 08:53 PM

Quote:

Originally posted by utanja
i must have make typo mistake or something because now it work according to your method....

i have always use debian kernel....is there advantage to kernel .org ?...if so what advantage?

thank you so much for the help.....i hope to be able tocontribute as much help as i get...:)

Your welcome and good to hear you got it going. The difference between Debian kernels and the Kernel.org is Debian patches their kernels. The advantage of this is if you are using an older kernel on your Debian machine with the latest sources/binary for the old kernel from the archives then you have one that has been patched for any security vulnerabilities that have been announced whereas with Kernel.org if you download an older kernel then you get the vulnerability with it. The disadvantage to using a Debian kernel is that they remove certain drivers that do not meet the Debian Free Software Guidelines thus if you need that driver then you are out of luck then you have to go and compile from the Kernel.org sources to get the support you need.

utanja 09-06-2004 12:18 PM

thank you so much for the information....sorry i could not reply (hurricane frances) till now..so please do not consider me to be rude...:)

i understand the difference now...thank you so much...


All times are GMT -5. The time now is 01:34 AM.