
Finding it difficult to find someone with the patience to help with this so thought I would try local talent: In the past, whenever I wanted to compile a `new` kernel, I would first up do: # urpmi kernel-source-2.6-n Then do: # urpmi kernel The kernels were not the latest release and of course rpm's were available. Because of my usb concerns I thought I would `install` kernel-2.6-10 - knowing I would have to compile from linux-2.6.10.tar.bz2. So first thing, read the README at least, and straight off I'm lost, though later it looks like my usual one step at a time approach will get there. Here's were I'm lost: "- If you install the full sources, put the kernel tarball in a directory where you have permissions (eg. your home directory) and unpack it" OK - no prob with that. "Do NOT use the /usr/src/linux area! " Again, no prob, sort of covered that, I thought. "- Make sure you have no stale .o files and dependencies lying around: cd linux make mrproper You should now have the sources correctly installed." Huh! But I've only unpacked the bz2 file into my home directory - how can anything be installed at this point? Just in case I'm having a braindead week : "BUILD directory for the kernel: When compiling the kernel all output files will per default be stored together with the kernel source code. **[ Fair enough ]** Using the option "make O=output/dir" allow you to specify an alternate place for the output files (including .config). Example: kernel source code: /usr/src/linux-2.6.N build directory: /home/name/build/kernel ** [ Possibly not something I might require but better remember, just in case ] ** To configure and build the kernel use: cd /usr/src/linux-2.6.N ** WOAH - WAIT UP- where in blue blazes did the directory /usr/src/linux-2.6.N come from - yes. I have directories for previous versions here but certainly not this one yet. So right now I have the bz2 file in my /home/frank/src/ directory, have it unpacked and I thought ready to go????? So I go back and re-read things and find: " If you install the full sources..... " Right back at the beginning. The only file I have found is the bz2 file, how can I have already installed the full sources. I thought they were part and parcel of the bz2 file and as yet had to be installed. Lost - braindead - BOTH. Any one want to do the rear seat kicking here? -- Newbie Seeking USER_FUNCTIONALITY always! Regards SnapafunFrank Big or small, a challenge requires the same commitment to resolve. Registered Linux User # 324213

On Thu, 2005-01-06 at 11:15 +1300, SnapafunFrank wrote:
"- Make sure you have no stale .o files and dependencies lying around:
cd linux make mrproper
You should now have the sources correctly installed."
Huh! But I've only unpacked the bz2 file into my home directory - how can anything be installed at this point?
You have installed the source code for the kernel into your home directory. You achieved this by unpacking the tarball. You haven't actually installed a kernel from that source code yet, but the source code is installed none the less. Inside your home directory now there should be a directory called linux-2.6.10 (or similar)
To configure and build the kernel use: cd /usr/src/linux-2.6.N
** WOAH - WAIT UP- where in blue blazes did the directory /usr/src/linux-2.6.N come from - yes. I have directories for previous versions here but certainly not this one yet.
The linux-2.6.x directory it refers to is the one that you have just unpacked/installed into your home directory. I guess they are using /usr/src in the example because they don't know what your home directory is called. Slightly confusing I agree, being that you were told not to put the source into /usr/src... So you should fine /home/snapafunfrank/linux-2.6.10 (or similar). This is the directory you should CD into.
Right back at the beginning. The only file I have found is the bz2 file, how can I have already installed the full sources. I thought they were part and parcel of the bz2 file and as yet had to be installed.
Lost - braindead - BOTH. Any one want to do the rear seat kicking here?
The bz2 is a tar ball (a collection of files) that contains the full source code for the kernel. You extracted that tarball into your home directory and you are now ready to proceed with the further instructions to compile the kernel. Good luck. -- Matt Brown matt(a)mattb.net.nz Mob +64 275 611 544 www.mattb.net.nz

