LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 01-15-2006, 09:55 AM   #1
os2
Member
 
Registered: Dec 2003
Location: Canada
Distribution: openSUSE Tumbleweed
Posts: 209

Rep: Reputation: 30
build kernel


hi

i would like to have choice to boot on suse kernel and a kernel with some change build by me...

Code:
make xconfig
make bzImage
make modules
make modules_install
cp arch/i386/boot/bzImage /boot/bzImage-2.6.13-15.7
cp System.map /boot/System.map-2.6.13-15.7
cp vmlinux /boot/vmlinux-2.6.13-15.7
mkinitrd -k vmlinux-2.6.13-15.7 -i initrd-2.6.13-15.7
in grub
Code:
###kernel standard de suse 10
 title Linux 
 kernel (hd0,4)/boot/vmlinuz root=/dev/hda7 vga=0x314 splash=silent desktop resume=/dev/sda2 showopts 
 initrd (hd0,4)/boot/initrd
 
 ### nnew kernel
 title MyLinux-2.6.13-15.7
 kernel (hd0,6)/boot/bzImage-2.6.13-15.7 root=/dev/hda7 vga=0x314 splash=silent desktop resume=/dev/sda2 showopts
 initrd (hd0,6)/boot/initrd-2.6.13-15.7
it's is the correct way?

thanks
 
Old 01-15-2006, 10:42 AM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Not sure if this is a procedure you are telling us or need some question answered. In the 2.6 kernel things have been changed.

run ' make xconfig ' or others to configure kernel options
run ' make ' it now does both make bzImage and make modules
run ' make modules_install ' to install modules
then run ' make install ' to do the rest of of the following and add the boot line to your grub. cp arch/i386/boot/bzImage /boot/bzImage-2.6.13-15.7, cp System.map /boot/System.map-2.6.13-15.7, cp vmlinux /boot/vmlinux-2.6.13-15.7, mkinitrd -k vmlinux-2.6.13-15.7 -i initrd-2.6.13-15.7

So for a complete install from start to finish and ready to boot.
make xconfig
make
make modules_install
make install

Reboot

And if you are using rpms then running the command ' make rpm ' will make an rpm file of the kernel.

Last edited by Brian1; 01-15-2006 at 10:44 AM.
 
Old 01-27-2006, 11:37 PM   #3
os2
Member
 
Registered: Dec 2003
Location: Canada
Distribution: openSUSE Tumbleweed
Posts: 209

Original Poster
Rep: Reputation: 30
i read that: make install

"This command will also replace old symlinks pointing to the default kernel with the new ones. However Failsafe GRUB option menu should point to the old and ~&trusty kernel. You can eaither correct this with the steps from ad 17, or you can modify GRUB menu.lst file. This is entirely up to you"
 
Old 02-04-2006, 12:19 AM   #4
os2
Member
 
Registered: Dec 2003
Location: Canada
Distribution: openSUSE Tumbleweed
Posts: 209

Original Poster
Rep: Reputation: 30
why some tutorial said to modify makefile EXTRAVERSION number?
 
Old 02-04-2006, 08:44 PM   #5
broch
Member
 
Registered: Feb 2005
Distribution: Slackware-current 64bit
Posts: 465

Rep: Reputation: 32
no this is not correct way.
If you want to have several versions of kernel 2.6.13.15, you will simply overwrite kernels if you do not modify .config file.

However this is pretty easy to do.
When done with kernel configuration: make xconfig (or such)
edit .config file and modify this line:
CONFIG_LOCALVERSION=""
eg
CONFIG_LOCALVERSION="-spanking_new_kernel"
pay attention to the hyphen at the beginning

now your kernel will be named: vmlinuz-2.6.13.15-spanking_new_kernel
and what's important, you will create (instead of overwriting old one) new entry in
/lib/modules
in this case
/lib/modules/2.6.13.15-spanking_new_kernel

this way each kernel will be independent

Last edited by broch; 02-04-2006 at 08:47 PM.
 
Old 02-05-2006, 08:57 PM   #6
os2
Member
 
Registered: Dec 2003
Location: Canada
Distribution: openSUSE Tumbleweed
Posts: 209

Original Poster
Rep: Reputation: 30
thanks a lot, i will test your solution
 
Old 02-05-2006, 09:27 PM   #7
broch
Member
 
Registered: Feb 2005
Distribution: Slackware-current 64bit
Posts: 465

