Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 20
Hi all... Trying to learn how to build a kernel. I have an Intel i5-440 CPU on a 64 bit machine that I built on a commercial Motherboard (Gigabyte). What's ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie jkwilborn's Avatar
    Join Date
    Nov 2012
    Posts
    197

    Package names for my CPU


    Hi all... Trying to learn how to build a kernel. I have an Intel i5-440 CPU on a 64 bit machine that I built on a commercial Motherboard (Gigabyte). What's confusing is what I have to call the package:

    linux-image-3.2.0-subarchitecture_custom.1.0_i386.deb

    This is what they say, but I have no idea about the 'subarchitecture_custom', what or how do I create this? There seems little to go on in the docs.

    Thanks

    Jack

  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,198
    For subarchitecture, see this link. It doesn't look as if there is one for intel chips; you just use the main architecture, which Debenham calls amd64 (everyone else calls it x86_64). Custom is whatever you want to add to show that it's your own kernel. Most people use their initials.

    Why do you want to package it up as a deb? That's extra work. Why not just install it directly as soon as it's built?
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  3. #3
    Linux Newbie jkwilborn's Avatar
    Join Date
    Nov 2012
    Posts
    197
    Hazel, thanks for the reply. I guess I don't know. I've never done this before and one of the developers of another Debian group asked why do it as it adds only about 10 to 15% increase in speed. I'm trying to learn how to do this and eliminate any extra modules loading. I guess the bottom line is I'm curious and hope that I will learn more about the system if I start by building it and installing it.

    What I'm not sure about and rather frightened of is that I will crash my system and have to reload it all over again, loosing all the work I've done. So after building it, I was going to see if I can keep the working kernel, try mine and if it doesn't boot, then boot off a DVD or something and restore the working one. Is my head in the clouds? Since I don't really know what I'm doing, I'll analyze anything anyone says, if you know what I mean.

    When I have trashed the system, I've never been able to find out how to recover and ended up with a fresh install, and everything I've done is gone. Even when I wised up, I still have the problem of not all things being backed up properly and it seems like key items are left out.

    From what I've read, there is a class 6 (for 686 based CPU, which mine is one. Off the top of my head I can't remember what the completed string was, but it was something like X686_64, although I'm pretty sure that wasn't it.

    I appreciate any input you can add. It seems like most people don't do this but since I plan on porting to other hardware, I felt it was a good idea.

    Thanks

    Jack

  4. #4
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,198
    Building your own kernel is not difficult and it's educational. It can also dramatically speed up your boot. To do it safely, just make sure you install the new kernel alongside the existing one. Then if it doesn't boot (and in my experience they never do the first time) you have a good working kernel to use while you rebuild the new one.

    The kernel build process has a wonderful built-in help system which will not only tell you what each optiion does but also give you a good idea of whether you are going to need it for your system.

    There are plenty of kernel build howtos out on the web -- just google. But here are a few additional tips.

    1) Make sure the SATA disk driver and the driver for your root filesystem are built right into the kernel, not as modules.

    2) Use modules for things like sound cards that you are not going to need in an emergency.

    3) Don't waste time and disk space building drivers fror hardware you don't have, but don't cut out anything if you're not sure what it does. You can always try experimental rebuilds with less stuff once you have got a working kernel.
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  5. #5
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,488
    Quote Originally Posted by hazel
    Make sure the SATA disk driver and the driver for your root filesystem are built right into the kernel, not as modules.
    I'm embarrassed to admit that was a lesson I had to learn the hard way

    Quote Originally Posted by jkwilborn
    One of the developers of another Debian group asked why do it as it adds only about 10 to 15% increase in speed
    Ask them how they would feel if their government raised their taxes / tuition by only 10% - 15%. Then ask them how they'd feel if it was lowered by the same amount. Sometimes numbers need to be put in a different context to appreciate their scale. Sometimes it's worth throwing out a gentle troll
    What do we want?
    Time machines!

    When do we want 'em?
    Doesn't really matter does it!?


    Conkybots: Interactive plugins for your Conkys!

  6. #6
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,198
    Overall boot time isn't the most important thing imho. Psychologically the most difficult part of the boot process is watching the kernel load. All those lines of dots marching across the screen! On old hardware, it can seem to take forever. And you know that until it's finished, nothing else is going to happen.

    A stock kernel usually prints out 3.5 lines of dots. My home-made kernels print 0.5. No contest!

    In any case it's sacrilege to run a stock kernel on homemade customised hardware.
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  7. #7
    Linux Newbie jkwilborn's Avatar
    Join Date
    Nov 2012
    Posts
    197
    I think this is why and what people want when they post. Good honest answers from those that have done it. I have gone over, at least a half dozen articles that detail how to build a kernel, but they have either created more questions than they answered or assumed I know more that I do. Even though I've been around computers for almost 40 years, I still have lots to learn and I appreciate those that have answers (and opinions) take the time to answer. I try to answer others when I get on this site.

    Can you point me to some docs that give more detail on:

    1) how to have two kernels and control the boot process, so when one isn't right I can go back to the other.. Is this possible in GRUB?
    2) just to get it started, seems most of it is aimed at people already building and with specific problems.

    I appreciate all of your help.. I built this machine and I would like to get it up with something that boots quick and only uses what is needed. I would also like to make use of the extra memory that I have and appears to never be used.

    Thanks

    Jack

  8. #8
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,488
    One of the magazines I subscribe to has a tutorial.
    What do we want?
    Time machines!

    When do we want 'em?
    Doesn't really matter does it!?


    Conkybots: Interactive plugins for your Conkys!

  9. #9
    Linux Newbie jkwilborn's Avatar
    Join Date
    Nov 2012
    Posts
    197
    Cool, looks like what I was itching for... Seems to hit all questions. Now all I have to do is pull it off....

    Thanks again, if you have any other suggestions, please feel free to speak.

    Jack

  10. #10
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Location
    Harrow, UK
    Posts
    1,198
    Quote Originally Posted by jkwilborn View Post
    1) how to have two kernels and control the boot process, so when one isn't right I can go back to the other.. Is this possible in GRUB?
    Jack
    Once you have installed the new kernel in /boot and its modules in /lib/modules/x.y.z, you can update GRUB and it should find both kernels.

    2) just to get it started, seems most of it is aimed at people already building and with specific problems.
    Jack
    Well, you start by downloading the kernel source. The "apt-get source" command should do it. Put it in your home directory, not /usr/src. Unpack it, go into the new toplevel directory and see if there's a .config file there. If not, create one by typing "make defconfig". Then use "make menuconfig" or "make gconfig" to edit that default file just the way you want it. If you have a gnome desktop, use gconfig; it'll give you a nice graphical menu system that you can navigate with your mouse. menuconfig will work on any desktop but some people find the interface offputting.

    Make sure you check the option on the first page to add a custom suffix; you'll want to differentiate this kernel from the stock one. And do use help for every option you're not sure about.

    When you've finished configuring, follow available instructions for building and installing your kernel.
    "I'm just a little old lady; don't try to dazzle me with jargon!"

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •