Everything about UNIX kernels: development, configuration, compilation, design, etc.

learn more… | top users | synonyms

52
votes
3answers
27k views

How do I read from /proc/$pid/mem under Linux?

The Linux proc(5) man page tells me that /proc/$pid/mem “can be used to access the pages of a process's memory”. But a straightforward attempt to use it only gives me $ cat /proc/$$/mem ...
266
votes
7answers
23k views

Understanding the Linux kernel source

I am trying to understand how a function, say mkdir, works by looking at the kernel source. This is an attempt to understand the kernel internals and navigate between various functions. I know mkdir ...
16
votes
1answer
548 views

Configuring, compiling and installing a linux kernel

I'd like to try using a kernel other than the one provided by my distro -- either from somewhere else, or as customized by me. Is this difficult or dangerous? Where do I start?
24
votes
4answers
31k views

How to reload udev rules without reboot?

How should one reload udev rules, so that newly created one can function? I'm running Arch Linux, and I don't have a udevstart command here. Also checked /etc/rc.d, no udev service there.
23
votes
7answers
13k views

Linux Kernel: Good beginners' tutorial

I'm interested in modifying the kernel internals, applying patches, handling device drivers and modules, for my own personal fun. Is there a comprehensive resource for kernel hacking, intended for ...
8
votes
4answers
2k views

How can same fd in different processes point to the same file?

Say I have process 1 and process 2. Both have a file descriptor corresponding to the integer 4. In each process however the file descriptor 4 points to a totally different file in the Open File Table ...
2
votes
5answers
3k views

Kernel can't find /dev/sda file during boot

I configured a gentoo kernel (kernel-2.6.36-gentoo-r5), but when I boot it can't mount /dev/sda1: ALERT! /dev/sda1 does not exist . Dropping to a shell . I use the shell to go to the /dev ...
6
votes
1answer
4k views

Description of kernel.printk values

Between Debian 5 and 6, the default suggested value for kernel.printk in /etc/sysctl.conf was changed from kernel.printk = 4 4 1 7 to kernel.printk = 3 4 1 3. I understand that the first value ...
12
votes
2answers
2k views

How to blacklist a correct bad RAM sector according to MemTest86+ error indication?

MemTest86+ (the version included with Ubuntu 13.04) says Failing address: 002f796c48 - 759.5 MB What should I specify in the memmap kernel parameter to bypass this area? I've tried running ...
10
votes
1answer
1k views

How do pdflush, kjournald, swapd, etc interoperate?

Recently saw a question that sparked this thought. Couldn't really find an answer here or via the Google machine. Basically, I'm interested in knowing how the kernel I/O architecture is layered. For ...
9
votes
1answer
1k views

What's the progress regarding improving system performance/responsiveness during high disk I/O?

Whenever there is high disk I/O, the system tends to be much slower and less responsive than usual. What's the progress on Linux kernel regarding this? Is this problem actively being worked on?
9
votes
1answer
3k views

What does a kernel source tree contain? Is this related to Linux kernel headers?

In books, I typically read references to the Linux Source Tree at /usr/src/linux with the usual set of subdirectories (arch, block, crypto, ...). I was expecting this tree to contain the binary files ...
7
votes
1answer
1k views

When was `relatime` made the default?

What is the first Linux kernel release to set relatime as the default mount option?
49
votes
5answers
20k views

What are high memory and low memory on Linux?

I'm interested in the difference between Highmem and Lowmem: Why is there such a differentiation? What do we gain by doing so? What features does each have?
63
votes
12answers
7k views

What is the benefit of compiling your own linux kernel?

What benefit could I see by compiling a Linux kernel myself? Is there some efficiency you could create by customizing it to your hardware?
16
votes
1answer
1k views

Why isn't a straightforward 1/5/15 minute moving average used in Linux load calculation?

Until recently i thought the load average (as shown for example in top) was a moving average on the n last values of the number of process in state "runnable" or "running". And n would have been ...
13
votes
3answers
261 views