Rep: Reputation: 32
this is my whole howto about building custom kernel. You can test it too:
http://wiki.suselinuxsupport.de/wikk...gacustomKernel
 
Old 02-06-2006, 10:54 AM   #8
os2
Member
 
Registered: Dec 2003
Location: Canada
Distribution: openSUSE Tumbleweed
Posts: 209

Original Poster
Rep: Reputation: 30
ok i checked your tutorial

if i want to keep old kernel, i don't need to do
Code:
#rm /boot/vmlinuz
#rm /boot/initrd
 
Old 02-06-2006, 02:30 PM   #9
broch
Member
 
Registered: Feb 2005
Distribution: Slackware-current 64bit
Posts: 465

Rep: Reputation: 32
these are symlinks, I have explained why you should remove them or what to do if you dont want to remove them assuming that yo are using "make install" command

However if you don ton use "make install" command then old symlinks are not replaced and are still pointing to the old working kernel. I assume that you know what symlinks are?

Otherwise, it is up to you

Personally, I dont care about symlinks because GRUB points to the real kernel so changing symlinks will not affect failsafe (to boot old working kernel).

I hope that this is clear?
 
Old 02-08-2006, 09:27 AM   #10
os2
Member
 
Registered: Dec 2003
Location: Canada
Distribution: openSUSE Tumbleweed
Posts: 209

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by broch
no this is not correct way.

However this is pretty easy to do.
When done with kernel configuration: make xconfig (or such)
edit .config file and modify this line:
CONFIG_LOCALVERSION=""
eg
CONFIG_LOCALVERSION="-spanking_new_kernel"
pay attention to the hyphen at the beginning
why in your tutorial you said

"Now very important: edit Makefile and add/change the line:
EXTRAVERSION = -unique_name (pay attention to "-" sybmol in front of the name)"
 
Old 02-08-2006, 11:24 AM   #11
broch
Member
 
Registered: Feb 2005
Distribution: Slackware-current 64bit
Posts: 465

