Presentation is loading. Please wait.

Presentation is loading. Please wait.

Linux Exposed (Unofficial guide to kernel hacking)

Similar presentations


Presentation on theme: "Linux Exposed (Unofficial guide to kernel hacking)"— Presentation transcript:

1 Linux Exposed (Unofficial guide to kernel hacking)

2 Linux as an operating System What is now known as Linux began life as a small student project at the University of Helsinki in Finland. Linux Torvalds wanted a small, UNIX-like operating system, and so he set out to write one. He received help from volunteers all around the globe, who collaborated via bulletin-board, electronic mail, and the Internet to create the Linux operating system.

3 The crew ended up creating a rather remarkable operating system that works very well, is very stable, and rivals offerings from Microsoft, Apple, and Sun. Linux offers the following features: – Multitasking—Linux natively runs more than one task (program) at a time in a UNIX-like fashion. It also supports preemptive multitasking, where priorities can be set for different processes. – Multi-user—Many users can be networked to a single Linux server. Linux is the least expensive, and perhaps best-featured, multi-user operating system on the planet today. – User-friendly—The X Window System interface and a slew of great tools make Linux easy to use.

4 Today, Linux claims half a million users, and that number keeps growing every day. One reason is cost—Linux itself is free of charge, and only those who package a Linux distribution charge for it (and many don’t charge at all). These distributions, such as Red Hat Linux, vary as to their installation processes and accompanying tools.

5 Linux Basics File Types Organization of files and directories File permissions and Linux An overview of X window Basic System Administration

6 FILE TYPES Under Linux, a file can be one of several types: – Ordinary files – Directories – Links – Special device files

7 Organization of Files and Directories DirectoryContents ================================= binbinary files boot boot files devdevice drivers etcconfiguration files home home directory lib library files tmp temporary storage files usrcommands varsystem definitions

8

9 File permissions and Linux Because UNIX is a creature centered around security, Linux allows permissions to be designated for files and directories. If you lack the proper permissions, you can’t change files or directories. The root user, of course, has the proper permissions to access every file in the Linux file system (which means that you shouldn’t expect absolute security if you’re working on a larger system). Under Linux, there are three different levels of permissions: owner, group, and world.

10 Output of ls –l command -rwxrwxrwx 1 kevinr group1 512 Apr 3 19:12 test – The seventh column (19:12) lists the time the file was created. – The sixth column (Apr 3) lists the date the file was created. – The fifth column (512) lists the size of the file in bytes. – The fourth column (group1) lists the group the file belongs to. (We’ll explain this later.) – The third column (kevinr) lists the owner of the file. – The second column (1) shows the number of links to the file. – The eighth column (test) lists the filename. – The first column (-rwxrwxrwx) lists the permissions associated with the file and the type of the file

11 An overview of X window System X window offers a graphical interface to the Unix world. X window provides a way to deliver all the user interface paradigms like windows, dialog boxes,buttons and menus. It is X window that enables the creation of the sophisticated graphics that make unix based workstations the system of choice for many engineering and design applications

12 Window Managers And Other Clients X-Server Video Card Monitor Mouse/Keyboard Basic Client-Server Architecture of X-Window

13

14 Open Source Software ( OSS ) OSS literally means software whose source is open To be termed as OSS,the software should not restrict the user from freely using it, modifying it and distributing it. Advantages over proprietary software are :- Longevity, Quality, portability, compatibility, Response time

15 Hacking Linux Kernel Need of Kernel Compilation Finding Source Code Compiling and Linking the Kernel Compiling and linking modules Backing up the old kernel and Moving in the new one

16 Finding Source code Type rpm –qa | grep kernel Choosing Kernel features -Make xconfig -Make menuconfig -Make config Compiling and Linking Kernel -make dep -make bzImage

17

18 Compiling and linking Modules -make modules -make modules_install Backing up old Kernel and Moving to the new one @/boot/grub/grub.conf file Image=/boot/vmlinuz Label=linux Root= /dev/hda5

19 /boot/grub/grub.conf file (Edited) Image=/boot/vmlinuz Label=linux Root=/dev/hda5 Image=/boot/vmlinuz-2.4.2.2-2-old Label=linux-old Root=/dev/hda5

20 Conclusion If you’re curious about UNIX or other operating systems, then Linux gives you a great environment to experiment with at a very reasonable—if not free—cost. If you need more power from your hardware than Windows or DOS gives you, then Linux is the operating system that can give it to you. If you need a robust, reliable server for your company Internet or World Wide Web services, Linux can do that just fine and very inexpensively. But, if you don’t want to learn something new, don’t want to leverage your existing hardware, and like the frequent crashes involved with Windows, then forget about Linux!

21 References www.wikipedia.com www.linuxhacks.com www.linux.org www.faqs-linux.com

22

23


Download ppt "Linux Exposed (Unofficial guide to kernel hacking)"

Similar presentations


Ads by Google