Hi. I don't "do" Mandrake, so I've no idea what urpmi is doing with the kernel source, but the steps for building a kernel from source are pretty simple. Ignore all this "don't install into /usr/src/linux stuff... it's just advice. I tend to trust signed kernels, and am willing to take the risk involved in building as root. This advice reflects that. 1. Download and unpack your kernel source. You've done that. # cd /usr/src # wget -c ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.10.tar.bz2 # tar -jxvf linux-2.6.10.tar.bz2 At this point, you have a fresh, unconfigured, uncompiled kernel source tree in /usr/src/linux-2.6.10 - feel free to link this to /usr/src/linux as follows: ln -s /usr/src/linux-2.6.10 /usr/src/linux Now /usr/src/linux is a "shortcut" to the full kernel path. This is handy as it saves typing time, and also shows which version you're running. 2. Configure your kernel. This is where you set up your kernel so that it supports your hardware. If you don't understand an option, just leave it at its default setting. # cd /usr/src/linux # make menuconfig <choose all your options and save> 3. Build your kernel - this is where you make your system compile the kernel source into a binary kernel. Assuming you're still in /usr/src/linux: # make && make modules && make modules_install Hopefully, you'll not get any errors during compilation. If you do, you may have enabled an experimental feature, or driver which will not build on your system. go back to step 2, and try again... 4. Install your kernel This is where you copy the compiled kernel to the /boot directory, and setup your boot loader to use it. Again, I'm assuming you're still in /usr/src/linux: # mv arch/i386/boot/bzImage /boot/bzImage-2.6.10 # mv System.map /boot/System.map-2.6.10 As for updating your bootloader, that depends on whether you're using grub or lilo, but you should be able to figure it out by looking at the existing config file for either and adding a new block to use your new kernel. Use common sense, and don't REPLACE the existing block, as if your new kernel won't boot, you'll want to be able to select your old kernel from the bootloader menu. Hope that helps. E&OE. G. On Thu, 2005-01-06 at 11:15 +1300, SnapafunFrank wrote:
Finding it difficult to find someone with the patience to help with this so thought I would try local talent:
In the past, whenever I wanted to compile a `new` kernel, I would first up do:
# urpmi kernel-source-2.6-n
Then do:
# urpmi kernel
The kernels were not the latest release and of course rpm's were available.
Because of my usb concerns I thought I would `install` kernel-2.6-10 - knowing I would have to compile from linux-2.6.10.tar.bz2.
So first thing, read the README at least, and straight off I'm lost, though later it looks like my usual one step at a time approach will get there.
Here's were I'm lost:
"- If you install the full sources, put the kernel tarball in a directory where you have permissions (eg. your home directory) and unpack it"
OK - no prob with that.
"Do NOT use the /usr/src/linux area! "
Again, no prob, sort of covered that, I thought.
"- Make sure you have no stale .o files and dependencies lying around:
cd linux make mrproper
You should now have the sources correctly installed."
Huh! But I've only unpacked the bz2 file into my home directory - how can anything be installed at this point?
Just in case I'm having a braindead week :
"BUILD directory for the kernel:
When compiling the kernel all output files will per default be stored together with the kernel source code. **[ Fair enough ]**
Using the option "make O=output/dir" allow you to specify an alternate place for the output files (including .config). Example: kernel source code: /usr/src/linux-2.6.N build directory: /home/name/build/kernel ** [ Possibly not something I might require but better remember, just in case ] **
To configure and build the kernel use: cd /usr/src/linux-2.6.N
** WOAH - WAIT UP- where in blue blazes did the directory /usr/src/linux-2.6.N come from - yes. I have directories for previous versions here but certainly not this one yet.
So right now I have the bz2 file in my /home/frank/src/ directory, have it unpacked and I thought ready to go?????
So I go back and re-read things and find:
" If you install the full sources..... "
Right back at the beginning. The only file I have found is the bz2 file, how can I have already installed the full sources. I thought they were part and parcel of the bz2 file and as yet had to be installed.
Lost - braindead - BOTH. Any one want to do the rear seat kicking here?

