date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,483,543,885,000 |
I am using ARM Foundation Model to emulate a arm-v8 environment(I need both TrustZone and KVM), and I run a kvm-enabled linux on it as the Host OS, the kernel version is 3.14.0(I clone it following the guide on virtualopensystems.
However, when try to run a guest OS, I met with some problems(both kvm-tools and qemu-s... |
It turns out to be the matter of Image, I recompile the kernel and then it is OK.
But there is some problems of lkvm-tools, it couldn't initialize the ioctl normally.
| Unable to boot a kvm guest via qemu/kvm-tools |
1,483,543,885,000 |
I am new to VyOS development. I have written a patch which will fetch info from the VyOS kernel module and write it on a netlink socket. But the problem is I am not sure if I should edit the kernel module code directly to call my defined function or I should write the patch. If I have to make a patch file for it then ... |
After a long search I solved the problem I was facing. Here is conclusions in case any of you gets stuck in same problem.
Yes, you can edit the kernel module code in VyOS Development. But this method is not much appreciated.
Yes, you can write patch for kernel modules too. and it should be in GIT formate as describe... | How to write a Patch for VyOS kernel |
1,483,543,885,000 |
I have recently started learning kernel module programming using the book The Linux Kernel Module Programming Guide
and I dont understand how does this make work
obj-m += hello-1.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) cl... |
Here is a breakdown of what is going on in this makefile:
There is a list of objects someplace, add "hello-1.o" to the list.
obj-m += hello-1.o
Create a target called all that has no requirements. The recipe to make all is to change in to the build directory in the directory that is named based on the current kernel ... | make for linux kernel module |
1,483,543,885,000 |
Upgrading kernel manually on Ubuntu 14.04 can cause trouble with NVIDIA drivers? (one of the troubles could be booting to black screen)
I had lot of trouble with installing NVIDIA graphics drivers and getting it work, I had to reinstall my Ubuntu 14.04 four times.
Few reasons were installing nvidia*.run file and booti... |
Not always, newer versions of kernel may not be able to build DKMS modules with nvidia because of which nvidia drivers may not work when booted with that kernel.
As of 25 April 2015 I tried to install Linux kernel v4 which failed to work with nvidia so I had to remove it.
| Is it safe to upgrade kernel manually on a system which is using NVIDIA drivers? |
1,483,543,885,000 |
I 'm running Angstrom distribution (console only) on BeagleBoard-xM. Image was build on Narcissus, with Bootloader Files (x-load/u-boot/scripts) added.
I noticed that usr/src directory is empty. I intend to install kernel source packages. For this reason, I downloaded Linux kernel 2.6.32 from https://www.kernel.org. W... |
Just untar (tar xf kernel-sources.tar.whatever) it into /usr/src - or anywhere else for that matter.
Just remember that if you want to use the symlinks /lib/modules/kernel/{build,source} that point to the kernel build and source tree, respectively, as created by make modules_install, you'll need to either keep the sou... | How to install kernel sources |
1,483,543,885,000 |
In general what is supposed to be in the Module section of the Xorg.conf file in order to get maximum performance from a graphic card?
At the moment my Module section is empty... also because I didn't find any useful doc about modules.
...and if it matters, my graphic card is an ATI Radeon HD 5700 Series and I've alre... |
As far as I know those days are over.
There are driver settings which are supposed to improve performance ... if Xorg does not use these settings anyways.
Option "ColorTiling" "1"
Option "EnablePageFlip" "1"
Option "AccelMethod" "EXA"
Don't know what they do. Got those off some forum a long time ago. The first 2 are ... | Xorg.conf, which modules should be loaded for better performance? |
1,483,543,885,000 |
From the answers to this question I have discovered that the embedded Linux distribution provided to me, by my hardware supplier, was not built with kernel support. If I am to use this distribution I have to be able to install drivers for some CANBUS hardware that will be attached. The source for the drivers is provid... |
By definition, if the kernel does not support loadable modules, you cannot load a module.
As you have already been told, there is something you can do: install a kernel compiled by someone else or recompile a kernel, with loadable modules and all the extra drivers you like.
I recommend that you first try installing an... | Installing a .ko module on an embedded Linux system that does not support modules |
1,483,543,885,000 |
I have RedHat Enterprise Linux Server 7, and I downloaded the linux kernel version 4.12.10 which I am trying to compile but when I execute the following command:
make modules
I get the following error:
scripts/sign-file.c:25:30: fatal error: openssl/opensslv.h: No such file or directory
Does anyone have an idea to ... |
You must install the OpenSSL development files (package openssl-devel)
| How to fix: fatal error: openssl/opensslv.h: No such file or directory in RedHat 7 |
1,483,543,885,000 |
I am trying to compile the linux kernel 5.15.64 but it fails. I have the config and use make -j4 && sudo make modules_install -j4 but this is the error I get.
make[1]: *** [kernel/Makefile:160: kernel/kheaders_data.tar.xz] Error 127
make: *** [Makefile:1896: kernel] Error 2
What is going wrong in the process?
|
There is a bug report https://bugs.gentoo.org/701678 that has the same messages. This was caused by having CONFIG_IKHEADERS=m in your configuration and not having cpio available.
| Error trying to compile kernel 5.15 |
1,457,991,018,000 |
Following these guides (https://github.com/ToadKing/wii-u-gc-adapter/blob/master/README.md and https://dolphin-emu.org/docs/guides/how-use-official-gc-controller-adapter-wii-u/#Linux) - I've tried these steps:
sudo su; apt update && apt upgrade -y && apt dist-upgrade -y && apt install jstest-gtk -y
echo 'SUBSYSTEM=="u... |
What worked for me is returning the off brand hardware and buying the official adapter made by Nintendo. The off brand YTEAM adapter doesn't seem to work with Linux.
| How do you wii-u-gc-adapter working on 64-bit debian? |
1,457,991,018,000 |
So I'm compiling the 6.0.3 kernel in Debian 11, and I've been given the task of getting the smallest kernel possible that boots and has Internet connection.
I find myself at a point where I've compiled the kernel 89 times in total, and my kernel has 599 static modules and 0 loadable modules.
I'm using the command make... |
To build a minimal kernel you should use make tinyconfig instead of make nconfig.
To disable the graphic interface, use:
sudo systemctl set-default multi-user.target
to revert back:
sudo systemctl set-default graphical.target
But it doesn't make the kernel smaller.
| How to disable GUI when compiling the linux kernel? |
1,457,991,018,000 |
/rtlwifi_new# make && make install
make -C /lib/modules/4.12.0-kali2-amd64/build M=/root/rtlwifi_new modules
make[1]: *** /lib/modules/4.12.0-kali2-amd64/build: No such file or directory. Stop.
Makefile:58: recipe for target 'all' failed
make: *** [all] Error 2
I am trying to increase the link strength of my WiFi us... |
You need to install the development tools and the headers of your kernel:
apt install build-essential
apt install linux-headers-4.12.0-kali2-amd64
| make command not working |
1,457,991,018,000 |
I want to install Debian 9 in the aforementioned laptop but I know from my experience that it will not be easy (I have tried in the past Ubuntu but only Mint worked - I suppose that there is some incompatibility with the graphics card which is NVDIA).
I found online (https://wiki.debian.org/InstallingDebianOn/Dell/Ins... |
I'm not sure if this solves all the problems you may experience at installation, but answers the question how to start up with the parameter set.
There are two steps required. The first one is after you've installed the OS and booting up, you need to boot your OS with this parameter added by hand. Then, once the OS is... | Installation of Debian 9 in Dell Inspiron 7559 |
1,457,991,018,000 |
im new to linux , and im using linux clear distribution
im trying to conect my DSLR to be like webcam
trying make this module to install and it not working
this is my output
$ make
Building v4l2-loopback driver...
make -C /lib/modules/`uname -r`/build M=/home/yukehi/הורדות/v4l2loopback-master modules
make[1]: *** /... |
"make this module to install", and
"how to make a module install"
could combine into make modules_install, which is a special make target. These other two targets are included in make (if in the linux source dir):
* vmlinux - Build the bare kernel
* modules - Build all modules
That means make modules... | how to make a module install in linux |
1,377,261,966,000 |
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?
Note that this is mostly useful for benchmarking. Emptying the buffers and cache reduces performance! If you're here because you thought that freeing buffers and cache was a posit... |
Emptying the buffers cache
If you ever want to empty it you can use this chain of commands.
# free && sync && echo 3 > /proc/sys/vm/drop_caches && free
total used free shared buffers cached
Mem: 1018916 980832 38084 0 46924 355764
-/+ buffers/cache:... | How do you empty the buffers and cache on a Linux system? |
1,377,261,966,000 |
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.
|
# udevadm control --reload-rules && udevadm trigger
| How to reload udev rules without reboot? |
1,377,261,966,000 |
I can't seem to find any information on this aside from "the CPU's MMU sends a signal" and "the kernel directs it to the offending program, terminating it".
I assumed that it probably sends the signal to the shell and the shell handles it by terminating the offending process and printing "Segmentation fault". So I tes... |
All modern CPUs have the capacity to interrupt the currently-executing machine instruction. They save enough state (usually, but not always, on the stack) to make it possible to resume execution later, as if nothing had happened (the interrupted instruction will be restarted from scratch, usually). Then they start exe... | How does a Segmentation Fault work under-the-hood? |
1,377,261,966,000 |
I'm currently facing a problem on a linux box where as root I have commands returning error because inotify watch limit has been reached.
# tail -f /var/log/messages
[...]
tail: cannot watch '/var/log/messages': No space left on device
# inotifywatch -v /var/log/messages
Establishing watches...
Failed to watch /var/lo... |
Is it safe to raise that value and what would be the consequences of a too high value?
Yes, it's safe to raise that value and below are the possible costs [source]:
Each used inotify watch takes up 540 bytes (32-bit system), or 1 kB (double - on 64-bit) [sources: 1, 2]
This comes out of kernel memory, which is unswap... | Kernel inotify watch limit reached |
1,377,261,966,000 |
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 /proc/self/mem
cat: /proc/3065/mem: No such process
cat: /proc/self/mem: Input/output error
Why isn't cat able to print its own memo... |
/proc/$pid/maps
/proc/$pid/mem shows the contents of $pid's memory mapped the same way as in the process, i.e., the byte at offset x in the pseudo-file is the same as the byte at address x in the process. If an address is unmapped in the process, reading from the corresponding offset in the file returns EIO (Input/out... | How do I read from /proc/$pid/mem under Linux? |
1,377,261,966,000 |
How can I pick which kernel GRUB 2 should load by default? I recently installed a Linux real-time kernel and now it loads by default. I'd like to load the regular one by default.
So far I only managed to pick the default OS... and for some reason the /boot/grub.cfg already assumes that I want to load the real-time ker... |
I think most distributions have moved additional kernels into the advanced options sub menu at this point, as TomTom found was the case with his
Arch.
I didn't want to alter my top level menu structure in order to select a previous kernel as the default. I found the answer here.
To summarize:
Find the $menuentry_id_o... | Set the default kernel in GRUB |
1,377,261,966,000 |
I've just installed kernel-3.11.0-1.fc20 for my Fedora 19 installation. During the rebooting progress, I saw the Linux logo with a Windows flag in it, what does it mean?
The Fedora 19 is installed in an ASUS TX300CA notebook, secure boot is off, CSM (BIOS Compatibility Support Module) mode is on.
|
A couple of years ago, Linus Torvalds was discussing Linux version
numbers and said, "I think I will call it 3.11 Linux for Workgroups."
It turns out he wasn't joking. With a release candidate of Linux 3.11
now available, Torvalds has actually named the new version of the
kernel "Linux for Workgroups." He even ... | What does the Windows flag in the Linux logo of kernel 3.11 mean? |
1,377,261,966,000 |
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?
|
On a 32-bit architecture, the address space range for addressing RAM is:
0x00000000 - 0xffffffff
or 4'294'967'295 (4 GB).
The linux kernel splits that up 3/1 (could also be 2/2, or 1/3 1) into user space (high memory) and kernel space (low memory) respectively.
The user space range:
0x00000000 - 0xbfffffff
Every n... | What are high memory and low memory on Linux? |
1,377,261,966,000 |
Is Kernel space used when Kernel is executing on the behalf of the user program i.e. System Call? Or is it the address space for all the Kernel threads (for example scheduler)?
If it is the first one, than does it mean that normal user program cannot have more than 3GB of memory (if the division is 3GB + 1GB)? Also, i... |
Is Kernel space used when Kernel is executing on the behalf of the user program i.e. System Call? Or is it the address space for all the Kernel threads (for example scheduler)?
Yes and yes.
Before we go any further, we should state this about memory.
Memory gets divided into two distinct areas:
The user space, whic... | What is difference between User space and Kernel space? |
1,377,261,966,000 |
What benefit could I see by compiling a Linux kernel myself? Is there some efficiency you could create by customizing it to your hardware?
|
In my mind, the only benefit you really get from compiling your own linux kernel is:
You learn how to compile your own linux kernel.
It's not something you need to do for more speed / memory / xxx whatever. It is a valuable thing to do if that's the stage you feel you are at in your development. If you want to have ... | What is the benefit of compiling your own linux kernel? |
1,377,261,966,000 |
I have seen on many blogs, using this command to enable IP forwarding while using many network security/sniffing tools on linux
echo 1 > /proc/sys/net/ipv4/ip_forward
Can anyone explain me in layman terms, what essentially does this command do? Does it turn your system into router?
|
"IP forwarding" is a synonym for "routing." It is called "kernel IP forwarding" because it is a feature of the Linux kernel.
A router has multiple network interfaces. If traffic comes in on one interface that matches a subnet of another network interface, a router then forwards that traffic to the other network inte... | What is kernel ip forwarding? |
1,377,261,966,000 |
I'm trying to install the most up-to-date NVIDIA driver in Debian Stretch. I've downloaded NVIDIA-Linux-x86_64-390.48.run from here, but when I try to do
sudo sh ./NVIDIA-Linux-x86_64-390.48.run
as suggested, an error message appears.
ERROR: An NVIDIA kernel module 'nvidia-drm' appears to already be loaded in your ke... |
I imagine you want to stop the display manager which is what I'd suspect would be using the Nvidia drivers.
After change to a text console (pressing Ctrl+Alt+F2) and logging in as root, use the following command to disable the graphical target, which is what keeps the display manager running:
# systemctl isolate multi... | How to unload kernel module 'nvidia-drm'? |
1,377,261,966,000 |
Is it possible to cause a kernel panic with a single command line?
What would be the most straightforward such command for a sudoing user and what would it be for a regular user, if any?
Scenarios that suggest downloading something as a part of the command do not count.
|
FreeBSD:
sysctl debug.kdb.panic=1
Linux (more info in the kernel documentation):
echo c > /proc/sysrq-trigger
| How to cause kernel panic with a single command? |
1,377,261,966,000 |
When I do a lspci -k on my Kubuntu with a 3.2.0-29-generic kernel I can see something like this:
01:00.0 VGA compatible controller: NVIDIA Corporation G86 [Quadro NVS 290] (rev a1)
Subsystem: NVIDIA Corporation Device 0492
Kernel driver in use: nvidia
Kernel modules: nvidia_current, nouveau, nvidiafb
Ther... |
A kernel module is a bit of compiled code that can be inserted into the kernel at run-time, such as with insmod or modprobe.
A driver is a bit of code that runs in the kernel to talk to some hardware device. It "drives" the hardware. Most every bit of hardware in your computer has an associated driver.¹ A large part o... | What is the difference between kernel drivers and kernel modules? |
1,377,261,966,000 |
I am trying to figure out how a tty works1 (the workflow and responsibilities of each element). I have read several interesting articles about it, but there are still some blurry areas.
This is what I understand so far:
The emulated terminal makes different system calls to /dev/ptmx, the master part of the pseudo ter... |
Terminal emulators
The master side replaces the line (the pair of TX/RX wires) that goes to the terminal.
The terminal displays the characters that it receives on one of the wires (some of those are control characters and make it do things like move the cursor, change colour...) and sends on another wire the character... | What are the responsibilities of each Pseudo-Terminal (PTY) component (software, master side, slave side)? |
1,377,261,966,000 |
What happens when I write cat /proc/cpuinfo. Is that a named pipe (or something else) to the OS which reads the CPU info on the fly and generate that text each time I call it?
|
Whenever you read a file under /proc, this invokes some code in the kernel which computes the text to read as the file content. The fact that the content is generated on the fly explains why almost all files have their time reported as now and their size reported as 0 — here you should read 0 as “don't know”. Unlike u... | What happens when I run the command cat /proc/cpuinfo? |
1,377,261,966,000 |
I can't find any good information on the rt and lowlatency Linux kernels.
I am wondering why anybody would not want to use a lowlatency kernel.
Also, if anyone can tell what the specific differences are, that would be great too.
|
The different configurations, “generic”, “lowlatency” (as configured in Ubuntu), and RT (“real-time”), are all about balancing throughput versus latency. Generic kernels favour throughput over latency, the others favour latency over throughput. Thus users who need throughput more than they need low latency wouldn’t ch... | Why would anyone choose not to use the lowlatency kernel? |
1,377,261,966,000 |
AFAIK dmesg shows information about kernel and kernel modules, and /var/log/messages also shows information produced by kernel and modules.
So what's the difference? Does /var/log/messages ⊂ output of dmesg?
More Info that may be helpful:
- There is a kernel ring buffer, which I think is the very and only place to st... |
dmesg prints the contents of the ring buffer. This information is also sent in real time to syslogd or klogd, when they are running, and ends up in /var/log/messages; when dmesg is most useful is in capturing boot-time messages from before syslogd and/or klogd started, so that they will be properly logged.
| What's the difference of dmesg output and /var/log/messages? |
1,377,261,966,000 |
I was under the impression that the maximum length of a single argument was not the problem here so much as the total size of the overall argument array plus the size of the environment, which is limited to ARG_MAX. Thus I thought that something like the following would succeed:
env_size=$(cat /proc/$$/environ | wc -c... |
Answers
Definitely not a bug.
The parameter which defines the maximum size for one argument is MAX_ARG_STRLEN. There is no documentation for this parameter other than the comments in binfmts.h:
/*
* These are the maximum length and maximum number of strings passed to the
* execve() system call. MAX_ARG_STRLEN is e... | What defines the maximum size for a command single argument? |
1,377,261,966,000 |
While browsing through the Kernel Makefiles, I found these terms. So I would like to know what is the difference between vmlinux, vmlinuz, vmlinux.bin, zimage & bzimage?
|
vmlinux
This is the Linux kernel in an statically linked executable file format. Generally, you don't have to worry about this file, it's just a intermediate step in the boot procedure.
The raw vmlinux file may be useful for debugging purposes.
vmlinux.bin
The same as vmlinux, but in a bootable raw binary file format.... | What is the difference between the following kernel Makefile terms: vmLinux, vmlinuz, vmlinux.bin, zimage & bzimage? |
1,377,261,966,000 |
In Linux, a finished execution of a command such as cp or dd doesn't mean that the data has been written to the device. One has to, for example, call sync, or invoke the "Safely Remove" or "Eject" function on the drive.
What's the philosophy behind such an approach? Why isn't the data written at once? Is there no dang... |
What's the philosophy behind such an approach?
Efficiency (better usage of the disk characteristics) and performance (allows the application to continue immediately after a write).
Why isn't the data written at once?
The main advantage is the OS is free to reorder and merge contiguous write operations to improve t... | What's the philosophy behind delaying writing data to disk? |
1,377,261,966,000 |
We are installing SAP HANA in a RAID machine. As part of the installation step, it is mentioned that,
To disable the usage of transparent hugepages set the kernel settings
at runtime with echo never > /sys/kernel/mm/transparent_hugepage/enabled
So instead of runtime, if I wanted to make this a permanent change, s... |
To make options such as this permanent you'll typically add them to the file /etc/sysctl.conf. You can see a full list of the options available using this command:
$ sysctl -a
Example
$ sudo sysctl -a | head -5
kernel.sched_child_runs_first = 0
kernel.sched_min_granularity_ns = 6000000
kernel.sched_latency_ns = 18000... | disable transparent hugepages |
1,377,261,966,000 |
I'd like to write a statement to dmesg. How can I do this?
|
Write to /dev/kmsg (not /proc/kmsg as suggested by @Nils). See linux/kernel/printk/printk.c devkmsg_writev for the kernel-side implementation and systemd/src/journal/journald-kmsg.c server_forward_kmsg for an example of usage.
| How can I write to dmesg from command line? |
1,377,261,966,000 |
After a recent upgrade to Fedora 15, I'm finding that a number of tools are failing with errors along the lines of:
tail: inotify resources exhausted
tail: inotify cannot be used, reverting to polling
It's not just tail that's reporting problems with inotify, either. Is there any way to interrogate the kernel to fin... |
It seems that if the process creates inotify instance via inotify_init(), the resulting file that represents filedescriptor in the /proc filesystem is a symlink to (non-existing) 'anon_inode:inotify' file.
$ cd /proc/5317/fd
$ ls -l
total 0
lrwx------ 1 puzel users 64 Jun 24 10:36 0 -> /dev/pts/25
lrwx------ 1 puzel u... | Who's consuming my inotify resources? |
1,377,261,966,000 |
I often saw the words "kernel ring buffer", "user level", "log level" and some other words appear together. e.g.
/var/log/dmesg Contains kernel ring buffer information.
/var/log/kern.log Contains only the kernel's messages of any loglevel
/var/log/user.log Contains information about all user level logs
Are they all ... |
Yes, all of this has to do with logging. No, none of it has to do with runlevel or "protection ring".
The kernel keeps its logs in a ring buffer. The main reason for this is so that the logs from the system startup get saved until the syslog daemon gets a chance to start up and collect them. Otherwise there would be n... | What are the concepts of "kernel ring buffer", "user level", "log level"? |
1,377,261,966,000 |
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 into a C compiler, then any code compiled with that compiler would also contain a backdoor. Now given recent leaks regardi... |
AFAIK the only way to be completely sure of security would be to write a compiler in assembly language (or modifying the disk directly yourself). Only then can you ensure that your compiler isn't inserting a backdoor - this works because you're actually eliminating the compiler completely.
From there, you may use your... | How to compile the C compiler from scratch, then compile Unix/Linux from scratch |
1,377,261,966,000 |
I know what a kernel panic is, but I've also seen the term "kernel oops". I'd always thought they were the same, but maybe not. So:
What is a kernel oops, and how is it different from a kernel panic?
|
An "oops" is a Linux kernel problem bad enough that it may affect system reliability.
Some "oops"es are bad enough that the kernel decides to stop running immediately, lest there be data loss or other damage. These are called kernel panics.
The latter term is primordial, going back to the very earliest versions of Lin... | What's the difference between a kernel oops and a kernel panic? |
1,377,261,966,000 |
I interrupted tcpdump with Ctrl+C and got this total summary:
579204 packets captured
579346 packets received by filter
142 packets dropped by kernel
What are the "packets dropped by kernel"? Why does that happen?
|
From tcpdump(1) (tcpdump's man page):
packets ‘‘dropped by kernel’’
(this is the number of packets that were dropped,
due to a lack of buffer space,
by the packet capture mechanism in the OS on which tcpdump is running,
if the OS reports that information to applications;
if not, it will be reported as 0).
A bit of ... | Why would the kernel drop packets? |
1,377,261,966,000 |
This question is motivated by my shock when I discovered that Mac OS X kernel uses 750MB of RAM.
I have been using Linux for 20 years, and I always "knew" that the kernel RAM usage is dwarfed by X (is it true? has it ever been true?).
So, after some googling, I tried slabtop which told me:
Active / Total Size (% used)... |
Kernel is a bit of a misnomer. The Linux kernel is comprised of several proceses/threads + the modules (lsmod) so to get a complete picture you'd need to look at the whole ball and not just a single component.
Incidentally mine shows slabtop:
Active / Total Size (% used) : 173428.30K / 204497.61K (84.8%)
The m... | How much RAM does the kernel use? |
1,377,261,966,000 |
Linux uses a virtual memory system where all of the addresses are virtual addresses and not physical addresses. These virtual addresses are converted into physical addresses by the processor.
To make this translation easier, virtual and physical memory are divided into pages. Each of these pages is given a unique num... |
You can find out a system's default page size by querying its configuration via the getconf command:
$ getconf PAGE_SIZE
4096
or
$ getconf PAGESIZE
4096
NOTE: The above units are typically in bytes, so the 4096 equates to 4096 bytes or 4kB.
This is hardwired in the Linux kernel's source here:
Example
$ more /usr/sr... | how is page size determined in virtual address space? |
1,377,261,966,000 |
Quite often in the course of troubleshooting and tuning things I find myself thinking about the following Linux kernel settings:
net.core.netdev_max_backlog
net.ipv4.tcp_max_syn_backlog
net.core.somaxconn
Other than fs.file-max, net.ipv4.ip_local_port_range, net.core.rmem_max, net.core.wmem_max, net.ipv4.tcp_rmem, an... |
I too have wondered this and was motivated by your question!
I've collected how close I could come to each of the queues you listed with some information related to each. I welcome comments/feedback, any improvement to monitoring makes things easier to manage!
net.core.somaxconn
net.ipv4.tcp_max_syn_backlog
net.core... | how to check rx ring, max_backlog, and max_syn_backlog size |
1,377,261,966,000 |
So, I thought I had a good understanding of this, but just ran a test (in response to a conversation where I disagreed with someone) and found that my understanding is flawed...
In as much detail as possible what exactly happens when I execute a file in my shell? What I mean is, if I type: ./somefile some arguments in... |
The definitive answer to "how programs get run" on Linux is the pair of articles on LWN.net titled, surprisingly enough, How programs get run and How programs get run: ELF binaries. The first article addresses scripts briefly. (Strictly speaking the definitive answer is in the source code, but these articles are easie... | What exactly happens when I execute a file in my shell? |
1,377,261,966,000 |
I was just wondering why the Linux NFS server is implemented in the kernel as opposed to a userspace application?
I know a userspace NFS daemon exists, but it's not the standard method for providing NFS server services.
I would think that running NFS server as a userspace application would be the preferred approach as... |
unfs3 is dead as far as I know; Ganesha is the most active userspace NFS server project right now, though it is not completely mature.
Although it serves different protocols, Samba is an example of a successful
file server that operates in userspace.
I haven't seen a recent performance comparison.
Some other issues:
... | Why is Linux NFS server implemented in the kernel as opposed to userspace? |
1,377,261,966,000 |
I am attempting to install the VMWare player in Fedora 19. I am running into the problem that multiple users have had where VMware player cannot find the kernel headers. I have installed the kernel-headers and kernel-devel packages through yum and the file that appears in /usr/src/kernels is:
3.12.8-200.fc19.x86_64
H... |
You can install the correct kernel header files like so:
$ sudo yum install "kernel-devel-uname-r == $(uname -r)"
Example
This command will always install the right version.
$ sudo yum install "kernel-devel-uname-r == $(uname -r)"
Loaded plugins: auto-update-debuginfo, changelog, langpacks, refresh-packagekit
No pack... | yum installs kernel-devel different from my kernel version |
1,377,261,966,000 |
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 that Linux kernel nowadays (was it always the case?) offers the option to use modules to achieve the same effect, what... |
Microkernels require less code to be run in the innermost, most trusted mode than monolithic kernels. This has many aspects, such as:
Microkernels allow non-fundamental features (such as drivers for hardware that is not connected or not in use) to be loaded and unloaded at will. This is mostly achievable on Linux, th... | How does Linux kernel compare to microkernel architectures? |
1,377,261,966,000 |
I just know that Interrupt is a hardware signal assertion caused in a processor pin. But I would like to know how Linux OS handles it.
What all are the things that happen when an interrupt occurs?
|
Here's a high-level view of the low-level processing. I'm describing a simple typical architecture, real architectures can be more complex or differ in ways that don't matter at this level of detail.
When an interrupt occurs, the processor looks if interrupts are masked. If they are, nothing happens until they are unm... | How is an Interrupt handled in Linux? |
1,377,261,966,000 |
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 time?
Any elaboration on this would be great. I feel as though I am missing something basic. I am mostly concerned wit... |
Linux initially boots with a ramdisk (called an initrd, for "INITial RamDisk") as /. This disk has just enough on it to be able to find the real root partition (including any driver and filesystem modules required). It mounts the root partition onto a temporary mount point on the initrd, then invokes pivot_root(8) t... | How does a kernel mount the root partition? |
1,377,261,966,000 |
I'm running a headless server installation of arch linux. The high rate of kernel upgrades caused me some maintainance headache and I therefore wish to switch to the lts kernel.
I already installed the linux-lts and linux-lts-headers packages. Now, I got both kernels installed but I'm a bit clueless how to continue fr... |
Okay, after joe pointed me the right direction in comments, this is how I did it:
basicly just install pacman -S linux-lts
(optional) check if kernel, ramdisk and fallback are available in ls -lsha /boot
remove the standard kernel pacman -R linux
update the grub config grub-mkconfig -o /boot/grub/grub.cfg
reboot
Not... | How to switch arch linux to lts kernel? |
1,329,874,965,000 |
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 of the kernel:
How is that possible? Isn't a file descriptor supposed to be the index to a record in the Open File Tab... |
The file descriptor, i.e. the 4 in your example, is the index into the process-specific file descriptor table, not the open file table. The file descriptor entry itself contains an index to an entry in the kernel's global open file table, as well as file descriptor flags.
| How can same fd in different processes point to the same file? |
1,329,874,965,000 |
From reading the man pages on the read() and write() calls it appears that these calls get interrupted by signals regardless of whether they have to block or not.
In particular, assume
a process establishes a handler for some signal.
a device is opened (say, a terminal) with the O_NONBLOCK not set (i.e. operating in... |
Summary: you're correct that receiving a signal is not transparent, neither in case i (interrupted without having read anything) nor in case ii (interrupted after a partial read). To do otherwise in case i would require making fundamental changes both to the architecture of the operating system and the architecture of... | Interruption of system calls when a signal is caught |
1,329,874,965,000 |
The Linux kernel swaps out most pages from memory when I run an application that uses most of the 16GB of physical memory. After the application finishes, every action (typing commands, switching workspaces, opening a new web page, etc.) takes very long to complete because the relevant pages first need to be read bac... |
Based on memdump program originally found here I've created a script to selectively read specified applications back into memory. remember:
#!/bin/bash
declare -A Q
for i in "$@"; do
E=$(readlink /proc/$i/exe);
if [ -z "$E" ]; then
#echo skipped $i;
continue;
fi
if echo $E | grep -qF me... | Making Linux read swap back into memory |
1,329,874,965,000 |
I have a laptop with a multi guesture touchpad. My touchpad never works in any Linux distro such as Ubuntu, Fedora, openSUSE, Linux Mint, Knoppix, Puppy, Slitaz and lots more. I have tried lots of things but nothing worked. I have been struggling with the Synaptics drivers for over one year but it doesn't work either.... |
This is an arcane option, only necessary on some rare devices (one of which you have). The only documentation is one line in the kernel parameters list.
The i8042 controller controls PS/2 keyboards and mice in PCs. It seems that on your laptop, both the keyboard and the touchpad are connected through that chip.
From w... | What does the 'i8042.nomux=1' kernel option do during booting of Ubuntu? |
1,329,874,965,000 |
I have noticed the following option in the kernel: CONFIG_DEVTMPFS
Device Drivers -> Generic Driver Options -> Maintain devtmpfs to mount at /dev
And I see that it is enabled by default in the Debian distribution kernel 3.2.0-4-amd64
I am trying to understand what difference this option brings. Without this option, /... |
devtmpfs is a file system with automated device nodes populated by the kernel. This means you don't have to have udev running nor to create a static /dev layout with additional, unneeded and not present device nodes. Instead the kernel populates the appropriate information based on the known devices.
On the other han... | using devtmpfs for /dev |
1,329,874,965,000 |
I want to create a USB-to-USB data transfer system in Linux (preferably Ubuntu). For this I want to use no external hardware or switch (except this cable). It's going to be like mounting a USB drive to a system, but in this scenario one of the Linux systems is going to be mounted on the other. How can I create this?
A... |
Yes this is possible, but it is not possible by cutting two USB cables with USB-A connectors (what is normally going into the USB on your motherboard) and cross connecting the data cables. If you connect the USB power lines on such a self made cable, you are likely to end up frying your on-board USB handling chip. Don... | Is USB-to-USB data transfer between two Linux OSes possible? |
1,329,874,965,000 |
This question is two-fold:
First, how do you manually detach a driver from a USB device and attach a different one? For example, I have a device that when connected automatically uses the usb-storage driver.
usbview output
Vendor Id: xxxx
Product Id: xxxx
...
Number of Interfaces: 2
Interface Number: 0
... |
For the first part of the question, I've looked and couldn't find a better way to detach a USB driver than what you're already doing with libusb.
As for the second part of the question, udev can react to driver loading, but not force a specific driver to be assigned to a device.
Every driver in the Linux kernel is res... | How to assign USB driver to device |
1,329,874,965,000 |
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 prevent HID taking over the device before my driver, I can blacklist it in hid-core.c. This works but is not the best so... |
Ok, turns out the answer was staring me in the face.
Firstly, whether using our custom driver, or using the generic one that normally takes over the device, it's still all ultimately controlled by HID, and not USB.
Previously I tried to unbind it from HID, which is not the way to go. HID has sub-drivers, the one that ... | How to use Linux kernel driver bind/unbind interface for USB-HID devices? |
1,329,874,965,000 |
"Everything is a file" in the UNIX World.
Above sentence is famous. When I run echo "hello programmer" >> /dev/tty1 , I can watch the given string on TeleType 1 , ....
What and where is file per each socket? Suppose my friend connects to my PC, and its IP is h.h.h.h , how can I access the respective file? Is it possi... |
man 7 unix:
The AF_UNIX (also known as AF_LOCAL) socket family is used to communicate between processes on the same machine efficiently. Traditionally, UNIX domain
sockets can be either unnamed, or bound to a file system pathname (marked as being of type socket). Linux also supports an abstract namespace which is
... | Is there a file for each socket? |
1,329,874,965,000 |
Briefly, I have a physical address inside kernel (9,932,111,872 or 0x250000000), which is apparently aligned to 4KiB (page size). When I use the kernel __va() function to get the kernel virtual address, I got something like 0xf570660f (different on each boot), which is not aligned to 4KiB.
I'm on a 64bit system so the... |
The reason is the %p in printk. When I change %p to %#llx for a quick check, the output of kernel address becomes 4KB-aligned as expected.
The reason can be found here: Kernel Doc: printk-formats pointer-types. %p inside printk will print a hashed pointer address to prevent leaking kernel information. That's why the p... | Why is the virtual address not 4KiB-aligned when its physical address is aligned to 4KiB? |
1,329,874,965,000 |
I have been learning some scheduling concepts. Currently my understanding so far is as below.
There are real time processes and non real time processes.
Non real time processes can have nice values for their priority in the range of -20 to +20. The higher positive value indicates that the process has lower priority.... |
Question 1
It is possible for an user to use real time priority for a process as well. This configuration could be set from /etc/security/limits.conf file. I see the below contents in that file.
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain> <type> <item> <valu... | Real time processes scheduling in Linux |
1,329,874,965,000 |
I've read in many places that Linux creates a kernel thread for each user thread in a Java VM. (I see the term "kernel thread" used in two different ways:
a thread created to do core OS work and
a thread the OS is aware of and schedules to perform user work.
I am talking about the latter type.)
Is a kernel thread t... |
There is absolutely no difference between a thread and a process on Linux. If you look at clone(2) you will see a set of flags that determine what is shared, and what is not shared, between the threads.
Classic processes are just threads that share nothing; you can share what components you want under Linux.
This is ... | Are Linux kernel threads really kernel processes? |
1,329,874,965,000 |
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 across tap, bridge and physical interfaces on the same machine, without being able to tell them apart. I can't see any significant differences in ifco... |
I don't think there's an easy way to distinguish them. Poking around in /sys/class/net I found the following distinctions:
Physical devices have a /sys/class/net/eth0/device symlink
Bridges have a /sys/class/net/br0/bridge directory
TUN and TAP devices have a /sys/class/net/tap0/tun_flags file
Bridges and loopback in... | How to know if a network interface is tap, tun, bridge or physical? |
1,329,874,965,000 |
On Ubuntu 15.10, when I want to format using the NTFS file system an external 4TO disk connected by USB3 (on a StarTech USB/eSATA hard disk dock), I have a lot of I/O errors, and the format fails.
I tried GParted v 0.19, and GParted on the latest live CD gparted-live-0.23.0-1-i586.iso, with the same problem.
After th... |
I ran into this issue today on a 4.8.0 kernel.
According to this forum post it can be circumvented by
$ echo options usb-storage quirks=357d:7788:u | sudo tee /etc/modprobe.d/blacklist_uas_357d.conf
$ sudo update-initramfs -u
and rebooting.
| Connection problem with USB3 external storage on Linux (UAS driver problem) |
1,329,874,965,000 |
Do I need to have to run perf userspace tool as system administrator (root), or can I run it (or at least some subcommands) as an ordinary user?
|
What you can do with perf without being root depends on the kernel.perf_event_paranoid sysctl setting.
kernel.perf_event_paranoid = 2: you can't take any measurements. The perf utility might still be useful to analyse existing records with perf ls, perf report, perf timechart or perf trace.
kernel.perf_event_paranoid... | Do I need root (admin) permissions to run userspace 'perf' tool? (perf events are enabled in Linux kernel) |
1,329,874,965,000 |
I would like to know how Message Queues are implemented in the Linux Kernel.
|
The Linux kernel (2.6) implements two message queues:
(rather 'message lists', as the implementation is done by using a linked list not strictly following the FIFO principle)
System V IPC messages
The message queue from System V.
A process can invoke msgsnd() to send a message. He needs to pass the IPC identifier of t... | How is a message queue implemented in the Linux kernel? |
1,329,874,965,000 |
We all know that Linus Torvalds created Git because of issues with Bitkeeper. What is not known (at least to me) is, how were issues/tickets/bugs tracked up until then? I tried but didn't get anything interesting. The only discussion I was able to get on the subject was this one where Linus shared concerns with about ... |
In the beginning, if you had something to contribute (a patch or a bug report), you mailed it to Linus. This evolved into mailing it to the list (which was [email protected] before kernel.org was created).
There was no version control. From time to time, Linus put a tarball on the FTP server. This was the equivalent o... | How did the Linux Kernel project track bugs in the Early Days? |
1,329,874,965,000 |
man getrusage 2 says
ru_maxrss (since Linux 2.6.32)
This is the maximum resident set size used (in kilobytes). For RUSAGE_CHILDREN, this is the resident set size of the largest
child, not the maximum resident set size of the process tree.
So what does this number mean exactly?
|
A process's resident set size is the amount of memory that belongs to it and is currently present (resident) in RAM (real RAM, not swapped or otherwise not-resident).
For instance, if a process allocates a chunk of memory (say 100Mb) and uses it actively (reads/writes to it), its resident set size will be about 100Mb ... | getrusage system call: what is "maximum resident set size" |
1,329,874,965,000 |
I'm trying to detect what filesystems a kernel can support. Ideally in a little list of their names but I'll take anything you've got.
Note that I don't mean the current filesystems in use, just ones that the current kernel could, theoretically support directly (obviously, fuse could support infinite numbers more).
|
Can I list the filesystems a running kernel can support?
Well, answer /proc/filesystems is bluntly wrong — it reflects only those FSes that already were brought in use, but there are way more of them usually that kernel can support:
ls /lib/modules/$(uname -r)/kernel/fs
Another source is /proc/config.gz which might ... | Can I list the filesystems a running kernel can support? |
1,329,874,965,000 |
I've been reading up about how pipes are implemented in the Linux kernel and wanted to validate my understanding. If I'm incorrect, the answer with the correct explanation will be selected.
Linux has a VFS called pipefs that is mounted in the kernel (not in user space)
pipefs has a single super block and is mounted ... |
Your analysis so far is generally correct. The way a shell might set the stdin of a process to a pipe descriptor could be (pseudocode):
pipe(p) // create a new pipe with two handles p[0] and p[1]
fork() // spawn a child process
close(p[0]) // close the write end of the pipe in the child
dup2(p[1], 0) // duplic... | How pipes work in Linux |
1,329,874,965,000 |
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 defined by the "length" of the moving average: since the algorithm to compute load average seems to trigger every 5 sec, n w... |
This difference dates back to the original Berkeley Unix, and stems from the fact that the kernel can't actually keep a rolling average; it would need to retain a large number of past readings in order to do so, and especially in the old days there just wasn't memory to spare for it. The algorithm used instead has th... | Why isn't a straightforward 1/5/15 minute moving average used in Linux load calculation? |
1,329,874,965,000 |
I'm running an Ubuntu 12.04 derivative (amd64) and I've been having really strange issues recently. Out of the blue, seemingly, X will freeze completely for a while (1-3 minutes?) and then the system will reboot. This system is overclocked, but very stable as verified in Windows, which leads me to believe I'm having a... |
I have two suggestions to start.
The first you're not going to like. No matter how stable you think your overclocked system is, it would be my first suspect. And any developer you report the problem to will say the same thing. Your stable test workload isn't necessarily using the same instructions, stressing the memo... | Determining cause of Linux kernel panic |
1,329,874,965,000 |
I have a device that needs a block of memory that is reserved solely for it, without the OS intervening. Is there any way to tell BIOS or the OS that a block of memory is reserved, and it must not use it?
I am using this device on an openSUSE machine.
|
What you're asking for is called DMA. You need to write a driver to reserve this memory.
Yes, I realize you said you didn't want the OS to intervene, and a driver becomes part of the OS, but in absence of a driver's reservation, the kernel believes all memory belongs to it. (Unless you tell the kernel to ignore the me... | How can I reserve a block of memory from the Linux kernel? |
1,329,874,965,000 |
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 making up the kernel. In my system (Ubuntu 10.04)...
for the different kernels I have (using automated software downlo... |
Distribution kernel-header packages contain, as their name implies, only kernel header files (plus the necessary plumbing) that are required to build software like kernel modules.
You shouldn't expect to find binary files at all in a kernel source directory, except for build output. (If you configure and build a kerne... | What does a kernel source tree contain? Is this related to Linux kernel headers? |
1,329,874,965,000 |
What do the terms "in-tree" and "out-of-tree" exactly mean? Also, does "source tree" specifically refer to the official kernel released from / maintained at kernel.org or is it a more general term which can refer to any (modified) Linux kernel source?
|
"source tree" is not a term specific to kernel source development, so it has to be a more general term and its meaning with regards to kernel source is context dependent.
I have not come across "in-tree" and "out-of-tree" outside of the Linux kernel source development and then only for working with modules. All module... | Linux kernel: meaning of source-tree, in-tree and out-of-tree |
1,329,874,965,000 |
Not much to put here in the body.
|
Processes need to have a parent (PPID). The kernel, despite not being a real process, is nevertheless handcrafting some real processes like at least init, and is giving itself the process ID 0. Depending on the OS it might or might not be displayed as a process in ps output but is always displayed as a PPID:
eg on Lin... | If computers start counting at 0, why does the init process have a pid of 1? |
1,329,874,965,000 |
The output of dmesg shows the number of second+milliseconds since the system start.
[ 10.470000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 14.610000] device eth0 entered promiscuous mode
[ 18.750000] cfg80211: Calling CRDA for country: DE
[ 18.750000] cfg80211: Regulatory domain changed to count... |
I think that what you're looking for is -T as documented in man dmesg:
-T, --ctime
Print human readable timestamps. The timestamp could be inaccurate!
The time source used for the logs is not updated after system
SUSPEND/RESUME.
So, for example:
[ 518.511925] usb 2-1.1: new low-speed USB device number 7 using... | Human readable dmesg time stamps on OpenWRT |
1,329,874,965,000 |
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 corresponds to what is going to the console. What are the next 3 values for?
Do the numerical values have the same meaning a... |
Sysctl settings are documented in Documentation/sysctl/*.txt in the kernel source tree. On Debian, install linux-doc to have the documentation in usr/share/doc/linux-doc-*/Documentation/ (most distributions have a similar package). From Documentation/sysctl/kernel.txt:
The four values in printk denote: console_loglev... | Description of kernel.printk values |
1,329,874,965,000 |
I recently went through Unpacking kernel-source rpm off-system (OpenSuse)?; and as it took > 10 h on my machine, imagine my surprise that after doing the process described there, I find no Module.symvers anywhere!
When I search for "generate Module.symvers", I get this:
NOTE: "modules_prepare" will not build Module.... |
The Module.symvers is (re)generated when you (re)compile modules. Run make modules, and you should get a Module.symvers file at the root of the kernel tree.
Note that if you only ran make and not make modules, you haven't built any modules yet. The symbols from the kernel itself (vmlinux or one of the architecture-dep... | How to generate Module.symvers? |
1,329,874,965,000 |
I found a similar question but still it doesn't answer my questions
Do the virtual address spaces of all the processes have the same content in their "Kernel" parts?
First off, considering user processes don't have access to this part and I guess if they try to access it, it would lead to an error, then why even inc... |
The kernel mapping exists primarily for the kernel’s purposes, not user processes’. From the CPU’s perspective, any physical memory address which isn’t mapped as a linear address might as well not exist. But the CPU does need to be able to call into the kernel: to service interrupts, to handle exceptions... It also n... | What's the use of having a kernel part in the virtual memory space of Linux processes? |
1,329,874,965,000 |
Host - Windows 7
Guest - CentOS
I am trying to install kernel-headers using yum since during the installation of vmware-tools I get a message asking for the path to the kernel header files for the 3.10.0-229.7.2.e17.x86_64.
Running yum install kernel-headers returns Package kernel-headers-3.10.0-229.7.2.e17.x86_64 alr... |
The correct package to install all of the required dependencies for building kernel modules is kernel-devel (see the CentOS documentation for more information).
The headers are not installed in /usr/src/kernels, rather they're installed in a number of directories below /usr/include (the default location for C header f... | Empty kernel directory but kernel-headers are installed |
1,329,874,965,000 |
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 to know which is the IRQ responsible for that.
The kernel is a Linux 2.6.18-194.3.1.el5 (CentOS). mpstat -P ALLshows:
18... |
Well, since you're specifically asking how to know which IRQ is responsible for the number in mpstat, you can assume it's not the local interrupt timer (LOC), since those numbers are fairly equal, and yet mpstat shows some of those cpus at 0 %irq.
That leaves IRQ 0, which is the system timer, and which you can't do an... | How can I know which IRQ is responsible of high CPU usage |
1,329,874,965,000 |
I have a IR receiver that is using the imon-driver and I would like to get it working with the kernel. Right now half of the keys on the remote (image) works, but an all important think like the numeric keys doesn't!
The weird think is that the kernel keymap module (rc-imon-pad) seems to be correct but it seems that i... |
I have the same remote and I have it sending correct keycodes to my 2.6.38-gentoo-r3 kernel. I did not compile keycodes as a module, because they probably haven't had time to make it possible to select individual keymaps yet. It's all or nothing and I don't like a gazillion useless modules cluttering me. Instead I'm l... | How to debug the input from an input-device (/dev/input/event*) |
1,329,874,965,000 |
I've started installing Debian testing on amd64 and I've come to a screen asking me to install a kernel. It gives me a choice between linux-image-3.16-2-amd64, linux-image-amd64, and none.
What is the difference between these options? Which do I choose?
|
linux-image-amd64 is a generic metapackage, which depends on the specific default kernel package. In your particular case, linux-image-amd64 probably depends on linux-image-3.16-2-amd64. In general it suffices to install the generic metapackage. You could alternatively install the specific linux-image-3.16-2-amd64 pac... | Which Debian kernel should I install? |
1,329,874,965,000 |
While troubleshooting a problem with my ethernet card, I've found that the driver I'm currently using may have some issues with old kernel versions. What command can I use to check the kernel version I am currently running ?
|
You can execute:
uname -r
It will display something like
3.13.0-62-generic
Found on https://askubuntu.com/questions/359574/how-do-i-find-out-the-kernel-version-i-am-running (view that QA to learn other commands you could use)
| How do I check the running kernel version? |
1,329,874,965,000 |
It's said that compiling GNU tools and Linux kernel with -O3 gcc optimization option will produce weird and funky bugs. Is it true? Has anyone tried it or is it just a hoax?
|
It's used in Gentoo, and I didn't notice anything unusual.
| Compiling GNU/Linux with -O3 optimization |
1,356,020,314,000 |
dmesg shows lots of messages from serial8250:
$ dmesg | grep -i serial
[ 0.884481] Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled
[ 6.584431] systemd[1]: Created slice system-serial\x2dgetty.slice.
[633232.317222] serial8250: too much work for irq4
[633232.453355] serial8250: too much work for irq4
[63... |
There is nothing wrong with your kernel or device drivers. The problem is with your machine hardware. The problem is that it is impossible hardware.
This is an error in several virtualization platforms (including at least XEN, QEMU, and VirtualBox) that has been plaguing people for at least a decade. The problem is... | Understanding "serial8250: too much work for irq4" kernel message |
1,356,020,314,000 |
Last Friday I upgraded my Ubuntu server to 11.10, which now runs with a 3.0.0-12-server kernel. Since then the overall performance has dropped dramatically. Before the upgrade the system load was about 0.3, but currently it is at 22-30 on an 8 core CPU system with 16GB of RAM (10GB free, no swap used).
I was going to... |
I found this thread on lkml that answers your question a little. (It seems even Linus himself was puzzled as to how to find out the origin of those threads.)
Basically, there are two ways of doing this:
$ echo workqueue:workqueue_queue_work > /sys/kernel/debug/tracing/set_event
$ cat /sys/kernel/debug/tracing/trace_pi... | Why is kworker consuming so many resources on Linux 3.0.0-12-server? |
1,356,020,314,000 |
I have been working in embedded OS like uCOS, ThreadX. While I have coded apps in Linux, now I’m planning to start learning Linux Kernel. I have few questions regarding the environment.
Which is best distro, which has easy to use tools for kernel development? (so far I had used RHEL and Fedora. While I am comfortable... |
My personal flavor for Linux Kernel development is Debian. Now for your points:
As you probably guessed Ubuntu doesn't bring anything new to the kernel to ease development afaik, apart from what's already available in Debian. For e.g. make_kpkg is a Debian feature and not Ubuntu. Here are some links to get you starte... | Kernel Hacking Environment |
1,356,020,314,000 |
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 do run on fairly modern hardware.
|
Because Red Hat Enterprise Linux is foremost about stability, and is a long-lived distribution (some 10 years guaranteed). RHEL users don't want anything to change unless absolutely necessary. But note that the base version of the kernel is old, RHEL's kernel contains lots of backported stuff and bug fixes, so it isn'... | Why does Red Hat Linux use such an old kernel? |
1,356,020,314,000 |
I am in the EU zone +1 or when DST is on, +2. Now is Sunday 31.3.2024. This Sunday morning, we changed into DST, at 2→3 (CET → CEST).
I have Linux servers in separate networks reporting monthly energy consumption at 23:58 of the last day of the month. They have worked perfectly for many years. Networks are up to 8 hou... |
Well, I get:
# date -s '2024-03-30 23:58'; date -d tomorrow
Sat Mar 30 23:58:00 EET 2024
Mon Apr 1 00:58:00 EEST 2024
which isn't really surprising since 24 hours after 2024-03-30 23:58 it is 2024-04-01 00:58. Just that the latter is in daylight savings time.
The manual says:
Relative items adjust a date (or the cu... | How could March 30th 2024 be followed by the 1st? |
1,356,020,314,000 |
As for the "Spectre" security vulnerability, "Retpoline" was introduced to be a solution to mitigate the risk. However, I've read a post that mentioned:
If you build the kernel without CONFIG_RETPOLINE, you can't build modules with retpoline and then expect them to load — because the thunk symbols aren't exported.
If... |
If you’re using mainline kernels, or most major distributions’ kernels, the best way to check for full retpoline support (i.e. the kernel was configured with CONFIG_RETPOLINE, and was built with a retpoline-capable compiler) is to look for “Full generic retpoline” in /sys/devices/system/cpu/vulnerabilities/spectre_v2.... | How to check if Linux kernel is "Retpoline" enabled or not? |
1,356,020,314,000 |
I implemented my own Serial-ATA Host-Bus-Adapter (HBA) in VHDL and programmed it onto a FPGA. A FPGA is chip which can be programmed with any digital circuit. It's also equipped with serial transceivers to generate high speed signals for SATA or PCIe.
This SATA controller supports SATA 6 Gb/s line rates and uses ATA-8... |
Thanks to @frostschutz, I could measure the write performance in Linux without NCQ feature. The kernel boot parameter libata.force=noncq disabled NCQ completely.
Regarding my Seagate 6TB write performance problem, there was no change in speed. Linux still reaches 180 MiB/s.
But then I had another idea:
The Linux drive... | How to (really) disable NCQ in Linux |
1,356,020,314,000 |
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 data, 436k init, 1176944k highmem)
virtual kernel memory layout:
fixmap : 0xffc57000 - 0xfffff000 (3744 kB)
pk... |
First off, a 32 bit system has 0xffffffff (4'294'967'295) linear addresses to access a physical location ontop of the RAM.
The kernel divides these addresses into user and kernel space.
User space (high memory) can be accessed by the user and, if necessary, also by the kernel.
The address range in hex and dec notation... | What does the Virtual kernel Memory Layout in dmesg imply? |
1,356,020,314,000 |
I sent my computer to the manufacturer for diagnosis and help for a video output issue it was having. They updated the BIOS. Since then I've been getting
[Firmware Bug]: TSC_DEADLINE disabled due to Errata; please update microcode to version: 0x20 (or later)
I didn't have any microcode or ucode packages installed b... |
The sudden appearance of this message is rather odd; it suggests your updated firmware is no longer upgrading your CPU’s microcode, whereas the previous firmware you had, did. Weird... (Another possible scenario is that your CPU originally didn’t support TSC deadline at all, and your firmware is now upgrading its micr... | TSC_DEADLINE disabled due to Errata |
1,356,020,314,000 |
What's the benefit of compiling kernel modules into the kernel (instead of as loadable modules)?
|
It depends. If you have a small amount of memory, the use of modules may improve the resume as they are not reloaded every time (I found it significant on 2 GiB of RAM but not on 4 GiB on traditional harddrives). This is especially true when due to some bug in the battery module (regardless of being compiled-in or as ... | Benefit of kernel module compiled inside kernel? |
1,356,020,314,000 |
What is the difference between a "Non-preemptive", "Preemptive" and "Selective Preemptive" Kernel?
Hope someone can shed some light into this.
|
On a preemptive kernel, a process running in kernel mode can be replaced by another process while in the middle of a kernel function.
This only applies to processes running in kernel mode, a CPU executing processes in user mode is considered "idle". If a user mode process wants to request a service from the kernel, he... | What is the difference between Non-preemptive, Preemptive and Selective Preemptive Kernel? |
1,356,020,314,000 |
I am compiling my own 3.14 kernel. I fear I may have left out some important networking feature to get DNS working.
I can't resolve domain names. I can ping my DNS server.
I can resolve using that DNS on other machines so I know it's not the server.
~ # cat /etc/resolv.conf
nameserver 192.168.13.5
~ # nslookup goog... |
The problem is with busybox. I switched to a precompiled version and did not have issues. I need to look into compilation options with it. Thanks for your help.
https://gist.github.com/vsergeev/2391575:
There are known issues with DNS functionality in statically-linked glibc programs (like busybox in this case), beca... | Busybox ping IP works, but hostname nslookup fails with "bad address" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.