UrbanPro

Learn Linux from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Hi, I am learning compilation of Linux kernel and grub. If any useful links and material is in place that I can refer it would be helpful.

Asked by Last Modified  

21 Answers

Learn Linux

Follow 0
Answer

Please enter your answer

DevOps Engineer / Linux Administrator

Hey, I think http://tldp.org will of great help for you.
Comments

Coaching

Useful Links: http://www.linux.com/learn/tutorials/362602-how-to-compile-the-linux-kernel https://www.linode.com/docs/tools-reference/custom-kernels-distros/run-a-custom-compiled-kernel-with-pvgrub http://haifux.org/lectures/88-sil/kernel-compilation.html
Comments

Embedded Linux kernel/Hacker Trainer

Understand make utility, Download source code for linux kernel and grub. Follow README you should be compile any code.
Comments

IT Teacher

Use GCC
Comments

Technical Trainer

Friend, google provides thousand of links for this.. plz go a head.
Comments

Industry experience training in C C++ Linux Perl Python for students to help in core understanding and cracking interviews

Best is download the kernel tarball and follow the README and INSTALL files.
Comments

Technical Trainer

Great book is "Linux Kernel" plz refer it..
Comments

c,c++,vb,vb.net,php.joomal,basic,all computer subjects

Compiling the Linux kernel used to be a rite of passage, or just a necessity, for running Linux. It's not something most users need to do any more, but if you really want to compile your own kernel we'll show you how. Even though it's not necessary, a lot of users still want to know how to compile...
read more
Compiling the Linux kernel used to be a rite of passage, or just a necessity, for running Linux. It's not something most users need to do any more, but if you really want to compile your own kernel we'll show you how. Even though it's not necessary, a lot of users still want to know how to compile the Linux kernel. Unfortunately, there's not just one way to do it. I'll show one way to build a kernel from source, but you may want to consult your distribution's documentation for the proper way to build from source for your distribution. Here we're going to build from source and install directly without creating an RPM or Debian package for the kernel. If there's a lot of demand, we'll do specific tutorials on creating kernels for Ubuntu and Fedora. Word of Warning When I first started using Linux in 1996, it was almost mandatory to compile your own kernel. Thankfully, things have change a lot since then. It's very rare that you need to compile your own kernel these days, unless you really know what you're doing (in which case, you probably don't need this tutorial), want to help with kernel testing, or run into a very unusual situation. You may need to compile modules, which is somewhat different. Because support for devices can be compiled as modules rather than requiring a kernel rebuild, you can simply compile modules and insert them into the existing kernel. If you want to help with kernel testing, great! If you have a few hours and can compile and boot a kernel (most problems show up right away), then you'll be doing the Linux community a favor by testing it out. If you're wanting to run a custom kernel on your desktop, laptop, or servers, that's fine — but don't expect your distribution vendor or project to support it or accept bug reports about a kernel problem unless you're running the stock builds that they provide. If you're compiling a kernel just because you can, that's great — but don't expect any technical support! Finally, the kernel you get from your distribution and the kernel that comes from kernel.org are generally not going to be the same thing — even if they're the same version number. This is because almost every distribution ships a modified Linux kernel with their own patches and tweaks. Getting Ready to Compile Before compiling the kernel, you have to have the development tools and you'll need to create a configuration file that specifies what should (and shouldn't) be compiled with the kernel. Also, plan to have an hour or more for the whole exercise, depending on how fast your machine is. If you're compiling a kernel on a quad-core Core i7 with loads of RAM, it'll go much faster. If you're compiling the kernel on an Atom-based netbook with 1GB of RAM, it's probably not going to be very speedy — though probably still much faster than the Pentium 133MHz system I compiled my first kernel on. If you're new to the whole "compiling a kernel" thing, I strongly recommend that you do not do this on a production machine. If you have VMware or VirtualBox installed, use those to compile your custom kernel a few times. If you have a spare box, use that. If you are going to compile the kernel on your production desktop, server, laptop, or netbook the first time (against my advice) make sure you have a backup and a rescue disk handy just to be on the safe side. Odds are you won't need them, but it's always better to have backups and such and not need them than the converse. Finally, you'll also need kernel source — either the source for the kernel that ships with your distro, or one of the kernels from kernel.org. We're going to do this with a kernel.org kernel. On CentOS 5.5, you'll need to install the ncurses-devel package, and the Development Tools group of packages, if you don't have them already. Note that I pulled some of this info from the CentOS wiki, to give credit where due. To install these packages, run: yum groupinstall "Development Tools" yum install ncurses-devel yum install qt-devel yum install unifdef Next it's time to create the directories where you're going to compile the source. You're going to compile the kernel as a normal user, and then install the kernel as root. I keep a src directory in my home directory, you'll probably want to do the same. Download the kernel source in the src directory, and then uncompress it: tar -jxvf linux-2.6.35.4.tar.bz2 The version number will probably differ. Now cd into the linux-2.6.35.4 directory. The kernel has a dazzling array of tools to help create your config. You can use standard make config to get a series of questions, or make menuconfig for an ncurses (text) interface to compile the kernel. Alternatively, you can use a GUI to walk through the menus, like make xconfig. If this is the first time you've attempted a kernel compile, the menus can be a bit intimidating. It's hard to give any advice as to what options you should or shouldn't select because your reasons for compiling a kernel are going to be different than mine. You might want to start with the config file that your distribution uses. Grab the source RPM for the kernel and install it: rpm -i http://mirror.centos.org/centos/5/updates/SRPMS/kernel-2.6.18-194.11.3.el5.src.rpm Now look under /usr/src/kernels, mine's located at /usr/src/kernels/2.6.18-194.11.3.el5-x86_64 but this will vary depending on architecture and version number. Under this directory there's a .config file. Copy it to the directory with your Linux source. Run make xconfig and then load the .config that you copied over. Make any changes to the configuration you wan to, and then save the configuration. Still with me? It's time to do some compilin'! Run make, and get ready to sit back for a while. It will take a while for the kernel to compile. Really, even on a fast machine, it still will take the kernel quite some time to compile. Once the kernel is finished compiling, you need to install the kernel and modules, and then configure grub. You'll need to switch to root or use sudo here: make modules install make install Now check your grub.conf under /boot/grub/grub.conf and make sure you have the configuration for your kernel. Previously I've had to hand-edit grub or LILO, but when I was writing this up I found that the make install process had apparently done it for me. You should see some lines like this: read less
Comments

Freelance technical trainer / consultant (Embedded systems, Automation / Scripting) : C, Linux, Embedded systems, python, perl, tcl

Are you interested in learning just compilation of linux? or also to understand linux kernel internals?
Comments

Corporate Trainer, Institute & Center Trainer, Home Tutor, Online Tutor

As per your requirement I think this link whatever I am sharing with you very useful that is:-http://www.tecmint.com/ from there you can get more things whatever you are looking for....
Comments

View 19 more Answers

Related Questions

Which is the best book for the reference of Linux?
Linux: The Complete Reference
Aneeshwara
Hi my name is Raja i have 8 Years Expnt in Desktop Support i Need to change my Platform From linux basic are Network Base Work
Hi Raja, As you said, you already have some experience on desktop support, so better choose Linux Administration. First learn basic level of Linux Administration from any institute, then go to real time...
Rajasubramanian

I am working as Tech support executive with windows and Linux total of 4 years of experience , Not getting enough calls / opportunities ... Which domain is good for change Sap basis consultant / any other suggestions are welcome

Learn Cloud Computing(Microsoft Azure,AWS,Google Cloud) or Devops. Make your career in this field. Your previous experience will use in this field.
Vamshi
What is openstack ?
OpenStack is open source platform for building and managing cloud computing platforms for public and private clouds in a cloud computing environment.
Vivek

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

How To Start Shell Scripting?
Hi learners, I would like to share my knowledge in shell scripting: Every new Linux learners goal is to learn shell scripting. But only a few starts quickly writing the shell scripts.Why? The reasons...

How to detect duplicate address manually in a network from Linux ?
Below script will help you to detect duplicate IP address in a subnet The key command is the arping command which will send out an ARP packet with DAD (duplicate address detection) If the return...

Linux Syllabus
Part I Geting Familiar with Red Hat Enterprise Linux Chapter 1 Geting Started with Red Hat Enterprise Linux Linux, Open Source, and Red Hat Origins of Linux Distributions Fedora Red Hat Enterprise...

LINUX - SETTING UP YUM REPOSITORY
If we buy RHEL 7 the system by default will be connected to Red Hat Network (RHN). All packages and updates will be installed from RHN. So RHN will be our main source and repository. Since we have...
A

Aseem .

1 0
0

how to learn linux system/server adminstration effectively
First the person looking to learn linux adminstration needs to strat from the basic and should practise everyday for atleast 2 hours a day

Recommended Articles

Business Process outsourcing (BPO) services can be considered as a kind of outsourcing which involves subletting of specific functions associated with any business to a third party service provider. BPO is usually administered as a cost-saving procedure for functions which an organization needs but does not rely upon to...

Read full article >

Hadoop is a framework which has been developed for organizing and analysing big chunks of data for a business. Suppose you have a file larger than your system’s storage capacity and you can’t store it. Hadoop helps in storing bigger files than what could be stored on one particular server. You can therefore store very,...

Read full article >

Software Development has been one of the most popular career trends since years. The reason behind this is the fact that software are being used almost everywhere today.  In all of our lives, from the morning’s alarm clock to the coffee maker, car, mobile phone, computer, ATM and in almost everything we use in our daily...

Read full article >

Whether it was the Internet Era of 90s or the Big Data Era of today, Information Technology (IT) has given birth to several lucrative career options for many. Though there will not be a “significant" increase in demand for IT professionals in 2014 as compared to 2013, a “steady” demand for IT professionals is rest assured...

Read full article >

Looking for Linux Training?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Linux Classes?

The best tutors for Linux Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Linux with the Best Tutors

The best Tutors for Linux Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more