What are the responsibilities of each Pseudo-Terminal (PTY) component (software, master side, slave side)?

I am trying to figure out how a tty works1 (the work-flow and responsibilities of each elements). I have read several interesting articles about it, but there are still some blurry areas. This is ...
25
votes
12answers
2k views

How can I tweak my Linux desktop to be more responsive?

I have the experience that Linux works fine until the physical memory is exhausted. As soon as swap space is used the performance is severely degraded and the GUI becomes unresponsive. This problem ...
4
votes
6answers
6k views

How does a kernel mount the root partition?

My question is with regards to booting a Linux system from a separate /boot partition. If most configuration files are located on a separate / partition, how does the kernel correctly mount it at boot ...
13
votes
3answers
3k views

What does the vm.swappiness parameter really contol?

Per the kernel documentation: This control is used to define how aggressive the kernel will swap memory pages. Higher values will increase agressiveness, lower values decrease the amount of swap. ...
9
votes
1answer
2k views

How do you empty the buffers and cache on a Linux system?

Prior to doing some benchmarking work how would one free up the memory (RAM) that the Linux Kernel is consuming for its buffers and cache?
11
votes
2answers
522 views

Contents of /proc

Is there a site someplace that lists the contents of /proc and what each entry means?
6
votes
3answers
3k views

How to generate initramfs image with busybox links?

Having been directed to initramfs by an answer to my earlier question (thanks!), I've been working on getting initramfs working. I can now boot the kernel and drop to a shell prompt, where I can ...
13
votes
6answers
4k views

How does Linux kernel compare to microkernel architectures?

I read once that one advantage of a microkernel architecture is that you can stop/start essential services like networking and filesystems, without needing to restart the whole system. But considering ...
10
votes
6answers
1k views

Can Linux “run out of RAM”?

I saw several posts around the web of people apparently complaining about a hosted VPS unexpectedly killing processes because they used too much RAM. How is this possible? I thought all modern OS' ...
9
votes
5answers
7k views

Is it possible to install the linux kernel alone?

I'm just curious if it's possible to install the linux kernel alone, or if you need to use one of the flavours. If it were possible, how would you do it? I don't need a detailed tutorial. I just want ...
6
votes
1answer
4k views

What is the loopback interface

What is the loopback interface and how does it differ from the eth0 interface? And why do I need to use it when mounting an ISO or running a service on localhost?
2
votes
4answers
994 views

How do I upgrade the Debian Wheezy kernel offline?

I using Debian (Wheezy) with the 3.2.0-4 amd64 kernel version and want to upgrade my kernel to newest version, like 3.13.3 stable, but I have no internet connection to my Debian OS. I have installed ...
5
votes
1answer
422 views

What are the main differences between Unix and Linux kernels today?

I know that many of the same programs run flawlessly on top of both kernels. I know that historically, the two kernels came from different origins. I know philosophically too that they stood for ...
5
votes
2answers
5k views

Cleancache vs zram?

I have an old laptop here with only 512 MB of RAM. Since a few kernel releases, I am using zram to convert 256 MB of it to a compressed ramdisk which is then used as swap. This has proved to be very ...
9
votes
3answers
3k views

How do I begin with building a Linux system from scratch?

I tried to make an operating system with my on custom built kernel. It didn't work out too well. I am using Ubuntu and have downloaded Linux 3.2.7 from kernel.org . I am not trying to change the ...
3
votes
1answer
70 views

How security programs like firewall, IPS and IDS have access to network data?

It is said that kernel responsible for the transport, internet and network access layers for a network data. Then, the network data is passed on the appropriate process based on port number. How ...
3
votes
3answers
609 views

Debugging ethernet before NFS boot

I'm trying to boot Linux from U-boot on an embedded ARM board using a filesystem on a remote machine served via NFS. It appears that the ethernet connection is not coming up correctly, which results ...
2
votes
2answers
1k views

removing linux kernels

Below are all the linux kernels that are running on my machine. I am trying to make a debian base install as light as possible. The kernel I am running is linux-image-2.6.30-vortex86mx-apm. I am ...
1
vote
2answers
203 views

TLB cache flusing when a page is swapped out

I recently heard that Linux simply flushes the TLB cache when the corresponding data in that physical address is swapped out, resulting in underutilization of the TLB. I don't know whether all OSes do ...
1
vote
0answers
319 views

Make and apt-get Have Stopped Working

So I downloaded the non-free broadcom driver(b44) for my debian install, however when I try to make it I get the following error: make make -C /lib/modules/2.6.32-5-amd64/build ...
-1
votes
3answers
609 views

How can I create my own distro and include a custom kernel & packages? [closed]

I wanted to know how to add packages to the Linux kernel and then package it to a ISO or CD for friends. Thanks in advance and please don't point me to LFS - Linux From Scratch!
36
votes
5answers
2k views

How to compile the C compiler from scratch, then compile Unix/Linux from scratch

Let's say I work for a large services organisation outside the US/UK. We use UNIX and Linux servers extensively. Reading through this article it mentions that it would be easy to insert a backdoor ...
30
votes
4answers
19k views

What is the difference between reboot , init 6 and shutdown -r now?

I just want to know difference between in reboot init 6 shutdown -r now and which is the safest and the best?
10
votes
1answer
4k views

What does the Virtual kernel Memory Layout in dmesg imply?

While going through the "Output of dmesg" I could see a list of values which i am not able to understand properly. Memory: 2047804k/2086248k available (3179k kernel code, 37232k reserved, 1935k ...
13
votes
4answers
430 views

How do I learn what I can do with /proc and /sys

I'd like to know more about the advanced uses of the /proc and /sys virtual filesystems, but I don't know where to begin. Can anyone suggest any good sources to learn from? Also, since I think sys has ...
23
votes
1answer
2k views

High CPU usage with CFS?

I asked a previous question to try and isolate the source of an increase in CPU usage when moving an application from RHEL 5 to RHEL 6. The analysis that I did for that seems to indicate that it is ...
11
votes
1answer
9k views

How to use Linux kernel driver bind/unbind interface for USB-HID devices?

First background. I am developing a driver for Logitech game-panel devices. It's a keyboard with a screen on it. The driver is working nicely but by default the device is handled by HID. In order to ...
8
votes
2answers
1k views

Heavy write activity on SSD nukes system performance

I've noticed that when I do heavy write applications, the whole system slows down. To test this further I ran this to do a (relatively) low-CPU, high disk activity: john -incremental > file_on_SSD ...
13
votes
2answers
3k views

Why is swappiness set to 60 by default?

I just read some stuff about swappiness on Linux. I don't understand why the default is set to 60. According to me this parameter should be set to 10 in order to reduce swap. Swap is on my hard ...
5
votes
1answer
1k views

Silent booting Linux from u-boot

For security reasons I have to boot Linux from u-boot with all output hidden (silently) until a password is entered. I've configured uBoot to do this correctly using the CONFIG_AUTOBOOT_KEYED macro ...
4
votes
2answers
1k views

How to know if a network interface is tap, tun, bridge or physical?

As far as i know, there are 4 main types of network interfaces in linux: tun, tap, bridge and physical. When i'm doing sys admin on machines running KVM, i usually come accross tap, bridge and ...
9
votes
1answer
2k views

Why does Red Hat Linux use such an old kernel?

Why does RHEL (and its derivatives) use such an old kernel? It uses 2.6.32-xxx, which seems old to me. How do they support newer hardware with that kernel? As far as I know these kind of distributions ...
6
votes
2answers
188 views

what's the format spec for `ss -D `?

Background of the question: I am trying to sum up the total bandwidth, but ss -i cleverly converted numbers to more readable format like Kbps/s or Mbps/s, which is not accurate. So does ss -o with ...
6
votes
3answers
2k views

How to read the in-memory (kernel) partition table of /dev/sda?

I accidentally overwrote my /dev/sda partition table with GParted (full story on AskUbuntu). Since I haven't rebooted yet and my filesystem is still perfectly usable, I was told I might be able to ...