Thursday, 13 February 2014

A Simple guide to building your own Linux Kernel

This article is for all the newbies who want to learn how to build their own Linux kernel. Following the steps mentioned will demonstrate how easy the task is!


Please note that the steps mentioned were done on Ubuntu 10.04, but would remain the same for any Linux distribution.
Pre-requisites
Git is the utility for version control on Linux. Install it with a simple sudo apt-get install git-core. You also need the curses library development files install the package with sudo apt-get install libncurses5-dev.
Next, verify the current Linux kernel version with the uname a command so you can download the relevant kernel source to build using the git clone command. I have used Linux 2.6 in this example.

Configuring the kernel
Now that you have the source, you need to configure it. You can use the command make menuconfig if you are experienced on what configuration parameters to set. If you are new to this, I would suggest you use the default configuration copy the existing config file to the kernel source directory with, for example, cp /boot/config/-2.6.32-38-generic .config
Now, run make oldconfig to start the configure process. Please note that here you will be prompted to answer Yes or No. If you are unsure, just keep on hitting Enter (that is a default Yes).
Naming the kernel
Next, it might be good to give your kernel a name. For this, open the Makefile, and edit the lines below:

VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 32
EXTRAVERSION = -dips
NAME = Building My Kernel

Now, issue the make command. This should take a couple of hours to complete.
Installing the kernel
Now, issue the following command to install all the kernel modules:

make INSTALL_MOD_STRIP=1 modules_install
Next, run a make install.
Updating with initramfs
Run the command, sudo update-initramfs -c -k 2.6.32-dips+
For readers who are keen to know what initramfs is, it is a root filesystem that is loaded at an early stage of the boot process. It is the successor of the old initrd.

Verify the installation
Now, we are almost done! To verify, check your /boot directory. Are you able to find the new kernel image and the config file for your build? If yes, then congratulations! You have succeeded in building your kernel.

Modify the GRUB file and reboot
GRUB stands for Grand Unified Bootloader. It is a boot-loader package from GNU. GRUB provides a user the choice to boot any one of multiple operating systems installed on a computer, or to select a specific kernel configuration available on a particular operating system’s partitions.
You can find the GRUB file at /boot/grub/grub.cfg.
Issue the command sudo update-grub and your GRUB file will be modified. You should be able to see an entry for your kernel, which looks like what’s shown below.


### BEGIN /etc/grub.d/05_debian_theme ### 
 set menu_color_normal=white/black 
 set menu_color_highlight=black/light-gray 
 ### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry Ubuntu, with Linux 2.6.32-dips+ --class ubuntu --class gnu-linux --class gnu --class os 

recordfail     
insmod ext2     
set root=(hd0,5)     
search --no-floppy --fs-uuid --set 0b0ebe63-24f6-45c0-a3df-5d9c447b5ad9     
linux    /vmlinuz-2.6.32-dips+ root=UUID=325f1d1d-2070-45f3-94ed-2027c5ffcbf3 ro   quiet splash     initrd    /initrd.img-2.6.32-dips+ 
 }


Now, just reboot the system. Your system should now boot up with your just-built kernel. You can verify it by using the uname a command again.
That’s all you need to build a kernel. Now wasn’t that simple? So, have fun building your kernel!


Author : Shivam Kotwalia, CodeKill

Tuesday, 4 February 2014

10 eBooks On Linux Kernel And Programming !

linux open source, Linux kernel, ebooks on linux kernel, free ebooks on linux kernel, linux programming, free ebooks on linux programming, Jump into the world of Linux kernel with these 10 ebooks that are absolutely free!

A lot of our readers asked for books and resources on Linux kernel and its programming. And CodeKill Group is dedicated to bring in what our readers want to read, here are 10 free ebooks Linux kernel and programming for downloading, online reading and sharing. Happy reading!


1. Understanding the Linux Kernel, 3rd Edition

As the introduction of the book says, “In order to thoroughly understand what makes Linux tick and why it works so well on a wide variety of systems, you need to delve deep into the heart of the kernel. The kernel handles all interactions between the CPU and the external world, and determines which programs will share processor time, in what order. It manages limited memory so well that hundreds of processes can share the system efficiently, and expertly organizes data transfers so that the CPU isn't kept waiting any longer than necessary for the relatively slow disks.

The third edition of Understanding the Linux Kernel takes you on a guided tour of the most significant data structures, algorithms, and programming tricks used in the kernel.”

2. Linux Kernel in a Nutshell

As the introduction of the book says, “Written by a leading developer and maintainer of the Linux kernel, Linux Kernel in a Nutshell is a comprehensive overview of kernel configuration and building, a critical task for Linux users and administrators.

No distribution can provide a Linux kernel that meets all users' needs. Computers big and small have special requirements that require configuring and rebuilding the kernel. Whether you are trying to get sound, wireless support, and power management working on a laptop or incorporating enterprise features such as logical volume management on a large server, you can benefit from the insights in this book.”

3. Linux Kernel Development, 3rd Edition

As the introduction of the book says, “Linux Kernel Development details the design and implementation of the Linux kernel, presenting the content in a manner that is beneficial to those writing and developing kernel code, as well as to programmers seeking to better understand the operating system and become more efficient and productive in their coding.

The book details the major subsystems and features of the Linux kernel, including its design, implementation, and interfaces. It covers the Linux kernel with both a practical and theoretical eye, which should appeal to readers with a variety of interests and needs.”

4. Linux System Programming, 2nd Edition

As the introduction of the book says, “Write software that draws directly on services offered by the Linux kernel and core system libraries. With this comprehensive book, Linux kernel contributor Robert Love provides you with a tutorial on Linux system programming, a reference manual on Linux system calls, and an insider's guide to writing smarter, faster code.

Love clearly distinguishes between POSIX standard functions and special services offered only by Linux. With a new chapter on multithreading, this updated and expanded edition provides an in-depth look at Linux from both a theoretical and applied perspective over a wide range of programming topics.”

5. Professional Linux Programming

As the introduction of the book says, “As Linux continues to grow in popularity, there has never been more of a need to understand how to develop for this platform. Rather than focusing on a particular language or development technique, Professional Linux Programming looks at the different development environments within Linux - the kernel, the desktop, and the web - and then demonstrates best practices, tools, and techniques for integrating applications with the OS as a whole. This book is essential for understanding the nuances that differentiate programming for Linux from programming for any other platform. After beginning with simple shell scripts, the reader quickly moves on to the more advanced topics like software drivers and the graphical interface.

The wide variety of tools that you can use to build application software, utilities, and even the Linux kernel itself are covered. You'll also explore the unique components of a Linux system and delve into the inner workings of the system. And you'll find out how to use Linux with the web by writing software for the LAMP (Linux, Apache, MySQL, Perl/Python) stack. You'll then be able to apply this information to streamline software development while incorporating cutting-edge features and functionality.”

6. The Linux Programming Interface

As the introduction of the book says, “The Linux Programming Interface (TLPI) is the definitive guide to the Linux and UNIX programming interface - the interface employed by nearly every application that runs on a Linux or UNIX system.

In this authoritative work, Linux programming expert Michael Kerrisk provides detailed descriptions of the system calls and library functions that you need in order to master the craft of system programming, and accompanies his explanations with clear, complete example programs.”

7. The Linux Kernel Module Programming Guide

As the introduction of the book says, “An excellent guide for anyone wishing to get started on kernel module programming. The author takes a hands-on approach starting with writing a small "hello, world" program, and quickly moves from there. Far from a boring text on programming, Linux Kernel Module Programming Guide has a lively style that entertains while it educates.”

8. The Linux Kernel

As the introduction of the book says, “The kernel is the part of the system that handles the hardware, allocates resources like memory pages and CPU cycles, and usually is responsible for the file system and network communication. This text covers the kernel source, user space and the libc interface, system calls, signals, file names and files, filesystems, the linux virtual file system, memory, processes, character devices, handling of asynchronous events, sysfs and kobjects, security.”

9. Linux Kernel Crash Book

As the introduction of the book says, “Linux kernel crash analysis is a niche topic, which will interest system administrators and professionals dabbling in the kernel. You may consider this book as a very extensive learning lesson in what goes behind the curtains of a typical Linux system.”

10. The Linux Programmer's Guide

As the introduction of the book says, “The Linux Programmer's Guide is meant to do what the name implies-- It is to help Linux programmers understand the peculiarities of Linux. By its nature, this also means that it should be useful when porting programs from other operating systems to Linux. Therefore, this guide must describe the system calls and the major kernel changes which have effects on older programs like serial I/O and networking.”