Rep: Reputation: 32
I explained this in my tutorial.
Let's say that you have SuSE WORKING default kernel. Now you want to customize it. So you install sources, configure it and install. If you do not change the internal kernel name and you will run make modules_nstall, this will overwrite default modules in
/lib/modules
So if you messed up something (and let's say file system module will not start), you are "done". Because you did in fact overwrite modules it really does not matter if you will try to boot default or customized kernel your modules are fck up because kernel (whatever name you added after compaling) will still refer to the internal name to look for modules.
The fact that later you change the name of vmlinuz does not matter: this is too late and only takes care of vmlinuz, not modules.

If you want to experiment and have several custom kernels built from the same source, only the last one's modules are on the disk.

Changing the internal/local name is pretty easy.
 
Old 02-08-2006, 11:30 AM   #12
os2
Member
 
Registered: Dec 2003
Location: Canada
Distribution: openSUSE Tumbleweed
Posts: 209

Original Poster
Rep: Reputation: 30
not very clear to me

does i need to change only CONFIG_LOCALVERSION? or EXTRAVERSION too?

does i need to put the same name for both?
 
Old 02-08-2006, 03:24 PM   #13
broch
Member
 
Registered: Feb 2005
Distribution: Slackware-current 64bit
Posts: 465

Rep: Reputation: 32
this is what I have written:
Quote:
edit .config file and modify this line:
CONFIG_LOCALVERSION=""
eg
CONFIG_LOCALVERSION="-spanking_new_kernel"
EXTRAVERSION is hmmm EXTRAVERSION
for example kernel version 2.6.16
EXTRAVERSION git2-rc3-200620120999865
EXTRAVERSION is added by kernel maintainer
 
Old 02-10-2006, 10:55 AM   #14
os2
Member
 
Registered: Dec 2003
Location: Canada
Distribution: openSUSE Tumbleweed
Posts: 209

Original Poster
Rep: Reputation: 30
thank broch, that work fine....

i have another question for you.... before i build a new kernel, i was a module for vmware player...

now if i start my old kernel and new kernel, vmware said me it's not installed for this kernel...
i think it's only a link problem...

Code:
0 lrwxrwxrwx   1 root root   17 2005-12-22 11:35 linux -> linux-2.6.13-15.7
0 drwxr-xr-x   3 root root   72 2005-12-22 11:35 linux-2.6.13-15
1 drwxr-xr-x  20 root root 1400 2006-02-08 22:53 linux-2.6.13-15.7
0 drwxr-xr-x   3 root root   72 2005-11-29 15:39 linux-2.6.13-15.7-obj
0 lrwxrwxrwx   1 root root   21 2005-12-22 11:35 linux-obj -> linux-2.6.13-15.7-obj
0 drwxr-xr-x   7 root root  168 2005-12-12 22:37 packages


1 drwxr-xr-x  5 root root 536 2006-02-04 15:53 2.6.13-15.7-default
1 drwxr-xr-x  3 root root 488 2006-02-08 22:49 2.6.13-test1-15.7-default_os2_1
0 drwxr-xr-x  3 root root  88 2006-01-17 02:46 precompiled
0 drwxr-xr-x  3 root root 104 2005-11-29 16:52 scripts


   0 lrwxrwxrwx  1 root root       1 2006-01-15 23:41 boot -> .
  64 -rw-r--r--  1 root root   63904 2005-11-29 16:51 config-2.6.13-15.7-default
   1 drwxr-xr-x  2 root root    1024 2006-02-08 23:00 grub
   0 lrwxrwxrwx  1 root root      42 2006-02-08 22:53 initrd -> initrd-2.6.13-test1-15.7-default_os2_1
1827 -rw-r--r--  1 root root 1861037 2006-01-17 02:46 initrd-2.6.13-15.7-default
1302 -rw-r--r--  1 root root 1325147 2006-01-17 02:34 initrd-2.6.13-15.7-default_new
1302 -rw-r--r--  1 root root 1325123 2006-01-17 00:54 initrd-2.6.13-15.7-default.old
1829 -rw-r--r--  1 root root 1862957 2006-02-08 22:53 initrd-2.6.13-test1-15.7-default_os2_1
  12 drwx------  2 root root   12288 2005-12-12 22:30 lost+found
 132 -rw-------  1 root root  133632 2006-01-17 02:34 message
  73 -rw-r--r--  1 root root   73528 2005-11-29 16:53 symvers-2.6.13-15.7-i386-default.gz
 743 -rw-r--r--  1 root root  756641 2005-11-29 16:36 System.map-2.6.13-15.7-default
 726 -rw-r--r--  1 root root  738450 2006-01-16 23:52 System.map-2.6.13-15.7-default_new
 725 -rw-r--r--  1 root root  737623 2006-02-08 22:01 System.map-2.6.13-test1-15.7-default_os2_1
1804 -rw-r--r--  1 root root 1839103 2005-11-29 16:51 vmlinux-2.6.13-15.7-default.gz
   0 lrwxrwxrwx  1 root root      43 2006-02-08 22:53 vmlinuz -> vmlinuz-2.6.13-test1-15.7-default_collinm_1
1513 -rw-r--r--  1 root root 1541452 2005-11-29 16:36 vmlinuz-2.6.13-15.7-default
1506 -rw-r--r--  1 root root 1534273 2006-01-16 23:52 vmlinuz-2.6.13-15.7-default_new
1506 -rw-r--r--  1 root root 1534648 2006-02-08 22:01 vmlinuz-2.6.13-test1-15.7-default_os2_1
when i need to build a module like when we install ati or nvidia driver... there a surely a way to said build it for the new and old kernel....
any idea?

Last edited by os2; 02-10-2006 at 11:08 AM.
 
Old 02-10-2006, 04:39 PM   #15
broch
Member
 
Registered: Feb 2005
Distribution: Slackware-current 64bit
Posts: 465

Rep: Reputation: 32
unfortunately, nvidia must be recompiled each time you change kernel..
nvidia allow to be installed on working kernel or any other installed kernel, but only one.

I don't have experience with vmware, but it is possible that you will have the same problem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
10.1 install kernel and kernel-source different - build fails Feebles Mandriva 2 06-10-2005 06:58 PM
kernel-source-2.6.5-7.src.rpm requires kernel-dummy to build!? fizzdandantilus SUSE / openSUSE 5 12-02-2004 12:48 PM
New FAQ topic: Should I edit my kernel configuration?/Should I build a custom kernel? chort *BSD 10 09-10-2004 11:15 PM
Unable to build NVIDIA kernel module / determin kernel version Night Ink Fedora 2 05-31-2004 04:54 PM
Cant run X/KDM after new kernel build, even on old kernel bbska Slackware 2 02-25-2004 10:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 06:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration