Everything about UNIX kernels: development, configuration, compilation, design, etc.
41
votes
3answers
17k 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 ...
227
votes
7answers
20k 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 ...
2
votes
5answers
2k 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 ...
20
votes
7answers
9k 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 ...
13
votes
3answers
8k 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.
8
votes
1answer
858 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?
4
votes
1answer
1k 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 ...
24
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 ...
10
votes
2answers
435 views
Contents of /proc
Is there a site someplace that lists the contents of /proc and what each entry means?
5
votes
4answers
1k 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 ...
5
votes
3answers
2k 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 ...
5
votes
5answers
4k 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 ...
4
votes
1answer
2k 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?
9
votes
3answers
2k 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
3answers
497 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 ...
1
vote
2answers
87 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
245 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 ...
56
votes
12answers
5k 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?
13
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 ...
23
votes
1answer
1k 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 ...
13
votes
4answers
371 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 ...
3
votes
6answers
4k 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 ...
9
votes
1answer
6k 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
...
8
votes
1answer
140 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 ...
7
votes
1answer
382 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
3answers
917 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 ...
4
votes
2answers
708 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 ...
8
votes
1answer
2k views
Isolating cause of higher CPU usage on RHEL 6 vs RHEL 5
I'm currently looking to move our system from RHEL 5 to RHEL 6, but I've run into a snag with unexpectedly high CPU usage on the RHEL 6 machines. It appears that this may be due at least in some part ...
8
votes
1answer
1k 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.
...
6
votes
1answer
134 views
Blocking kernel updates with dpkg
I'd like to block all distribution-shipped kernel updates due to a nasty thing that recently happened to me. (I'm on a Ubuntu 12.04 amd64 derivative.)
I'd like to block all updates to installed ...
5
votes
1answer
314 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
3answers
888 views
How can I tweak the kernel for total swap out?
I would like to deploy the following swapping policy:
By default all pages in memory should also be in swap space.
When a page in memory is changed (i.e. dirty), the page should be written out as ...
3
votes
2answers
689 views
Can I detect if my custom made kernel was built with module support?
I have been provided with a vendor supplied minimal linux installation. From an answer to a previous question I discovered that it is possible to build a kernel with or without module support. I have ...
3
votes
1answer
1k views
Debian 6.0 system with 2.6.39 kernel dropping packets, sandy bridge hardware
I recently migrated an existing Debian system to new hardware, a core i3 chip running on an intel sandy bridge motherboard. I’m experiencing a very strange problem; when I ping my router, about 50% of ...
3
votes
3answers
2k views
Prevent claiming of novelty usb device by usbhid so I can control it with libusb?
I have a USB rocket launcher that I wish to experiment with through libusb. However, libusb cannot claim the interface; presumably because the output of usb-devices lists 'usbhid' as the driver for ...
2
votes
1answer
3k views
Command to install linux headers fails
I need to install my linux headers for an Nvidia driver install. But I get an error when doing so:
peter@peter-deb:~$ sudo apt-get install linux-headers-$(uname -r)
Reading package lists... Done
...
13
votes
3answers
920 views
Why don't you need to update drivers? (Or do you?)
In my life I've not once updated drivers on any of my Linux systems, though they have all been desktops. A friend was asking me why one does not need to update Linux drivers and I found myself unable ...
8
votes
6answers
1k views
How to find information about the system/machine in Unix?
I have always found it difficult to find information about the system itself in Unix, whether it be
Which OS I am using (version number and all, to compare it with the latest available builds)?
...
6
votes
1answer
510 views
Linux kernel 3.3 power regression
I am using Fedora 16 in my DELL n4110. I recently upgraded the kernel from 3.2 to 3.3. In contradiction to the official claim, my system still drains battery as hell. It only provides 1:30 to 2 hrs of ...
6
votes
1answer
933 views
When was `relatime` made the default?
What is the first Linux kernel release to set relatime as the default mount option?
5
votes
1answer
340 views
User Kernel split in 64bit Linux
What is the default user/kernel split in the 64bit linux ?
I read Documentation/x86_64/mm.txt (which someone pointed out), but I could not make out. Can somebody provide a direct answer (something ...
5
votes
2answers
2k views
How can I know which IRQ is responsible of high CPU usage
I've moved a server from one mainboard to another due a disk controller failure.
Since then I've noticed that constantly a 25% of one of the cores goes always to IRQ however I haven't managed myself ...
4
votes
1answer
2k 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 ...
4
votes
1answer
259 views
NetBSD 5.1 NDIS Kernel Compile Error
I have an old Toshiba Satellite 4015CDT, with Pentium II MMX, 32MB RAM, 4GB HDD. It also has one USB 1.0 port, parallel and serial ports, a 3.5" floppy drive and a CD-ROM drive (almost dead). I've ...
4
votes
3answers
882 views
Recompile Kernel to Change Stack Size
I need to recompile my kernel on RHEL WS5 with only two changes.
Change stack size from 4k to 8k
Limit usable memory to 4096.
How do I recompile the kernel without changing anything else but ...
3
votes
1answer
685 views
Installing OpenVPN to replace Cisco VPN because Cisco will not work with the kernel I am on or downgrade instead?
I had difficulties installing Cisco5.0 VPN on my Ubuntu 10.04 LTS. I asked for assistance in this question: link to previous question. The answer is that this Cisco program will run on only older ...
3
votes
2answers
5k views
What is the difference between Non-preemptive, Preemptive and Selective Preemptive Kernel?
What is the difference between a "Non-preemptive", "Preemptive" and "Selective Preemptive" Kernel?
Hope someone can shed some light into this.
2
votes
2answers
529 views
Where can I find the Linux driver for headphones in the kernel tree?
I have headphones with three buttons on them which allow me to control my music player with my phone. I want to write a driver for my headphones to make it control my music player on my pc (Ubuntu ...
2
votes
1answer
4k views
/lib/modules/2.6.37.6/build missing in linux puppy? what should I do?
I am new to linux as of yesterday. I'm using linux puppy to try to get the most out of a 10 year old, slow laptop. I installed it fine, no problems there, but as soon as I try to use my usb dongle's ...
