[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howtos:slackware_admin:kernelbuilding [2012/10/01 17:12 (UTC)] – capitalized the "S" in "source" (title) tommychowtos:slackware_admin:kernelbuilding [2018/03/05 20:59 (UTC)] (current) – fix typo bifferos
Line 33: Line 33:
 Changing the "''linux''" symbolic link is safe to do. No applications will break if you let it point to another kernel than the one Slackware installed for you. You will probably notice more linux-* directories in ''/usr/src''. It is common to let the "''linux''" link point to the kernel you are currently working with. It is however no //requirement// to have this symbolic link. Modern software that needs to know the location of the source code of an installed kernel will look at where the symbolic link ''/lib/modules/<kernelversion>/build'' points to instead. Changing the "''linux''" symbolic link is safe to do. No applications will break if you let it point to another kernel than the one Slackware installed for you. You will probably notice more linux-* directories in ''/usr/src''. It is common to let the "''linux''" link point to the kernel you are currently working with. It is however no //requirement// to have this symbolic link. Modern software that needs to know the location of the source code of an installed kernel will look at where the symbolic link ''/lib/modules/<kernelversion>/build'' points to instead.
  
-<note>There is a debate whether you should build your kernels in the ''/usr/src'' tree or somewhere entirely else.\\ The cause is an [[http://uwsg.iu.edu/hypermail/linux/kernel/0007.3/0587.html|old post by Linus Torvalds]] (from July 2000) where he advises people to build from within their home directory. I believe this advice is irrelevant for Slackware and the way it has it'kernel headers and glibc package setup. So, **my** advice is to ignore this old post by Linus and install your kernel sources into ''/usr/src'' if you want. The kernel building location is purely a matter of personal preference.</note>+<note>There is a debate whether you should build your kernels in the ''/usr/src'' tree or somewhere entirely else.\\ The cause is an [[http://uwsg.iu.edu/hypermail/linux/kernel/0007.3/0587.html|old post by Linus Torvalds]] (from July 2000) where he advises people to build from within their home directory. I believe this advice is irrelevant for Slackware and the way it has its kernel headers and glibc package setup. So, **my** advice is to ignore this old post by Linus and install your kernel sources into ''/usr/src'' if you want. The kernel building location is purely a matter of personal preference.</note>
  
 Now, get a Slackware kernel config file for a head start during your own configuring. Pat's config files are pretty generic. By the time you read this, there might be a config for a newer 2.6 release available: Now, get a Slackware kernel config file for a head start during your own configuring. Pat's config files are pretty generic. By the time you read this, there might be a config for a newer 2.6 release available:
Line 153: Line 153:
 Kernel Panic-not syncing: VFS: unable to mount root fs on unknown block(8,2) Kernel Panic-not syncing: VFS: unable to mount root fs on unknown block(8,2)
 </code> and this means you will have to build an //initrd// or "Initial Ram Disk" containing the required modules. The location of the initrd is then added in the appropriate section of ''/etc/lilo.conf'' so that the kernel can find it when it boots, and is able to load the drivers it needs to access your disks. </code> and this means you will have to build an //initrd// or "Initial Ram Disk" containing the required modules. The location of the initrd is then added in the appropriate section of ''/etc/lilo.conf'' so that the kernel can find it when it boots, and is able to load the drivers it needs to access your disks.
-Creating an initrd is quite simple, and I will show two cases here, one in care you have a Reiser filesystem on your root partition, and the second for the case you have an ext3 filesystem. I assume a 2.6.37.6 kernel in these example commands, if your new kernel is different, change the version number as appropriate.+Creating an initrd is quite simple, and I will show two cases here, one in case you have a Reiser filesystem on your root partition, and the second for the case you have an ext3 filesystem. I assume a 2.6.37.6 kernel in these example commands, if your new kernel is different, change the version number as appropriate.
  
   * Change into the /boot directory: <code>   * Change into the /boot directory: <code>
Line 260: Line 260:
   * Original source: http://alien.slackbook.org/dokuwiki/doku.php?id=linux:kernelbuilding   * Original source: http://alien.slackbook.org/dokuwiki/doku.php?id=linux:kernelbuilding
   * Originally written by [[wiki:user:alienbob | Eric Hameleers]]   * Originally written by [[wiki:user:alienbob | Eric Hameleers]]
 +
 +====== Also see ======
 +  * If you wish to automate the process, you may want to pull a shell script following the instructions above from [[ https://github.com/jose1711/slackware_stuff/blob/master/build_kernel_slackware.sh | here]]
  
 <!-- Please do not modify anything below, except adding new tags.--> <!-- Please do not modify anything below, except adding new tags.-->
 {{tag>howtos software kernel author_alienbob}} {{tag>howtos software kernel author_alienbob}}
 howtos:slackware_admin:kernelbuilding ()