Greig McGill and Matt - and others, care to view my inline understanding and comment ?
Hi.
I don't "do" Mandrake, so I've no idea what urpmi is doing with the kernel source, but the steps for building a kernel from source are pretty simple. Ignore all this "don't install into /usr/src/linux stuff... it's just advice. I tend to trust signed kernels, and am willing to take the risk involved in building as root. This advice reflects that.
What I was missing was that simply unpacking the bz2 tar-ball was in fact installing the sources in the first place, so thanks to Matt that is cleared up and I shall proceed.
1. Download and unpack your kernel source. You've done that. # cd /usr/src # wget -c ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.10.tar.bz2 # tar -jxvf linux-2.6.10.tar.bz2
Nothing wrong with this but if as I have already downloaded the tar-ball then the option for me needed clarification. In this case I will simply: # mv /home/frank/src/linux-2.6.10 /usr/src/ Because I will need to re-compile the kernel later for my modem [ cnet 536 ep ] using linmodem advice. For that I will need the kernel-source to be were such building will find it.
At this point, you have a fresh, unconfigured, uncompiled kernel source tree in /usr/src/linux-2.6.10 - feel free to link this to /usr/src/linux as follows:
ln -s /usr/src/linux-2.6.10 /usr/src/linux
Anyone else reading this with a usable kernel already running might NOT want to do this just yet because a `linux` link already exists to your current kernel. If you are confident that you will not suffer a power outrage or can run a suitable recovery disk if you do have one, then you need to first remove the existing link and then later either rename another or rename the new link once you have finished the new kernel installation. By renaming the new link and reinstating the old link your existing kernel will still be your default until you are happy to make the new one the default - primarily for system reference when installing new modules, etc. I think. Care to clarify this folks ? I have at present eg.: [frank(a)Snapafun frank]$ ls -al /usr/src/ total 32 drwxr-xr-x 8 root root 4096 Jan 6 17:56 ./ drwxr-xr-x 15 root root 4096 Jul 6 2004 ../ lrwxrwxrwx 1 root root 16 Jul 28 19:24 linux -> linux-2.6.3-7mdk/ drwxr-xr-x 18 frank frank 4096 Dec 25 10:35 linux-2.6.10/ lrwxrwxrwx 1 root root 18 Jan 5 02:18 linux.263 -> linux-2.6.3-9mdk-1/ drwxr-xr-x 20 root root 4096 Jul 26 23:00 linux-2.6.3-15mdk-1/ drwxr-xr-x 21 root root 4096 Jan 5 01:46 linux-2.6.3-7mdk/ drwxr-xr-x 4 root root 4096 Jul 26 23:00 linux-2.6.3-9mdk-1/ drwxrwxr-x 19 500 500 4096 Jan 5 01:47 linux-2.6.7/ drwxr-xr-x 7 root root 4096 Jul 28 22:04 RPM/ As you can see, I have POSSIBLY 5 kernels available but two links already in place for my system to reckon with. All previous kernels were installed using urpmi so this is the first attempt by myself to compile from source. By removing for amendment later I hope not to confuse the build scripts. So: # rm /usr/src/linux # ln -s /usr/src/linux-2.6.10 /usr/src/linux
Now /usr/src/linux is a "shortcut" to the full kernel path. This is handy as it saves typing time, and also shows which version you're running.
2. Configure your kernel. This is where you set up your kernel so that it supports your hardware. If you don't understand an option, just leave it at its default setting.
# cd /usr/src/linux # make menuconfig
other options are available here and this newbie is going to try # make xconfig instead - fingers crossed.
<choose all your options and save>
3. Build your kernel - this is where you make your system compile the kernel source into a binary kernel.
Assuming you're still in /usr/src/linux:
# make && make modules && make modules_install
Hopefully, you'll not get any errors during compilation. If you do, you may have enabled an experimental feature, or driver which will not build on your system. go back to step 2, and try again...
4. Install your kernel This is where you copy the compiled kernel to the /boot directory, and setup your boot loader to use it.
Again, I'm assuming you're still in /usr/src/linux:
# mv arch/i386/boot/bzImage /boot/bzImage-2.6.10 # mv System.map /boot/System.map-2.6.10
As for updating your bootloader, that depends on whether you're using grub or lilo, but you should be able to figure it out by looking at the existing config file for either and adding a new block to use your new kernel. Use common sense, and don't REPLACE the existing block, as if your new kernel won't boot, you'll want to be able to select your old kernel from the bootloader menu.
Here I need to identify the new and the old as I mentioned above so: # rm /usr/src/linux # ln -s /usr/src/linux-2.6.3-7mdk /usr/src/linux [ my currently working kernel ] # ln -s /usr/src/linux-2.6.10 /usr/src/linux2610 [ linux2610 being the name I choose to reference and use within lilo.conf ]
Hope that helps.
So now that I have added what it is I am going to do, care to slap my fingers with anything before I push the big green button? To E&OE and Matt - thanks very much for your responses - greatly appreciated and has helped clear things up no end. -- Newbie Seeking USER_FUNCTIONALITY always! Regards SnapafunFrank Big or small, a challenge requires the same commitment to resolve. Registered Linux User # 324213

SnapafunFrank wrote:
Greig McGill and Matt - and others, care to view my inline understanding and comment ? Nothing wrong with this but if as I have already downloaded the tar-ball then the option for me needed clarification. In this case I will simply: # mv /home/frank/src/linux-2.6.10 /usr/src/
Sure, as I implied, there are many ways to do this, you can choose whichever you like. The key is understanding what's being done at each step and why. Once you have the "why", the exact steps don't matter so much, as you can use your knowledge of the process to choose how you'd like to do it. The physical location of the directories matters not a jot in this case. Nothing will (should) ever refer to the location of kernel source as a hard-coded thing.
Because I will need to re-compile the kernel later for my modem [ cnet 536 ep ] using linmodem advice. For that I will need the kernel-source to be were such building will find it.
You can always specify this. It's your system, you can put your sources where you like.
At this point, you have a fresh, unconfigured, uncompiled kernel source tree in /usr/src/linux-2.6.10 - feel free to link this to /usr/src/linux as follows:
ln -s /usr/src/linux-2.6.10 /usr/src/linux
Anyone else reading this with a usable kernel already running might NOT want to do this just yet because a `linux` link already exists to your current kernel. If you are confident that you will not suffer a
Well, it's only source. It really doesn't matter anyway. Nothing depends on this, only the binaries. I'm assuming a level of common sense - "oh, I already have that linked, meh, I'll just use the natural name, or I'll remove the existing link and add a new one".
power outrage or can run a suitable recovery disk if you do have one, then you need to first remove the existing link and then later either rename another or rename the new link once you have finished the new kernel installation. By renaming the new link and reinstating the old link your existing kernel will still be your default until you are happy to make the new one the default - primarily for system reference when installing new modules, etc. I think. Care to clarify this folks ?
Again, this is ONLY THE SOURCE. It has no bearing at all on your currently running kernel. You could delete the lot if you so wished. Once the kernel is installed, you only need your kernel source if you wish to compile something against it - linmodem drivers, or pcmcia-cs etc.
As you can see, I have POSSIBLY 5 kernels available but two links already in place for my system to reckon with. All previous kernels
And again... :) Your kernels live in /boot (or maybe /). NOT in /usr/src - this is only the source used to build the kernel.
# cd /usr/src/linux # make menuconfig
other options are available here and this newbie is going to try # make xconfig instead - fingers crossed.
Sure, that's fine. Didn't know you were aware of it - whatever you're comfortable with. I find menuconfig quicker.
Here I need to identify the new and the old as I mentioned above so:
# rm /usr/src/linux # ln -s /usr/src/linux-2.6.3-7mdk /usr/src/linux [ my currently working kernel ] # ln -s /usr/src/linux-2.6.10 /usr/src/linux2610 [ linux2610 being the name I choose to reference and use within lilo.conf ]
The source tree name, or the link bears no reference to the name of your kernel. Just rename the end product (bzImage) to whatever name you want. THAT FILE is your kernel. Just that file. I find it easiest to leave it named as it is, as your modules tree will be named likewise. This is actually defined in the Makefile, and I wouldn't fiddle with that. :)
Hope that helps.
So now that I have added what it is I am going to do, care to slap my fingers with anything before I push the big green button?
To E&OE and Matt - thanks very much for your responses - greatly appreciated and has helped clear things up no end.
Heh. E&OE means "Errors and Ommissions Excepted", or "I think that's everything, but I'm not responsible if I've missed anything. I'm Greig. Regards, G.

Greig McGill wrote:
SnapafunFrank wrote:
Greig McGill and Matt - and others, care to view my inline understanding and comment ? Nothing wrong with this but if as I have already downloaded the tar-ball then the option for me needed clarification. In this case I will simply: # mv /home/frank/src/linux-2.6.10 /usr/src/
Sure, as I implied, there are many ways to do this, you can choose whichever you like. The key is understanding what's being done at each step and why. Once you have the "why", the exact steps don't matter so much, as you can use your knowledge of the process to choose how you'd like to do it. The physical location of the directories matters not a jot in this case. Nothing will (should) ever refer to the location of kernel source as a hard-coded thing.
Because I will need to re-compile the kernel later for my modem [ cnet 536 ep ] using linmodem advice. For that I will need the kernel-source to be were such building will find it.
You can always specify this. It's your system, you can put your sources where you like.
At this point, you have a fresh, unconfigured, uncompiled kernel source tree in /usr/src/linux-2.6.10 - feel free to link this to /usr/src/linux as follows:
ln -s /usr/src/linux-2.6.10 /usr/src/linux
Anyone else reading this with a usable kernel already running might NOT want to do this just yet because a `linux` link already exists to your current kernel. If you are confident that you will not suffer a
Well, it's only source. It really doesn't matter anyway. Nothing depends on this, only the binaries. I'm assuming a level of common sense - "oh, I already have that linked, meh, I'll just use the natural name, or I'll remove the existing link and add a new one".
power outrage or can run a suitable recovery disk if you do have one, then you need to first remove the existing link and then later either rename another or rename the new link once you have finished the new kernel installation. By renaming the new link and reinstating the old link your existing kernel will still be your default until you are happy to make the new one the default - primarily for system reference when installing new modules, etc. I think. Care to clarify this folks ?
Again, this is ONLY THE SOURCE. It has no bearing at all on your currently running kernel. You could delete the lot if you so wished. Once the kernel is installed, you only need your kernel source if you wish to compile something against it - linmodem drivers, or pcmcia-cs etc.
As you can see, I have POSSIBLY 5 kernels available but two links already in place for my system to reckon with. All previous kernels
And again... :) Your kernels live in /boot (or maybe /). NOT in /usr/src - this is only the source used to build the kernel.
# cd /usr/src/linux # make menuconfig
other options are available here and this newbie is going to try # make xconfig instead - fingers crossed.
Sure, that's fine. Didn't know you were aware of it - whatever you're comfortable with. I find menuconfig quicker.
Here I need to identify the new and the old as I mentioned above so:
# rm /usr/src/linux # ln -s /usr/src/linux-2.6.3-7mdk /usr/src/linux [ my currently working kernel ] # ln -s /usr/src/linux-2.6.10 /usr/src/linux2610 [ linux2610 being the name I choose to reference and use within lilo.conf ]
The source tree name, or the link bears no reference to the name of your kernel. Just rename the end product (bzImage) to whatever name you want. THAT FILE is your kernel. Just that file. I find it easiest to leave it named as it is, as your modules tree will be named likewise. This is actually defined in the Makefile, and I wouldn't fiddle with that. :)
Hope that helps.
So now that I have added what it is I am going to do, care to slap my fingers with anything before I push the big green button?
To E&OE and Matt - thanks very much for your responses - greatly appreciated and has helped clear things up no end.
Heh. E&OE means "Errors and Ommissions Excepted", or "I think that's everything, but I'm not responsible if I've missed anything. I'm Greig.
Regards,
G. _______________________________________________ wlug mailing list | wlug(a)list.waikato.ac.nz Unsubscribe: http://list.waikato.ac.nz/mailman/listinfo/wlug
Thanks Greig, the muddy waters recede more each time. I'm going for it and will report back once done. -- Newbie Seeking USER_FUNCTIONALITY always! Regards SnapafunFrank Big or small, a challenge requires the same commitment to resolve. Registered Linux User # 324213

SnapafunFrank wrote:
Greig McGill wrote:
SnapafunFrank wrote:
Greig McGill and Matt - and others, care to view my inline understanding and comment ? Nothing wrong with this but if as I have already downloaded the tar-ball then the option for me needed clarification. In this case I will simply: # mv /home/frank/src/linux-2.6.10 /usr/src/
Sure, as I implied, there are many ways to do this, you can choose whichever you like. The key is understanding what's being done at each step and why. Once you have the "why", the exact steps don't matter so much, as you can use your knowledge of the process to choose how you'd like to do it. The physical location of the directories matters not a jot in this case. Nothing will (should) ever refer to the location of kernel source as a hard-coded thing.
Because I will need to re-compile the kernel later for my modem [ cnet 536 ep ] using linmodem advice. For that I will need the kernel-source to be were such building will find it.
You can always specify this. It's your system, you can put your sources where you like.
At this point, you have a fresh, unconfigured, uncompiled kernel source tree in /usr/src/linux-2.6.10 - feel free to link this to /usr/src/linux as follows:
ln -s /usr/src/linux-2.6.10 /usr/src/linux
Anyone else reading this with a usable kernel already running might NOT want to do this just yet because a `linux` link already exists to your current kernel. If you are confident that you will not suffer a
Well, it's only source. It really doesn't matter anyway. Nothing depends on this, only the binaries. I'm assuming a level of common sense - "oh, I already have that linked, meh, I'll just use the natural name, or I'll remove the existing link and add a new one".
power outrage or can run a suitable recovery disk if you do have one, then you need to first remove the existing link and then later either rename another or rename the new link once you have finished the new kernel installation. By renaming the new link and reinstating the old link your existing kernel will still be your default until you are happy to make the new one the default - primarily for system reference when installing new modules, etc. I think. Care to clarify this folks ?
Again, this is ONLY THE SOURCE. It has no bearing at all on your currently running kernel. You could delete the lot if you so wished. Once the kernel is installed, you only need your kernel source if you wish to compile something against it - linmodem drivers, or pcmcia-cs etc.
As you can see, I have POSSIBLY 5 kernels available but two links already in place for my system to reckon with. All previous kernels
And again... :) Your kernels live in /boot (or maybe /). NOT in /usr/src - this is only the source used to build the kernel.
# cd /usr/src/linux # make menuconfig
other options are available here and this newbie is going to try # make xconfig instead - fingers crossed.
Sure, that's fine. Didn't know you were aware of it - whatever you're comfortable with. I find menuconfig quicker.
Here I need to identify the new and the old as I mentioned above so:
# rm /usr/src/linux # ln -s /usr/src/linux-2.6.3-7mdk /usr/src/linux [ my currently working kernel ] # ln -s /usr/src/linux-2.6.10 /usr/src/linux2610 [ linux2610 being the name I choose to reference and use within lilo.conf ]
The source tree name, or the link bears no reference to the name of your kernel. Just rename the end product (bzImage) to whatever name you want. THAT FILE is your kernel. Just that file. I find it easiest to leave it named as it is, as your modules tree will be named likewise. This is actually defined in the Makefile, and I wouldn't fiddle with that. :)
Hope that helps.
So now that I have added what it is I am going to do, care to slap my fingers with anything before I push the big green button?
To E&OE and Matt - thanks very much for your responses - greatly appreciated and has helped clear things up no end.
Heh. E&OE means "Errors and Ommissions Excepted", or "I think that's everything, but I'm not responsible if I've missed anything. I'm Greig.
Regards,
G. _______________________________________________ wlug mailing list | wlug(a)list.waikato.ac.nz Unsubscribe: http://list.waikato.ac.nz/mailman/listinfo/wlug
Thanks Greig, the muddy waters recede more each time. I'm going for it and will report back once done.
Slight problem I think: I read from different sources, that I need to make a initrd and am not sure as to the best way to do this. Also, I need to be sure that it is specific to the new kernel and not override my existing ones. Here's what I have in my /boot partition at present: ( NOTE: no bzImage's but initrd / System.map / vmlinuz are all there with their respective symlink's.) [root(a)Snapafun boot]# ls boot.0300 initrd2422.img@ memtest-1.11.bin us.klt boot.0800 initrd-2.6.3-4mdk.img message@ vmlinuz2422@ config@ initrd-2.6.3-7mdk.img message-graphic vmlinuz-2.4.22-21mm.2md config-2.4.22-21mm.2mdk initrd263.img@ message-text vmlinuz263@ config-2.6.3-4mdk initrd-2.6.7 System.map@ vmlinuz-2.6.3-4mdk config-2.6.3-7mdk initrd267.img@ System.map-2.4.22-21mm.2mdk vmlinuz-2.6.3-7mdk diag1.img kernel.h@ System.map-2.6.3-4mdk vmlinuz267@ diag2.img kernel.h-2.6.3-4mdk System.map2637@ vmlinuz-2.6.7 grub/ kernel.h-2.6.3-7mdk System.map-2.6.3-7mdk initrd-2.4.22-21mm.2mdk.img map System.map-2.6.7 And waiting in the `wings`: [root(a)Snapafun boot]# ls (/usr/src/linux-2.6.10/arch/i386/boot ) bootsect* bootsect.S compressed/ install.sh mtools.conf.in setup.o tools/ vmlinux.bin* bootsect.o bzImage edd.S Makefile setup* setup.S video.S So I have an executable vmlinux.bin ? a bzImage file ? no initrd*.img as yet, no System.map for this kernel as yet ? My concern here is that I can find the ways to do these things BUT do they apply with this latest kernel and my system anymore? Thoughts anyone? -- Newbie Seeking USER_FUNCTIONALITY always! Regards SnapafunFrank Big or small, a challenge requires the same commitment to resolve. Registered Linux User # 324213

