custom kernel install - query
Hi all I am trying to install new custom kernel in my ubundu. I am able to see "vmlinuz-2.6.x.x-custom-velan" and System.map-2.6.x.x-custom-velan in my /boot after #make-kpkg --initrd --append-to-version=-custom_velan kernel_image kernel_headers i don;t see initrd for this new custom kernel in /boot and also no entry is created in /boot/grub/grub.cfg. I also don't see any new file "menu.lst" in /boot/grub directory. I am using generic kernel as below. root@ubuntu:/usr/src/linux# uname -a Linux ubuntu 2.6.32-24-generic #39-Ubuntu SMP Wed Jul 28 05:14:15 UTC 2010 x86_64 GNU/Linux Can you throw some light on this. -- Regards, S. Sengottuvelan.
Hi On Mon, Dec 20, 2010 at 08:23, Sengottuvelan S <sengottuvelan.s@gmail.com> wrote:
Hi all
I am trying to install new custom kernel in my ubundu. I am able to see "vmlinuz-2.6.x.x-custom-velan" and System.map-2.6.x.x-custom-velan in my /boot after #make-kpkg --initrd --append-to-version=-custom_velan kernel_image kernel_headers
never use make-kpkg by myself, but after reading http://man.he.net/man1/make-kpkg, IMO you need to study about "kernel_image" target. Seems it will be the one you needed. NB: even without make-kpkg, now kernel has "make deb-pkg" target...seems it will fit your need too. -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
On 12/19/2010 9:25 PM, Mulyadi Santosa wrote:
Hi
On Mon, Dec 20, 2010 at 08:23, Sengottuvelan S <sengottuvelan.s@gmail.com> wrote:
Hi all
I am trying to install new custom kernel in my ubundu. I am able to see "vmlinuz-2.6.x.x-custom-velan" and System.map-2.6.x.x-custom-velan in my /boot after #make-kpkg --initrd --append-to-version=-custom_velan kernel_image kernel_headers
never use make-kpkg by myself, but after reading http://man.he.net/man1/make-kpkg, IMO you need to study about "kernel_image" target. Seems it will be the one you needed.
NB: even without make-kpkg, now kernel has "make deb-pkg" target...seems it will fit your need too.
make-kpg kernel_image kernel_headers will make debs in the folder above the source tree when done and you will need to go install those manually (sudo dpkg -i linux-image-2.6.37-rc6-customwhatever.deb) and then you should be set. I have noticed that on Ubuntu 10.10 there is no menu.lst for grub and I have no idea how to update it. Thankfully, using dpkg to install the kernel updates grub for you. I have been having an issue with grub not displaying the menu on i386 and booting the first entry, but on x86_64 it's displaying a list. Hope that helps -- -Dexter Haslem
On 20 December 2010 13:52, Dexter Haslem <dexter.haslem@gmail.com> wrote:
On 12/19/2010 9:25 PM, Mulyadi Santosa wrote:
Hi
On Mon, Dec 20, 2010 at 08:23, Sengottuvelan S
I have noticed that on Ubuntu 10.10 there is no menu.lst for grub
<snip>
Ubuntu 10.10 uses Grub2, which has a different way of managing bootloaders, see this article for more info: https://help.ubuntu.com/community/Grub2
Hi Dexter, On Mon, Dec 20, 2010 at 07:52, Dexter Haslem <dexter.haslem@gmail.com> wrote:
I have noticed that on Ubuntu 10.10 there is no menu.lst for grub and I have no idea how to update it. Thankfully, using dpkg to install the kernel updates grub for you. I have been having an issue with grub not displaying the menu on i386 and booting the first entry, but on x86_64 it's displaying a list. Hope that helps
On Ubuntu 10.10, you need to update /etc/default/grub and then use 'sudo update-grub' to update your configuration. -- -Harish
On 12/20/2010 9:01 AM, Harish G. Naik wrote:
Hi Dexter,
On Mon, Dec 20, 2010 at 07:52, Dexter Haslem<dexter.haslem@gmail.com> wrote:
I have noticed that on Ubuntu 10.10 there is no menu.lst for grub and I have no idea how to update it. Thankfully, using dpkg to install the kernel updates grub for you. I have been having an issue with grub not displaying the menu on i386 and booting the first entry, but on x86_64 it's displaying a list. Hope that helps
On Ubuntu 10.10, you need to update /etc/default/grub and then use 'sudo update-grub' to update your configuration.
I see, thanks for the info on grub2 guys! If the files were copied to /boot it sounds like the original poster just needs to update grub. I still don't understand how the files got copied tho, I always have to dpkg them myself (not done at the make-kpkg stage) and grub is taken care of then. -- -Dexter Haslem
On Ubuntu 10.10, you need to update /etc/default/grub and then use 'sudo update-grub' to update your configuration.
I see, thanks for the info on grub2 guys! If the files were copied to /boot it sounds like the original poster just needs to update grub. I still don't understand how the files got copied tho, I always have to dpkg them myself (not done at the make-kpkg stage) and grub is taken care of then.
On Ubuntu systems, just follow the following steps for building the new kernel images. Note: I build the kernel image as a ROOT, here. So, I did not use the SUDO. 1) Download the required kernel version TAR ball from the www.kernel.org and extract it in the /usr/src directory. 2) Change into the newly created directory. 3) Build the kernel with the following set of commands from /usr/src/linux directory. Here the linux is a link to the newly created directory. 4) Then run the following commands. # make mrproper # make clean # make menuconfig - Just exit from the GUI menu by pressing YES. # make prepare # make menuconfig - Do the modifications, whatever you want. # make clean # make bzImage (capital L letter in bzImage) # make modules # make modules_install # make install Then, build the initrd file with the following command from anywhere, however you need to copy the build initrd file explicitly to the /boot directory. # mkinitramfs -o initrd-img-kernel-version kernel-version Finally, update the grub with the following command from /boot directory and restart the system. By default it boots into the newly build kernel image. # update-grub For more information on Grub follow the link https://help.ubuntu.com/community/Grub2 Thanks and Regards, Srinivas G
Hi Srinivas, Even doing update-grub command , I was not able to see new menu-entry in /boot/grub/grub.cfg . Somehow , "update-grub" not catching "* initrd-img-2.6.35.9-custom"* in the boot Any help on this highly appreciated root@ubuntu:/boot# ls abi-2.6.32-24-generic memtest86+.bin config-2.6.32-24-generic System.map-2.6.32-24-generic config-2.6.35.9 System.map-2.6.35.9 grub vmcoreinfo-2.6.32-24-generic initrd.img-2.6.32-24-generic vmlinuz-2.6.32-24-generic *initrd-img-2.6.35.9-custom* vmlinuz-2.6.35.9 initrd-img-kernel-2.6.35.9 root@ubuntu:/boot# update-grub Generating grub.cfg ... Found linux image: /boot/vmlinuz-2.6.35.9 Found linux image: /boot/vmlinuz-2.6.32-24-generic *Found initrd image: /boot/initrd.img-2.6.32-24-generic *Found Microsoft Windows XP Professional on /dev/sda2 done root@ubuntu:/boot# On Mon, Dec 20, 2010 at 8:33 PM, Srinivas G. < srinivasg@esntechnologies.co.in> wrote:
On Ubuntu 10.10, you need to update /etc/default/grub and then use 'sudo update-grub' to update your configuration.
I see, thanks for the info on grub2 guys! If the files were copied to /boot it sounds like the original poster just needs to update grub. I still don't understand how the files got copied tho, I always have to dpkg them myself (not done at the make-kpkg stage) and grub is taken care of then.
On Ubuntu systems, just follow the following steps for building the new kernel images.
Note: I build the kernel image as a ROOT, here. So, I did not use the SUDO.
1) Download the required kernel version TAR ball from the www.kernel.org and extract it in the /usr/src directory. 2) Change into the newly created directory. 3) Build the kernel with the following set of commands from /usr/src/linux directory. Here the linux is a link to the newly created directory. 4) Then run the following commands. # make mrproper # make clean # make menuconfig - Just exit from the GUI menu by pressing YES. # make prepare # make menuconfig - Do the modifications, whatever you want. # make clean # make bzImage (capital L letter in bzImage) # make modules # make modules_install # make install
Then, build the initrd file with the following command from anywhere, however you need to copy the build initrd file explicitly to the /boot directory. # mkinitramfs -o initrd-img-kernel-version kernel-version
Finally, update the grub with the following command from /boot directory and restart the system. By default it boots into the newly build kernel image. # update-grub
For more information on Grub follow the link https://help.ubuntu.com/community/Grub2
Thanks and Regards, Srinivas G
-- Regards, S. Sengottuvelan.
root@ubuntu:/boot# ls abi-2.6.32-24-generic memtest86+.bin config-2.6.32-24-generic System.map-2.6.32-24-generic config-2.6.35.9 System.map-2.6.35.9 grub vmcoreinfo-2.6.32-24-generic initrd.img-2.6.32-24-generic vmlinuz-2.6.32-24-generic initrd-img-2.6.35.9-custom vmlinuz-2.6.35.9 initrd-img-kernel-2.6.35.9 root@ubuntu:/boot# update-grub Generating grub.cfg ... Found linux image: /boot/vmlinuz-2.6.35.9 Found linux image: /boot/vmlinuz-2.6.32-24-generic Found initrd image: /boot/initrd.img-2.6.32-24-generic Found Microsoft Windows XP Professional on /dev/sda2 done root@ubuntu:/boot#
Hi Sengottuvelan, Can you rename the initrd file to initrd-img-2.6.35.9 from initrd-img-2.6.35.9-custom. For other files, like System.map and config, they do not have the -custom extension. So, just remove the -custom from your initrd and run the update-grub command again. Thanks and Regards, Srinivas G
This may be useful. Please recheck how you are building the kernel and installing to system. https://help.ubuntu.com/community/Kernel/Compile *- Bharath H S* On Wed, Dec 22, 2010 at 11:12 AM, Srinivas G. < srinivasg@esntechnologies.co.in> wrote:
root@ubuntu:/boot# ls abi-2.6.32-24-generic memtest86+.bin config-2.6.32-24-generic System.map-2.6.32-24-generic config-2.6.35.9 System.map-2.6.35.9 grub vmcoreinfo-2.6.32-24-generic initrd.img-2.6.32-24-generic vmlinuz-2.6.32-24-generic initrd-img-2.6.35.9-custom vmlinuz-2.6.35.9 initrd-img-kernel-2.6.35.9 root@ubuntu:/boot# update-grub Generating grub.cfg ... Found linux image: /boot/vmlinuz-2.6.35.9 Found linux image: /boot/vmlinuz-2.6.32-24-generic Found initrd image: /boot/initrd.img-2.6.32-24-generic Found Microsoft Windows XP Professional on /dev/sda2 done root@ubuntu:/boot#
Hi Sengottuvelan,
Can you rename the initrd file to initrd-img-2.6.35.9 from initrd-img-2.6.35.9-custom. For other files, like System.map and config, they do not have the -custom extension. So, just remove the -custom from your initrd and run the update-grub command again.
Thanks and Regards, Srinivas G
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
Yes. Finally it is working fine. Thanks ton. :-) On Wed, Dec 22, 2010 at 8:15 AM, Bharath H S <bhslinker@gmail.com> wrote:
This may be useful. Please recheck how you are building the kernel and installing to system. https://help.ubuntu.com/community/Kernel/Compile
*- Bharath H S*
On Wed, Dec 22, 2010 at 11:12 AM, Srinivas G. < srinivasg@esntechnologies.co.in> wrote:
root@ubuntu:/boot# ls abi-2.6.32-24-generic memtest86+.bin config-2.6.32-24-generic System.map-2.6.32-24-generic config-2.6.35.9 System.map-2.6.35.9 grub vmcoreinfo-2.6.32-24-generic initrd.img-2.6.32-24-generic vmlinuz-2.6.32-24-generic initrd-img-2.6.35.9-custom vmlinuz-2.6.35.9 initrd-img-kernel-2.6.35.9 root@ubuntu:/boot# update-grub Generating grub.cfg ... Found linux image: /boot/vmlinuz-2.6.35.9 Found linux image: /boot/vmlinuz-2.6.32-24-generic Found initrd image: /boot/initrd.img-2.6.32-24-generic Found Microsoft Windows XP Professional on /dev/sda2 done root@ubuntu:/boot#
Hi Sengottuvelan,
Can you rename the initrd file to initrd-img-2.6.35.9 from initrd-img-2.6.35.9-custom. For other files, like System.map and config, they do not have the -custom extension. So, just remove the -custom from your initrd and run the update-grub command again.
Thanks and Regards, Srinivas G
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- Regards, S. Sengottuvelan.
On Lunes 20 Diciembre 2010 13:52:07 Dexter Haslem escribió:
I have noticed that on Ubuntu 10.10 there is no menu.lst for grub and I have no idea how to update it. Thankfully, using dpkg to install the kernel updates grub for you. I have been having an issue with grub not displaying the menu on i386 and booting the first entry, but on x86_64 it's displaying a list. Hope that helps
ubuntu now uses grub 2 whose config file is called grub.cfg, but it shoul't be edited by hand. If you wan to edit, you should edit the files in /etc/grub and run update-grub (if you simply wan to add a kernel or an initrd image, just run grub-update and they will be added to grub.cfg)
On Lunes 20 Diciembre 2010 01:23:12 Sengottuvelan S escribió:
Hi all
I am trying to install new custom kernel in my ubundu. I am able to see "vmlinuz-2.6.x.x-custom-velan" and System.map-2.6.x.x-custom-velan in my /boot after #make-kpkg --initrd --append-to-version=-custom_velan kernel_image kernel_headers
i don;t see initrd for this new custom kernel in /boot and also no entry is created in /boot/grub/grub.cfg. I also don't see any new file "menu.lst" in /boot/grub directory.
I am using generic kernel as below.
root@ubuntu:/usr/src/linux# uname -a Linux ubuntu 2.6.32-24-generic #39-Ubuntu SMP Wed Jul 28 05:14:15 UTC 2010 x86_64 GNU/Linux
Can you throw some light on this.
I had the same problem a while ago, make-kpkg doesn't build the initrd file in my debian box. To solve this i had to use mkinitramfs and then, add the initrd file by hand in the grub.conf.
participants (8)
-
Bharath H S -
Daniel Case -
Dexter Haslem -
Harish G. Naik -
Javier Murcia Díaz -
Mulyadi Santosa -
Sengottuvelan S -
Srinivas G.