CodeKill

Labels

Tutorial (129) Tech News (83) E-Books (55) Pdf (47) Hacking (46) Linux (32) Android (23) Programming (22) Tools (22) Video (21) Ethical Hacking (16) Electronics (12) Google (10) Hacked (9) Python (9) Facebook (8) Java (8) Software (8) PHP (7) Android App (6) C (6) Free Online Coureses (6) OpenSource (6) Ubuntu (6) Unix (6) Windows (6) C++ (5) Game Programming (5) Java Programming (5) Kali Linux (5) CodeKill (4) Cryptography (4) Firefox (4) JavaScript (4) Linux System Administrator (4) Mac (4) Penetration testing (4) Python Programming (4) Security (4) Top Distros (4) WhatsApp (4) CSS (3) Circuit (3) Cloud Computing (3) Game Devlopment (3) Hacking Tools (3) Malware (3) MicroController (3) Microsoft (3) Networking Tool (3) Perl (3) Source Code (3) WebSite (3) Windows 8.1 (3) C Programming (2) C Series (2) C# (2) CheetSheet (2) Computer (2) Computer Networking (2) Data Storage (2) Dual Boot (2) Eclipse (2) Edward Snowden (2) Exploit (2) Facts (2) Games On Linux (2) Google Chrome (2) HTML5 (2) Hacking Challenges (2) IDE's (2) Information Security (2) Lenovo (2) Linux Kernel (2) Malicious (2) Mobile (2) Motorola (2) Mozilla (2) MySQL (2) NoSQL (2) Raspberry Pi (2) Ruby (2) Security Tools (2) Syrian Electronic Army (2) Tricks and Tips (2) Valentine Day (2) Web Design (2) iOS (2) iPhone (2) jQwery (2) *nix (1) 2014 (1) 3D Modeling (1) Algorithm (1) Android Hacking (1) Android Pattern Lock Screen.. (1) Anonymous Mail (1) Anti-Spam (1) Apps (1) Arduino (1) Artificial Intelligance (1) Audio Software (1) BSD (1) BeAWARE (1) Bitcoin (1) Black Hat Hackers (1) BlackBerry (1) Buffer Overflow (1) C++ vs Java (1) CISO (1) Circuit Analysis (1) Circuit Design (1) Circuit Programming (1) Circuit Simulators (1) Codes (1) Crptology (1) Cryptanalysis (1) DDOS (1) Devlopers (1) Drupal (1) DuckDuckGo Search Engine (1) E-Card (1) E-Mails (1) Embedded System (1) Encryption Tools (1) Error (1) FTP (1) Famous Passwords (1) FileZilla (1) Flipkart (1) Forbes (1) Forgot Password (1) GCHQ (1) Genders (1) Gmail (1) Google Tricks and Trips (1) HTML (1) Hacking Distro (1) Hard Disk (1) Hash Encryption (1) Illegal (1) Internet (1) LAMP (1) Language Theory (1) LibreOffice (1) Linus Trovalds (1) Logic Gates (1) MATLAB (1) MOSFET (1) Mail (1) Mark Zuckerberg (1) Mathematical (1) MicroProcessor (1) Mind Mapping Tools (1) Myntra (1) NoSQL Database (1) Nobal Prize (1) Nokia (1) Object Oriented Programming (1) Office (1) Oldboot (1) Online (1) Paranoid Android (1) Passwords (1) Passwords Cracking Tools (1) PayPal (1) Perl Programming (1) Plugins (1) Prolog Programming (1) Python Basics (1) Remote (1) SEA (1) SQL Injection (1) Sans (1) Screencasts (1) Screenloggers (1) Server Load (1) Servers (1) Shell (1) Software Design (1) Software Developer (1) Software Testing (1) Sony (1) Spider.io (1) Statistical (1) Steve Jobs (1) TCP/IP (1) Timeline (1) Tor (1) Trojan (1) Ubuntu Phones (1) VAIO (1) Virus (1) Web Designers (1) Wi-Fi Hacking (1) Windows Tools (1) Windows XP (1) WordPress (1) XML (1) Yahoo (1) YouTube (1) cpp (1) eBay (1) iBanking (1)