On Fri, 07 Jan 2005 11:44, SnapafunFrank wrote:
SnapafunFrank wrote: My concern here is that I can find the ways to do these things BUT do they apply with this latest kernel and my system anymore?
Thoughts anyone?
Ok this seems to be degenerating a little. The 2.6 kernel makes it ever easier to customise and build your own kernels. Once you have the source installed (doesnt matter where), just change into the directory and you're ready to roll your own ;) the basic steps are make mrproper --> clean the source tree make menuconfig --> te easiest way to configure imho make --> builds the kernel make install --> installs the kernel to /boot make modules_install --> installs any kernel modules and you're done. You will need to create an entry for this kernel in you boot manager. eg in grub add a new menu entry to point to vmlinuz. Your old entry should point to the full kernel name you normally use. (establish this at the command line by typing uname -r) A couple of things you may want to decide are whether you want a 'modularised' kernel or one with everything built in, a so called 'monolithic' kernel. The monolithic kernel is easier in some ways because all the support options you choose are already there, you dont have to figure out which modules to load when you reboot. However a modularised kernel uses less memory (if you have lots this doesnt matter so much) and can be significantly more secure. Also if you dont have module support, things like the nvidia kernel module, which is compiled seperately, are rendered useless. My recomendation is to use modules :) An initrd is designed to offer modules to the kernel that may not be accesible from the normal module tree ( eg /lib/modules/linux-<kernelversion> created when you run 'make modules_install'. You can avoid using initrds by compiling support for certain key things such as disk format (eg ext3, reiserfs etc) and any other special requirements the kernel needs to pull up the system to a basic level so 'init' (the program that loads you system runlevel) can take over. -- "Note that if I can get you to \"su and say\" something just by asking, you have a very serious security problem on your system and you should look into it." (By Paul Vixie, vixie-cron 3.0.1 installation notes)

On Wed, 05 Jan 2005 23:45, Greig McGill wrote: <snip>
4. Install your kernel This is where you copy the compiled kernel to the /boot directory, and setup your boot loader to use it.
Again, I'm assuming you're still in /usr/src/linux:
# mv arch/i386/boot/bzImage /boot/bzImage-2.6.10 # mv System.map /boot/System.map-2.6.10 Does nobody use 'make install' ? if not why not?
Liz
As for updating your bootloader, that depends on whether you're using grub or lilo, but you should be able to figure it out by looking at the existing config file for either and adding a new block to use your new kernel. Use common sense, and don't REPLACE the existing block, as if your new kernel won't boot, you'll want to be able to select your old kernel from the bootloader menu.
Hope that helps.
E&OE.
G.
On Thu, 2005-01-06 at 11:15 +1300, SnapafunFrank wrote:
Finding it difficult to find someone with the patience to help with this so thought I would try local talent:
In the past, whenever I wanted to compile a `new` kernel, I would first up do:
# urpmi kernel-source-2.6-n
Then do:
# urpmi kernel
The kernels were not the latest release and of course rpm's were available.
Because of my usb concerns I thought I would `install` kernel-2.6-10 - knowing I would have to compile from linux-2.6.10.tar.bz2.
So first thing, read the README at least, and straight off I'm lost, though later it looks like my usual one step at a time approach will get there.
Here's were I'm lost:
"- If you install the full sources, put the kernel tarball in a directory where you have permissions (eg. your home directory) and unpack it"
OK - no prob with that.
"Do NOT use the /usr/src/linux area! "
Again, no prob, sort of covered that, I thought.
"- Make sure you have no stale .o files and dependencies lying around:
cd linux make mrproper
You should now have the sources correctly installed."
Huh! But I've only unpacked the bz2 file into my home directory - how can anything be installed at this point?
Just in case I'm having a braindead week :
"BUILD directory for the kernel:
When compiling the kernel all output files will per default be stored together with the kernel source code. **[ Fair enough ]**
Using the option "make O=output/dir" allow you to specify an alternate place for the output files (including .config). Example: kernel source code: /usr/src/linux-2.6.N build directory: /home/name/build/kernel ** [ Possibly not something I might require but better remember, just in case ] **
To configure and build the kernel use: cd /usr/src/linux-2.6.N
** WOAH - WAIT UP- where in blue blazes did the directory /usr/src/linux-2.6.N come from - yes. I have directories for previous versions here but certainly not this one yet.
So right now I have the bz2 file in my /home/frank/src/ directory, have it unpacked and I thought ready to go?????
So I go back and re-read things and find:
" If you install the full sources..... "
Right back at the beginning. The only file I have found is the bz2 file, how can I have already installed the full sources. I thought they were part and parcel of the bz2 file and as yet had to be installed.
Lost - braindead - BOTH. Any one want to do the rear seat kicking here?
_______________________________________________ wlug mailing list | wlug(a)list.waikato.ac.nz Unsubscribe: http://list.waikato.ac.nz/mailman/listinfo/wlug
participants (5)
-
Glenn Enright
-
Greig McGill
-
Liz
-
Matt Brown
-
SnapafunFrank