Jump to content
  • 0
adcdam

i build a kernel from source but need help

Question

i did make menuconfig with linux-4.2.0-gentoo-r1 kernel, after selecting the options in the  menu, i did make && make modules_install, after that i did boot-update -v but it only appears the older kernel,

so i can not see the new kernel in the grub menu what i am missing? 
               

Share this post


Link to post
Share on other sites

10 answers to this question

Recommended Posts

  • 0

 

in my /boot dir i have this now

 

System.map-4.2.0-gentoo-r1.old                       2.9 M                         

  config-4.2.0-gentoo-r1                                96 K 

  config-4.2.0-gentoo-r1.old                            96 K                                            

  initramfs-3.2.6-pf.img                               3.6 M  

  vmlinuz-4.2.0-gentoo-r1                              5.1 M  

  vmlinuz-4.2.0-gentoo-r1.old                          5.1

 

So you would probably want to put:

kernel vmlinuz[-v]-gentoo-r1

 

 

here is my /etc/boot.conf

 

boot {

        generate grub

        default "Funtoo Linux"

        timeout 3

}

 

"Funtoo Linux" {

        kernel bzImage[-v]

}

 

"Funtoo Linux genkernel" {

        kernel kernel[-v]

        initrd initramfs[-v]

        params += real_root=auto

}

What's wrong with this picture?

I don't know how you could have gotten a "menu entry" for the "new kernel", boot-update CANNOT find an entry in boot.conf to match a kernel called  vmlinuz-4.2.0-gentoo-r1, so it doesn't know what to do with it.

 

 

 i used dracut and now i have a initramfs-4.2.0-gentoo-r1.img file

Ditto.

Share this post


Link to post
Share on other sites
  • 0

Thanks

i installed dracut but i dont know how to use it                                                 

 

in my /boot dir i have this now

 

System.map-4.2.0-gentoo-r1.old                       2.9 M                         
  config-4.2.0-gentoo-r1                                96 K 
  config-4.2.0-gentoo-r1.old                            96 K                                            
  initramfs-3.2.6-pf.img                               3.6 M  

  vmlinuz-4.2.0-gentoo-r1                              5.1 M  
  vmlinuz-4.2.0-gentoo-r1.old                          5.1

 

 

 

After doing boot update i get this

 

boot-update  1.7.2 /
Copyright 2009-2015 Funtoo Technologies

 [use option "-l" for license info, "-h" for help]

 * Generating config for grub...

 DEFAULT > Funtoo Linux genkernel - kernel-debian-sources-x86_64-3.19.3-1~exp1
 * NOTE : Detected MBR boot. Configuring for Legacy MBR booting.
 * Completed successfully.
 

Share this post


Link to post
Share on other sites
  • 0

You should have System.map-4.2.0-gentoo-r1 also, so there is a problem there.  You made one originally which has been renamed .old, so not sure how you skipped that.  You haven't used an initramfs creation program, so of course you are missing that too.  It's not necessarily needed but usually easiest to just make one.  Finally your boot.conf is faulty and that is why it is not updating grub with the new kernel.  Except for those things, everything's perfect :)

Rather than reinvent the wheel I refer you to these wiki pages:

kernel

initramfs

boot-update

Here is a partial listing of my boot.conf:

boot {
	generate grub
	default " Funtoo" 
	timeout 3 
}
display {
	gfxmode 1440x900x32
	background /boot/grub-startup.png
}
" Funtoo" {
	kernel vmlinuz[-v]
	initrd /initramfs-funtoo[-v]
	params quiet
	params += splash
	params += rootfstype=auto
	params += resume=LABEL=swap
	params += root=auto
}

Note the use of the wildcard [-v], matching all version numbers.  The names of your kernel and initramfs should match the names in boot.conf.  For example in /boot I have:

-rw-r--r-- 1 root root  125284 Oct  2 05:42 config-4.2.2
-rw-r--r-- 1 root root  125284 Oct  6 02:07 config-4.2.3
-rw-r--r-- 1 root root  434118 Jun 10  2013 grub-startup.png
-rw------- 1 root root 8353688 Oct  2 05:48 initramfs-funtoo-4.2.2
-rw------- 1 root root 8704764 Oct  6 02:13 initramfs-funtoo-4.2.3
-rw-r--r-- 1 root root 3502533 Oct  2 05:42 System.map-4.2.2
-rw-r--r-- 1 root root 3502700 Oct  6 02:07 System.map-4.2.3
-rw-r--r-- 1 root root 7565488 Oct  2 05:42 vmlinuz-4.2.2
-rw-r--r-- 1 root root 7566576 Oct  6 02:07 vmlinuz-4.2.3

Share this post


Link to post
Share on other sites
  • 0

So you would probably want to put:

kernel vmlinuz[-v]-gentoo-r1

for the kernel, since that's the name it's given when you compile it, any name you like for the initramfs, you can designate that when you create it with dracut.  Give it a heading name (where I've used " Funtoo") and it co-exists with whatever else you've got in boot.conf.  Pick one for the default boot.  It's all quite easy once you've done it once, you'll never have a problem again.  Especially compared to configuring the kernel, if you've got past that, you're gonna breeze thru this.

Have fun.

Share this post


Link to post
Share on other sites
  • 0

Hi thanks a lot for your help i can not make a menu entry for grub 2 for the new kernel, i have a dual boot, with arch linux and funtoo, the grub is installed with arch, i used os-prober.

 

here is my /etc/boot.conf

 

boot {
        generate grub
        default "Funtoo Linux"
        timeout 3
}

"Funtoo Linux" {
        kernel bzImage[-v]
}

"Funtoo Linux genkernel" {
        kernel kernel[-v]
        initrd initramfs[-v]
        params += real_root=auto
}

"Funtoo Linux better-initramfs" {
        kernel vmlinuz[-v]
        initrd /initramfs.cpio.gz
}

 i have the System.map-4.2.0-gentoo-r1 file that was missing, i used dracut and now i have a initramfs-4.2.0-gentoo-r1.img file

and now after boot-update i got this:

 

* Generating config for grub...

 DEFAULT > Funtoo Linux genkernel - kernel-debian-sources-x86_64-3.19.3-1~exp1
           Funtoo Linux better-initramfs - vmlinuz-4.2.0-gentoo-r1
 * NOTE : Detected MBR boot. Configuring for Legacy MBR booting.
 * WARN : No boot/default match found - using first boot entry by default.
 * Completed successfully with warnings.
 

i dont know what to do now.

Share this post


Link to post
Share on other sites
  • 0

i did make menuconfig with linux-4.2.0-gentoo-r1 kernel, after selecting the options in the  menu, i did make && make modules_install, after that i did boot-update -v but it only appears the older kernel,

so i can not see the new kernel in the grub menu what i am missing? 

               

make sure /boot is mounted

cd /usr/src/linux

cp arch/x86/boot/bzImage /boot/<new-name>

Share this post


Link to post
Share on other sites
  • 0

Hi I installed grub again but this time from funtoo, now i have the menu entry of the new kernel, but it doesnt boot and go into a kernel panic, one thing that i dont understand in the funtoo page it say that scsi sata and or ata controllers should go as build in but the kernel that works 3.19 has those as modules.

Share this post


Link to post
Share on other sites
  • 0

Thanks again i found out that that i didnt mount the boot partition!!! i did all over again and now the new kernel boot but i have no x, it say no nvidia modules found, where is the nvidia module in menu config?

Share this post


Link to post
Share on other sites
  • 0

it works!!! it works!!!! i installed the nvidia drivers and now it works! it also consume less ram 111mb of ram with bspwm tilling window manager vs 123 mb of the debian sources kernel. Thanks to both Sputnik and Whiteghost!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...