Questions tagged [linux-kernel]
Questions about Linux kernel and Linux kernel related topics eg. implementation details such as system calls, kernel customization, etc. For Linux user space topics which do not involve kernel details, [linux] or distribution tag are more suitable.
3,589
questions
6
votes
2
answers
3k
views
Linux kernel manual build: resulting binary is 10 times larger than precompiled binaries
I'm using Linux Mint 13 MATE 32bit, I'm trying to build the kernel (primarily for experience and for fun).
For now, I like to build it with the same configuration as precompiled kernel, so firstly I'...
6
votes
2
answers
21k
views
net.ipv4.conf.all.mc_forwarding: why is my access denied?
On Debian 12.04 LTS
I am trying to access the key net.ipv4.conf.all.mc_forwarding by doing :
sudo sysctl -w net.ipv4.conf.all.mc_forwarding=1
But every time I am doing this, I get the message
...
6
votes
1
answer
8k
views
sigaction(7): semantics of siginfo_t's si_code member
I've got a long-running program (becomes a daemon with daemon(3) call) that exits on Signal 11 (Segmentation Violation) every so often. I can't tell why. So, I wrote a SIGSEGV handler, set using the ...
6
votes
2
answers
2k
views
How is the kernel loaded?
I am trying to understand the Linux boot process, and after reading quite some amount of documentation there is one point that I still can't seem to understand.
So the basicis is BIOS -> Grub MBR -> ...
6
votes
1
answer
6k
views
Include in-kernel firmware blobs in kernel binary
I am compiling my own kernel (4.4.x) on Debian Stretch, and I want to include the firmware for my radeon graphics card in the kernel, so that it does not need to be loaded from userspace.
...
6
votes
1
answer
6k
views
"Unable to find an initial ram disk that I know how to handle" when trying to install new kernel
I am trying to install a new kernel that I just built from source using the following command on a machine currently running Linux rc70 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u2 (2016-01-02) ...
6
votes
2
answers
20k
views
Kernel compilation error recipe for target 'deb-pkg' failed
I am compiling the latest kernel cloned from Linus's git repository for a challenge. Here are the steps I followed,
1. Installed cross compilation tools
sudo apt-get install git build-essential ...
6
votes
1
answer
5k
views
Is there a command to switch to into an existing namespace?
I am using multiple UTS namespaces, each of them has some servers constantly running.
I can get the namespace IDs via readlink /proc/<pid>/ns/uts, now I would like to change into a given ...
6
votes
2
answers
5k
views
Why does “/proc/config.gz” show wrong configuration?
The file /proc/config.gz isn't updated when I rebuild kernel with changed configuration (from make menuconfig). For instance, I have rebuilt kernel with BLK_DEV_IO_TRACE which works fine but config.gz ...
6
votes
1
answer
1k
views
About mounting and umounting inherited mounts inside a newly-created mount namespace
Experiment 1
From outside the namespace, cat /proc/self/mountinfo gives
291 34 0:37 / /tmp/IMJUSTTMP rw,relatime shared:152 - tmpfs tmpfs rw,size=102400k
34 23 0:32 / /tmp rw,nosuid,nodev shared:16 -...
6
votes
1
answer
7k
views
How large are the "watermark" memory reservations on my system?
swappiness
This control is used to define how aggressive the kernel will swap
memory pages. Higher values will increase aggressiveness, lower values
decrease the amount of swap. A value of ...
6
votes
2
answers
20k
views
How to create device files manually use mknod?
Linux 2.6.26.5 embedded. I need manually mount the root file system from busybox shell (initramfs). Because this Linux kernel not use devtmpfs, I have to create the basic device nodes manually, use ...
6
votes
1
answer
3k
views
Practical use of uname in chroot?
I am preparing an OS image through a combination of bootstrapping and chrooting. Some actions (e.g. building kernel modules) rely on uname output, which reports the host configuration even inside the ...
6
votes
2
answers
5k
views
How to build a custom kernel? [duplicate]
I want to test an (upstream) custom kernel on Fedora.
The plan so far is:
use a recent fedora config as starting point, e.g. /boot/config-3.6.6-1.fc17.x86_64
lookup build dependencies
lookup right ...
6
votes
1
answer
2k
views
Why does the kernel image need to be compressed?
Why does the kernel image have to be compressed vmlinuz, instead of vmlinux?
"vmlinuz is a compressed Linux kernel, and it is bootable. Bootable means that it is capable of loading the operating ...
6
votes
1
answer
448
views
How does the Linux Kernel handle newer chips that patched only against Spectre Variant 1 but not Variant 2?
How will chips patched for Spectre Variant 1 and Meltdown, like Whiskey Lake and Amber Lake, handle Spectre Variant 2? I'm looking to spec out a new laptop. Currently evaluating the Lenovo x390. It's ...
6
votes
1
answer
2k
views
AMD microcode not updating
I have recently installed Gentoo Linux on my AMD Ryzen 7 1700X.
Now I face segmentation faults during heavy compilation loads and also random restarts in an idle state.
As a very first step I ...
6
votes
1
answer
2k
views
How to combine linux kernel and initrd without compiling?
I know that it's possible to extract from a linux kernel the embedded initramfs cpio. I want to know if the reverse operation is possible; i.e., given both a compiled kernel and initramfs archive, how ...
6
votes
2
answers
2k
views
Linux resume when using multiple swap partitions
If a Linux system is using more than one swap device and suspend to disk, how does one setup the resume= kernel parameter?
6
votes
1
answer
2k
views
What does ACPI NMI LINT mean? and Why it changes across kernel version?
I'd like to understand what the following lines mean
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] dfl dfl lint[0x0])
[ 0.000000] ACPI: NMI not connected to LINT 1!
[ 0.000000] ACPI: LAPIC_NMI (...
6
votes
2
answers
3k
views
What format is this kernel image? Can not extract kernel code from it?
I got an android image which contains:
-rwxr-xr-x 1 root root 69206016 Dec 16 17:01 cache.img
-rwxr-xr-x 1 root root 6024864 Mar 23 2016 Image
-rwxr-xr-x 1 root root 1108329 Mar 7 2016 ...
6
votes
1
answer
1k
views
Why kernel threads are treated as processes
In output of the ps command like the one below (kthreadd,ksoftirqd,kworker) , i can see that there are some processes that don't have an executable file and i find out that's because they are kernel ...
6
votes
2
answers
3k
views
can't initialise/detect 16550A UART at unusual io port address
I've got a board based on the Vortex86DX CPU which is an x86 based microcontroller. It has five 16550A UARTS, four (COM1-COM4) of which are at the usual io port addresses (0x3f8, 0x2f8, 0x3e8, 0x2e8) ...
6
votes
1
answer
3k
views
How extended (4MB) and regular (4KB) paging coexist?
On x86 architecture, "Extended paging" allows page frames (physical memory) to be 4 MB instead of 4 KB.
The book "Understanding the Linux Kernel, 3rd" at chapter 2 "Memory Addressing", sub-chapter "...
6
votes
1
answer
44
views
How useful is ionice tool with modern linux kernel
The ionice tool is supposed to offer relief on high I/O load by executing commands only when the system is in a specified state.
The man page states:
Linux supports I/O scheduling priorities and ...
6
votes
1
answer
2k
views
SCHED_BATCH description confusing - what does it actually do?
There are several scheduling options in Linux, which can be set to a process with the help of a chrt command line. And I can't seem to grasp one of them... Which is SCHED_BATCH. In fact, it's ...
6
votes
1
answer
395
views
What's the point of naming Iptables' tables as "tables"?
After reading some guides (e.g. this one) and playing with Iptables tuning I found that I see no reason for naming Iptables' tables as tables.
I mean that there practically are no tables.
E.g. having &...
6
votes
2
answers
2k
views
How to enable QCA6390 Bluetooth firmware in Linux kernel?
Context
I'm having difficulty getting the kernel to load the necessary Bluetooth firmware for my XPS 9310. My model has the AX500 connectivity chip, which uses the QCA6390.
Users of both Ubuntu and ...
6
votes
3
answers
472
views
Secure variables protected by Linux kernel
Is there a possibility to place variables under the custody of the Linux kernel?
E.g. counters that may only be incremented, variables that can be written to but only read after authentication.
...
6
votes
1
answer
75
views
Does linux stops processing related to GUI when we remove the desktop screen from connection from cabinet(CPU box)?
When there is big non interactive software running and if I required more processing power then, after removing the desktop screen does kernel stops processing related to GUI(graphical user interface) ...
6
votes
1
answer
2k
views
How to prevent kernel or any broadcast messages from flooding the TTYs?
Because of some hot-plugging issue, similar to what talked of here, the TTY displays show a continuous stream of messages (which are also logged in the /var/log directory). Every text I key in flows ...
6
votes
1
answer
519
views
Do all devices under Linux have a device node?
I know that each device on Linux is either a char or block or network device.
Do all physical devices that exist on Linux have a device node under the /dev directory? I'm not talking here about ...
6
votes
1
answer
1k
views
Does the kernel delete entries in /dev on an initramfs?
I have a fully custom, minimal, embedded Linux (vanilla, 3.3.8, i486, Vortex86dx) system that boots from an initramfs image. No standard distribution scripts are used, just a single rcS file that does ...
6
votes
0
answers
171
views
Kernel config for keyboard special LEDs
I'm building a 4.9 linux kernel (which is working great) for my T460s. The F1 key has a led that shows if sound is muted. I can't get this LED to work even when enabling all kinds of LED-relevant ...
6
votes
0
answers
715
views
Explain "kobject" [closed]
I started reading Linux Kernel Architecture by Wolfgang Maurer.
Right in the beginning of the book he makes a note and tries to explain what kobjects are and their purposes.
So after reading and ...
6
votes
1
answer
1k
views
What does "make install" do in the Makefile that comes with the kernel?
I'm trying to identify what does make install do with the kernel and what does the actual "install" of the kernel once it's been compiled means.
The problem is I can't really identify the target (...
6
votes
0
answers
699
views
Allocated Memory difference in xen guests after using Linux 3+ kernel [closed]
Can someone explain to me why there is a memory difference in Guests with the same configuration?
Hypervisor: xen 4.2 64 bit
VM1: Centos 5.7 with 2.6.18-274.el5xen
Assigned memory from xen is ...
5
votes
3
answers
13k
views
How to use 5.16 kernel with Ubuntu 21.10?
I'd like to upgrade my kernel to try to fix a persistent issue I have with intermittent freezing.
I've tried manually installing the kernel, but it throws errors during configuration and then upon ...
5
votes
6
answers
4k
views
Is there a plain GNU/Linux OS?
I'm currently looking at all the different Linux distros and can't seem to find the original GNU/Linux OS. Apparently there is a GNU System which combined the GNU project with the Linux kernel. How do ...
5
votes
2
answers
10k
views
"Last resort" Linux terminal command to reboot (over ssh) in case of a kernel bug?
I have a small server with Ubuntu 10.04 on it; I am manipulating this server from another computer via ssh, and I tried to use nfs on it to share files. That mostly works, until one of the clients ...
5
votes
2
answers
1k
views
Are Linux kernel modules a sort of Linux system paged pool?
I always read that Linux kernel isn't pageable.
If I'm not mistaken Windows, instead, divedes system virtual memory in
a paged part (paged pool) and non-paged part (non-paged pool).
The non-paged part ...
5
votes
3
answers
677
views
How can I make a shell to show up in my own distro (linux)? [closed]
I am interested in Linux and been digging it for a while. I just learnt to compile a Linux kernel from source and boot it with Grub which lands you with the shell of the kernel.
Now as soon as the ...
5
votes
3
answers
3k
views
dirty_ratio per device
I've recently examined a RHEL7.2 that hanged almost totally just because it have written to a CIFS filesystem. With the default settings of dirty_ratio = 30 and cifs being cached (for both reading and ...
5
votes
3
answers
7k
views
Do tmpfs and devtmpfs share the same memory region?
My system disk usage is like this:
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rhel-root 50G 39G 12G 77% /
devtmpfs 5.8G 0 5.8G 0% /dev
...
5
votes
2
answers
5k
views
Are Linux drivers part of the kernel or the rootfs
I have been working on a board with an embedded ARM processor. To get it to boot I have to add a bootloader, a linux kernel and a disk image containing the root file system. This disk image is ...
5
votes
2
answers
1k
views
Given a block device, how to detect if names of partitions must contain "p"?
I want to automatically partition a block device with sfdisk. This might be an SD card, a hard disk, SATA or NVME device.
Initially I thought that sfdisk requires these names and thus I was looking ...
5
votes
1
answer
11k
views
Where is page table stored in Linux?
I want know where Linux stores page tables. Is it in kernel virtual memory?
It seems like this has to do with virtual memory system. but I'm new to it, so if I'm in the wrong direction please let me ...
5
votes
2
answers
2k
views
Commented sections in kernel config
I'm exploring methods of tracking the changes that happen to the kernel defconfig for a particular board. The changes I'm referring to are either selecting a new option through the menuconfig and ...
5
votes
1
answer
495
views
Can loop devices be automatically cleaned up when a process exits?
I'm trying to figure out a clean and safe way to use loop devices inside of a build script. To the best of my knowledge loop devices are required if you want to (GPT) partition and (FAT32, EXT3) ...
5
votes
1
answer
3k
views
Why do net.bridge.bridge-nf-call-{arp,ip,ip6}tables default to 1?
At least in Arch Linux, this is the default. I think this makes bridge behavior conterintuitive because it's supposed to act like an unmanaged switch and it's now dropping packets, as most of our ...