date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,394,457,423,000 |
last three days I am experiencing random freezes. If i am looking on youtube when this happens Audio keeps playing but screen is froze and keyboard or cursor do not do anything.
I trying to look in sudo journalctl and this is what I found:
led 04 10:44:02 arch-thinkpad kernel: i915 0000:00:02.0: [drm] *ERROR* Atomic u... |
5.10.15 doesn't solve this problem. I still have same error. Intel bugs are really annoying since kernel > 4.19.85 (November 2019 !)
As a workaround, i915 guc need to be enable as mentionned in Archlinux Wiki : https://wiki.archlinux.org/index.php/Intel_graphics#Enable_GuC_/_HuC_firmware_loading and loaded before othe... | Arch linux randomly freezes after updating to kernel 5.10 |
1,394,457,423,000 |
I'm developing for a specific TI ARM processor with custom drivers that made it to the kernel. I'm trying to migrate from 2.6.32 to 2.6.37, but the structure changed so much I will have weeks of work to upgrade my code.
For example, my chip is the dm365, which comes with video processing drivers. Now most of the old d... |
If you select a kernel to track, be sure to select one that is tagged for long-term support. But sooner or later you will have to move on...
| How am I supposed to keep up with kernels as a developer? |
1,394,457,423,000 |
My dmesg output contains the following line:
[ 0.265021] MDS CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/mds.html for more details.
Having gone to the above-mentioned site and having read up on MDS a little, I ran/received the following:
$ cat /s... |
Can I do anything further to protect my system, and if so, what should my next steps be?
You can do something further to protect your system: you can disable SMT (hyperthreading). This is usually possible in your system’s firmware setup.
Do I need to take action regarding my Microarchitectural Data Sampling (MDS) s... | Do I need to take action regarding my Microarchitectural Data Sampling (MDS) status? |
1,394,457,423,000 |
After 30 minutes of uptime using Ubuntu 14.04 with a hybrid SSD I see many processes blocking IO using iotop. This is during disk writes, for example if I open and close an empty file in gedit it can take 2 seconds to close down due to dconf writing settings, this effects other apps in a similar way; slowing the whole... |
The symptoms are very consistent with a mostly saturated IO system, however having for the most part ruled out IO load from the OS/userspace side, another possibility is the drive running self-tests on itself, which may include reading from all the sectors. This should be queryable/tunable from smartctl (At least one ... | Calls to sync/fsync slow down after 30 minutes uptime |
1,394,457,423,000 |
I have a small "rescue" system (16 MB) that I boot into RAM as ramdisk. The initrd disk that I am preparing needs to be formatted. I think ext4 will do fine, but obviously, it doesn't make any sense to use journal or other advanced ext4 features.
How can I create the most minimal ext4 filesystem?
without journal
with... |
Or you could simply use ext2
For ext4:
mke2fs -t ext4 -O ^has_journal,^uninit_bg,^ext_attr,^huge_file,^64bit [/dev/device or /path/to/file]
man ext4 contains a whole lot of features you can disable (using ^).
| Minimalistic ext4 filesystem without journal and other advanced features |
1,394,457,423,000 |
May i know the max partition size supported by an Linux system. And how much logical and primary Partition as we can create in an disk installed by linux system?
|
How Many Partitions
I believe other, faster and better people have already answered this perfectly. :)
There Is Always One More Limit
For the following discussion, always remember that limits are theoretical. Actual limitations are often less than the theoretical limits because either
other theoretical limits constra... | What is the max partition supported in linux? |
1,394,457,423,000 |
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 kernel in my Ubuntu system. I want to make my own OS with Grub, the Linux kernel and I want to be able to have this homebrew... |
Here's what you're looking for: http://www.linuxfromscratch.org/
| How do I begin with building a Linux system from scratch? |
1,394,457,423,000 |
I am reading a 550MB file into /dev/null and I am getting
dd: writing '/dev/null': No space left on device
I was surprised. I thought /dev/null is a black hole where you can send as much as you want ( because its a virtual fs).
Yes my disk is almost full when I get this error. What can I do other than deleting conten... |
/dev/null is a special file, of type character device. The driver for that character device ignores whatever you try to write to the device and writes are always successful. If a write to /dev/null fails, it means that you've somehow managed to remove the proper /dev/null and replace it by a regular file. You might ha... | dd: writing '/dev/null': No space left on device |
1,394,457,423,000 |
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 execute busybox commands, which is awesome.
Here's where I'm stuck-- there are (at least) two methods of generating initramf... |
It's not the kernel that's generating the initramfs, it's cpio. So what you're really looking for is a way to build a cpio archive that contains devices, symbolic links, etc.
Your method 2 uses usr/gen_init_cpio in the kernel source tree to build the cpio archive during the kernel build. That's indeed a good way of bu... | How to generate initramfs image with busybox links? |
1,394,457,423,000 |
Does linux kernel make use of virtual memory for its data structures (page tables, descriptors, etc.)? More specifically:
Are kernel space addresses translated in the MMU (pagetable walking)?
Could kernel memory get swapped out?
Could a memory access to a kernel data structure cause a page fault?
Are there differences... |
Are kernel space addresses translated in the MMU (pagetable walking)?
Yes, all addresses are translated in the MMU; see Is the MMU inside of Unix/Linux kernel? or just in a hardware device with its own memory? for details.
Could kernel memory get swapped out?
A kernel could theoretically be designed so that it can... | Does linux kernel use virtual memory (for its data)? |
1,394,457,423,000 |
When I'm on my Linux Box I use bash as a shell. Now I wondered how bash handles the execution of an ELF file, that is when I type ./program and program is an ELF file. I grepped the bash-4.3.tar.gz, there does not seem to be some sort of magic number parser to find out if the file is an ELF nor did I find an exec() sy... |
Bash knows nothing about ELF. It simply sees that you asked it to run an external program, so it passes the name you gave it as-is to execve(2). Knowledge of things like executable file formats, shebang lines, and execute permissions lives behind that syscall, in the kernel.
(It is the same for other shells, though th... | How does bash execute an ELF file? |
1,394,457,423,000 |
I just to want to know the flow of activities happening after loading the linux kernel image into the RAM after boot process.
|
As of Linux 2.6:
Kernel
After loaded into RAM, the kernel executes the following functions.
setup():
Build a table in RAM describing the layout of the physical memory.
Set keyboard repeat delay and rate.
Initialize the video adapter card.
Initialize the disk controller with hard disk parameters.
Check for IBM Micro C... | What happens after loading the linux kernel image into RAM |
1,394,457,423,000 |
I have an old laptop here with only 512 MB of RAM. Since a few kernel releases, I am using zram to convert 256 MB of it to a compressed ramdisk which is then used as swap. This has proved to be very successful and the system is much more responsive, (hard-disk-backed) swap usage has gone down considerably, which slowe... |
Zram creates a block device backed by compressed ram. You can use that block device for swap. Normally memory pressure first results in the cache being discarded, and only after most of the cache has been freed up and memory is still tight does the system start swapping.
CleanCache allows pages from the page cache t... | Cleancache vs zram? |
1,394,457,423,000 |
I know those two mechanisms (let's call them A and B) limit the resource for a process.
I want to know the cooperation of those two.
If A limits a resource for a process, then what happens when B also limits the same resource?
|
All limits apply independently. When a process makes a request that would require going over some limit, the request is denied. This holds whether the limit is for a cgroup, per process, or per user.
Since cgroup sets limits per groups of processes, and setrlimit sets limits per user or per process, the mechanisms are... | About ulimit/setrlimit and cgroup |
1,394,457,423,000 |
Where can I find a technical description of the kernel parameters listed in /proc/sys (ob Linux)?
|
The directory /proc/sys gives easy access to sysctl settings through the shell. You can read and write these settings either by reading and writing these files, or by calling the sysctl utility or the underlying sysctl system call.
The various settings are described in the kernel documentation, in Documentation/sysctl... | Where are the Linux kernel parameters present in /proc/sys documented? |
1,394,457,423,000 |
I ask this question because I'm curious as to whether there is some sort of performance advantage offered from the binary blobs that are in the Linux kernel.
Since many of these blobs have been replaced with code in linux-libre, why has that same code not been incorporated into the Linux kernel at kernel.org?
|
The Linux-libre project is an extension of efforts by distributions aimed at people who wish to use completely free operating systems, as defined by the Free Software Foundation.
Currently it is maintained by FSFLA, the Latin American Free software Foundation.
According to the about page for the project:
Linux-li... | Why does the linux kernel use linux-libre code to get rid of binary blobs? |
1,394,457,423,000 |
I have written one driver for one device in Linux. How can I create (using gcc) a .ko file so that I can insert it into the kernel?
|
Create a Makefile like this.
ifneq ($(KERNELRELEASE),)
obj-m := mymodule.o
else
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
all:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
install:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
%:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD... | How to create .ko files in Linux |
1,394,457,423,000 |
I was playing a game on Steam and all a sudden I got a kernel panic. I manually shut down the computer and booted back into Linux Mint 17.1 (Cinnamon) 64-bit, and went to go check through my log files in /var/log/, but I couldn't find any references or any kind of messages relating to the kernel panic that happened.
I... |
To be sure that your machine generates a "core" file when a kernel failure occurs, you should confirm the "sysctl" settings of your machine.
IMO, following should be the settings (minimal) in /etc/sysctl.conf:
kernel.core_pattern = /var/crash/core.%t.%p
kernel.panic=10
kernel.unknown_nmi_panic=1
Execute sysctl -p aft... | Kernel Panic dumps no log files |
1,394,457,423,000 |
It sounds quite counter-productive to me to cache pages that are swapped out. If you swap pages in, what is the advantage to first cache them in memory, only to have to than move them to the right place? Even if pages are swapped in proactively, doesn't it make more sense to "just" swap them in? Doesn't in fact cachin... |
After some more research, I have found that the term SwapCached in /proc/meminfo is misleading. In fact, it relates to the number of bytes that are simultaneous in memory and swap, such that if these pages are not dirty, they do not need to be swapped out.
| Why does it makes sense to cache swap? |
1,394,457,423,000 |
According to http://www.linfo.org/kernel_mode.html in paragraph 7:
When a user process runs a portion of the kernel code via a system call, the process temporarily becomes a kernel process and is in kernel mode. While in kernel mode, the process will have root (i.e., administrative) privileges and access to key syste... |
(I'll try to be brief.)
In theory, there are two dimensions of privileges:
The computer's instruction set architecture (ISA), which protects certain information and/or functions of the machine.
The operating system (OS) creating an eco-system for applications and communication. At its core is the kernel, a program th... | Process in user mode switch to kernel mode. Then the process will have root privileges? |
1,394,457,423,000 |
I am using Crunchbang 64 bit O.S. with a ASUS N150 wireless adapter. Every time I close my laptop and it enters sleep mode, when I "wake it up" I am unable to connect back using the wireless adapter; I have to restart.
My questions are:
Is there a way to find the specific driver name? I know it's an ASUS N150 adapter... |
way to find the specific driver name
lspci | grep -i network
I am not sure whether that device is on the PCI or USB bus but you can try the following.
Use lsusb or lspci to find information about the device
Lookup that device for the corresponding module ("driver")
Make sure that module is loaded and available with... | How to Find and reload specific driver from kernel? |
1,394,457,423,000 |
A simple example. I'm running a process that serves http request using TCP sockets. It might A) calculate something which means CPU will be the bottleneck B) Send a large file which may cause the network to be the bottleneck or C) Complex database query with semi-random access causing a disk bottleneck
Should I try to... |
Linux:
The Linux kernel have a great implementation for the matter and have many features/settings intended to manage the ressources for the running process (over CPU governors, sysctl or cgroup), in such situation tuning those settings along with swap adjustment (if required) is recommended, basically you will be ada... | Should I attempt to 'balance' my threads or does linux do this? |
1,394,457,423,000 |
At this page you can download a configuration file that lets you target a particular notebook architecture during the compilation of a new 32-bit Linux kernel.
I need a 64 bit version.
What do I have to do? I compiled a kernel 2-3 times in my life but I never touched a config file, I always have used an interactive me... |
The recommended answer, as the comment suggests, is to save it as .config in the top-level source directory, and then run make xconfig (GUI, easier) or make menuconfig (TUI) on a 64-bit system.
That said, to simply switch from 32-bit to 64-bit without changing anything else, a little editing at the beginning is all th... | How do I convert a kernel .config file from 32-bit to 64-bit? |
1,394,457,423,000 |
I'm experimenting with generating some custom kernels using genkernel.
However, each iteration leaves a file in /boot called System.map-genkernel-<arch>-<version>.
Is it safe to rename and/or delete the System.map-* files?
|
The System.map file is mainly used to debug kernel crashes. It's not actually necessary, but it's best to keep it around if you're going to use that kernel. If you've decided you don't need that kernel, then it's safe to delete the corresponding map file.
If you're really low on disk space, you could compress the ma... | Safe to delete System.map-* files in /boot? |
1,394,457,423,000 |
Without initramfs/initrd support, the following kernel command line won't work:
linux /bzImage root=UUID=666c2eee-193d-42db-a490-4c444342bd4e ro
How can I identify my root partition via UUID without the need for an initramfs/initrd?
I can't use a device name like /dev/sda1 either, because the partition resides on a... |
I found the answer burried in another thread:
A UUID identifies a filesystems, whereas a PARTUUID identifies a partition (i.e. remains intact after reformatting). Without initramfs/initrd the kernel only supports PARTUUID.
To find the PARTUUID of the block devices in your machine use
sudo blkid
This will print, for... | How to identify root partition via UUID without initramfs/initrd |
1,394,457,423,000 |
I'm not even sure what the problem is, but I'm talking about the kernel attack described here. Down this list of comments somebody asked about renicing the process. The trick didn't improve the situation (the machine still runs in a very sluggish fashion) and the replying comment says something about kernel space vs u... |
There are services a kernel provides to user-space (such as opening sockets). There is a well-defined interface (API) that user-space programs can interact with the kernel through.
In this case, the user-space program is repeatedly opening sockets and sending file descriptors through them, then closing the sockets. T... | Why should a user program mess with kernel space? |
1,323,741,085,000 |
Process IDs are strictly increasing, but if your system runs long enough and there is a lot of processes terminating and starting, you could at some point reach the limit of the underlying integral type (on my system it seems to be a signed int) where no larger pid would exists. Would this cause old unused ids (of pro... |
Process IDs are not strictly increasing on any UNIX-like operating system I know of. Your question is based on a false assumption.
The only requirements on process IDs are:
A process ID shall not be reused by the system until the process lifetime ends. In addition, if there exists a process group whose process group ... | Will process ids be recycled? What if you reach the maximal id? |
1,323,741,085,000 |
[Disclaimer: I was initially a little nervous about posting this here, so I asked on Meta if discussing homebrew / modding was acceptable. Based on the response I've gotten from several veteran members, I've gone ahead and posted this thread. Here is the link on Meta.]
I'm currently trying to mod my original Xbox usin... |
Well. How's that for fried RAM? Guess that was the culprit, after all.
I'm pleased to report that, after removing the defective stick, everything is going quite smoothly.
| Unable to handle kernel paging request? |
1,323,741,085,000 |
I'm interested in the way Linux mmaps files into the main memory (in my context its for executing, but I guess the mmap process is the same for writing and reading as well) and which size it uses.
So I know Linux uses paging with usually 4kB pagesize (where in the kernel can I find this size?). But what exactly does t... |
There is no direct relationship between the size of the executable and the size in memory. Here's a very quick overview of what happens when a binary is executed:
The kernel parses the file and breaks it into section. Some sections are directly loaded into memory, in separate pages. Some sections aren't loaded at all... | Memory size for kernel mmap operation |
1,323,741,085,000 |
The memory resource controller for cgroups v1 allows for setting limits on memory usage on a particular cgroup using the memory.limit_in_bytes file. What is the Linux kernel's behavior when this limit is reached?
In particular:
Does the kernel OOM kill the process and if so is the oom_score of the process taken into... |
By default OOM is overseeing cgroups.
memory.oom_control
contains a flag (0 or 1) that enables or disables the Out of Memory killer for a cgroup. If enabled (0), tasks that attempt to consume more memory than they are allowed are immediately killed by the OOM killer. The OOM killer is enabled by default in every cgro... | What's the Linux kernel's behaviour when processes in a cgroup hit their memory limit? |
1,323,741,085,000 |
I have a 3TB drive which I have partitioned using GPT:
$ sudo sgdisk -p /dev/sdg
Disk /dev/sdg: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 2BC92531-AFE3-407F-AC81-ACB0CDF41295
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Par... |
I found a solution: A program called kpartx, which is a userspace program that uses devmapper to create partitions from loopback devices, which works great:
$ loop_device=`losetup --show -f /dev/sdg`
$ kpartx -a $loop_device
$ ls /dev/mapper
total 0
crw------- 1 root root 10, 236 Mar 2 17:59 control
brw-rw---- 1 roo... | Recognizing GPT partition table created with different logical sector size |
1,323,741,085,000 |
I'm still confused about the concept of kernel and filesystem.
Filesystems contain a table of inodes used to retrieve the different files and directories in different memories.
Is this inode table part of the kernel? I mean, is the inode table updated when the kernel mounts another filesystem?
Or is it part of the fil... |
There is some confusion here because kernel source and documentation is sloppy with how it uses the term 'inode'.
The filesystem can be considered as having two parts -- the filesystem code and data in memory, and the filesystem on disk.
The filesystem on disk is self contained and has all the non-volatile data and me... | How Linux kernel sees the filesystems |
1,323,741,085,000 |
I am trying to learn operating system concepts. Here is two simple python code:
while True:
pass
and this one:
from time import sleep
while True:
sleep(0.00000001)
Question: Why when running first code CPU usage is 100% but when running the second one it is about 1% to 2% ? I know it may sounds stupid but wh... |
Why when running first code CPU usage is 100% but when running the second one it is about 1% to 2% ?
Because the first is a "busy loop": You are always executing code. The second tells the OS that this particular process wants to pause (sleep), so the OS deschedules the process, and if nothing else is using CPU, the... | What is difference between sleep and NOP in depth? |
1,323,741,085,000 |
Not so much asking what books (although if you know of any guides/tutorials that'd be helpful) but what is the best way to start doing kernel programming and is there a particular distribution that would be best to learn on?
I'm mostly interested in the Device Drivers portion, but I want to learn how the Kernel is set... |
Firstly:
For the baby stages, writing various variations on "hello world" modules, and virtual hardware drivers, are the best way to start (real hardware introduces real world problems best faced when you have more of an idea what you are doing).
"Linux Device Drivers" is an excellent book and well worth starting with... | Best way to get into Kernel programming? |
1,323,741,085,000 |
If a program is not allowed to handle or ignore SIGKILL and SIGSTOP, and must immediately terminate, why does the kernel even send the signal to the program? Can't the kernel simply evict the program from the CPU and memory? I assume the kernel would have the ability do directly do this.
|
This answer is partly correct, there is more to do to terminate a process than to free the memory. However a SIGKILL is not a tap on the shoulder and a request to do something, it is one of the few signals that a process can't ignore or handle. That means that a SIGKILL is always handled by the kernel's default handle... | Why does the kernel even bother to send SIGKILL? [duplicate] |
1,323,741,085,000 |
I've heard of lines of code that are distributed with the Linux Kernel that aren't open. Maybe some drivers or something like that.
I'd like to know how much of that is true? Are there lines of code that are distributed with the Kernel (as when you download it from kernel.org) that aren't open at all? And how much tha... |
The Linux kernel itself is all free software, distributed under the GNU General Public License.
Third parties may distribute closed-source drivers in the form of loadable kernel modules. There's some debate as to whether the GPL allows them; Linus Torvalds has decreed that proprietary modules are allowed.
Many device ... | Proprietary or Closed Parts of the Kernel |
1,323,741,085,000 |
Since Intel, AMD and ARM is affected by the Spectre and Meltdown cpu kernel memory leak bugs/flaws, could we say that Power architecture is safe from these?
|
No, you could not say it's safe.
https://www.ibm.com/blogs/psirt/potential-impact-processors-power-family/
Complete mitigation of this vulnerability for Power Systems clients involves installing patches to both system firmware and operating systems. The firmware patch provides partial remediation to these vulnerabili... | Is AIX/Power safe from Spectre / Meltdown? |
1,323,741,085,000 |
I am aware that this is simplified/generalized explanation, but top(1) utility divides memory in FreeBSD into six pools- Active, Inactive, Wired, Cache, Buffers and Free. Example from top(1) output:
Mem: 130M Active, 42M Inact, 51M Wired, 14M Cache, 34M Buf, 648K Free
Swap: 512M Total, 512M Free
Active is used by run... |
To make it short, active and wired is used memory that shouldn't or cannot be swapped out to free memory.
While inactive can properly be swapped out, but is still owned (not freed) by a process or the kernel, so this is not heavily used memory, but still used.
New is laundry which is a list of dirty memory pages, whic... | How does FreeBSD allocate memory? |
1,323,741,085,000 |
I am writing code that relies on the output of /proc/meminfo, /proc/cpuinfo etc. Are the file contents always in English? For example, will MemTotal in /proc/meminfo always be MemTotal in all locales?
|
Yes, usually that is the case, as those messages are provided by the kernel itself, and including a hundred translations into the kernel image itself would serve no purpose other than increasing the kernel size dramatically.
For many things there are front-ends, user space programs which read the kernel info and prese... | Are the outputs of /proc/meminfo, /proc/cpuinfo etc always in English? |
1,323,741,085,000 |
First off, the details.
BEFORE: kernel: 3.2.0-2-amd64, nvidia driver: 295.59
AFTER: kernel: 3.2.0-3-amd64, nvidia driver: 302.17-3
My Debian wheezy is kept recent at all times. Actually, doing daily apt-get upgrade -s got me in this trouble in the first place.
Evidently, after an apt-get upgrade, something "broke" on ... |
SOLVED!
Simple as that: /root/.bashrc had this inside:
export GREP_OPTIONS='--color=always'
Changed it to:
export GREP_OPTIONS='--color=never'
...and restarted the root shell (of course; do not omit this step). Everything started working again. Both NVIDIA and VirtualBox kernel modules built from the first try. I ... | Cannot create "Hello World" module (and NVIDIA, and VirtualBox) |
1,323,741,085,000 |
To remount a mounted filesystem to read-only, I can use following command:
mount -o remount,ro /foo
This is used for example in the shutdown sequence, where root filesystem (/) is remounted read-only, right before halt/reboot is called.
What does actually remounting to read-only do? Does it change some "flag" in the ... |
Mounting or remounting a filesystem is done using the mount(2) syscall. When remounting, this takes the target location (the mountpoint), the flags to be used in the mount operation, and any extra data used for the specific filesystem involved. When remounting read-only, the flags used are MS_RDONLY and MS_REMOUNT; yo... | what does mount -o remount,ro / actually do (under the hood) |
1,323,741,085,000 |
I'm using Debian 'Jessie'.
Sometimes my computer freezes, and then I can't use Ctrl+Alt+Del to reboot, Ctrl+Alt+Backspace to kill the X Window System nor Ctrl+Alt+F1 to open a new shell. I've read in several sites that in a computer freeze you can use the basic kernel commands that are used pressing Alt+Sysreq (holdi... |
Magic keys tend to be disabled in Debian these days, so you can't just hard-reboot your machine or kill all your X processes by pressing a few keys accidentally.
The X Ctrl+Alt+Backspace key sequence is controlled by the "DontZap" option in /etc/X11/xorg.conf -- man xorg.conf for more details. I think you want this, t... | Why isn't "REISUB" working on Debian? |
1,323,741,085,000 |
I'm looking forward to download a Linux Kernel to get to know how to modify it and how to compile it.
I am using Debian distribution and I'm interested in the Debian-modified Linux Kernel rather than in the vanilla Kernel form kernel.org.
Doing some research I found out there are mainly two ways for achiving this purp... |
In Debian terminology, when you run
apt-get source linux-image-3.19.0-trunk-amd64
(or the equivalent apt-get source linux), you're actually downloading and extracting the source package. This contains the upstream code (the kernel source code downloaded from kernel.org) and all the Debian packaging, including patches... | Get kernel source: apt-get install vs apt-get source |
1,323,741,085,000 |
I'm working on a curses GUI that is supposed to start up automatically on boot-up in the default linux terminal (I have no X server installed). I have this working great, but I have a problem where shortly after my curses application starts, the OS will dump some information to the terminal, which messes up my GUI. ... |
You can use the command dmesg -n1 to prevent all messages, except panic messages, from appearing on the console.
To make this change permanent, modify your /etc/sysctl.conf file to include the following setting (the first 3 is the important part).
kernel.printk = 3 4 1 3
See this post for information on the kernel.pr... | How do I prevent system information from being displayed on a terminal? |
1,323,741,085,000 |
My sound and wireless hardware are not working under my current 3.16.x kernel on my Debian 8 system. I performed:
apt-cache search linux-image
with the intention of getting the 4.x version linux kernel to try to fix this (as the hardware works fine under Ubuntu 16.04).
However it seems the choice of kernel is limited... |
Add something like
deb http://mirror.one.com/debian/ jessie-backports main contrib non-free
to your sources.list. To install the 4.6 kernel, run:
apt-get update
apt-get install -t jessie-backports linux-image linux-image-amd64
It might depend on a few other things that can also be found in backports, you might hav... | Upgrade linux kernel 3 to 4 in Debian 8 |
1,323,741,085,000 |
Quite interested in the size of the kernel ring buffer, how much information it can hold, and what data types?
|
Regarding the size, it's recorded in your kernel's config file. For example, on Amazon EC2 here, it's 256 KiB.
# grep CONFIG_LOG_BUF_SHIFT /boot/config-`uname -r`
CONFIG_LOG_BUF_SHIFT=18
# perl -e 'printf "%d KiB\n",(1<<18)/1024'
256 KiB
#
Referenced in /kernel/printk/printk.c
#define __LOG_BUF_LEN (1 << CONFIG_LOG_... | How to find out a linux kernel ring buffer size? |
1,323,741,085,000 |
I'm trying to upgrade my kernel to 4.19, because I need to run some benchmarks that require it (with some kernel options turned on).
I'm completely stuck as to why this isn't working. I did two ubuntu 18 clean installs already, download the 4.19 kernel, make oldconfig (or olddefconfig), install modules and the kernel ... |
Turns out the initrd image was huge. 500MB in comparison to the default's 50MB. The key to reducing size was here: How to reduce the size of the initrd when compiling your kernel?
Basically:
In /etc/initramfs-tools/initramfs.conf change MODULES to MODULES=dep.
When installing modules, pass a variable to strip debug sy... | Out of memory on "Loading initial ramdisk" after kernel upgrade (4.15 to 4.19) on Ubuntu 18 |
1,323,741,085,000 |
Why does "page allocation failure" occur whereas there are still "58*4096kB (C)" that could be used?
You see, the kernel complains when allocating memory with the size of order:10(i.e.page allocation failure: order:10). But there are free blocks indeed(i.e. "58*4096kB (C)" ). So I think it should not complain since th... |
You did not provide much information,
like what are the condition(s) under which this occurs,
which system (Linux, Android,...) are you running, etc.
Anyways you can start fine-tuning your kernel.
You could play around with vm.min_free_kbytes,
which tells the kernel to keep such memory free (the unit is KiB)
under al... | Why does "page allocation failure" occur whereas there are still enough memory(i.e. "58*4096kB (C)") that could be used? |
1,323,741,085,000 |
I failed to find the kernel binary in the standard location in /boot. I've also searched the whole file system for vmlinux or bzimage
find / -iname vmlin*
find / -iname bzimage
However, this is an embedded device not a standard desktop. Is it possible that the kernel binary is located on a different storage location ... |
/boot is the standard location for the kernel in desktop/server distributions, but embedded systems vary greatly. Where the kernel is stored entirely depends on your bootloader, and it may not be a file as embedded bootloaders are often not capable of reading Linux filesystems.
For example, with U-Boot (a popular embe... | Location of the kernel binary (when not in /boot)? |
1,323,741,085,000 |
Sorry - I don't remember the exact name. I know there is mechanism to patch the kernel at runtime by loading modules without need of the reboot as long as the structures involved are not affected. It is used by servers for security patches and recently by Ubuntu & Fedora.
What is the name of mechanism
Is there any ho... |
I think you are looking for Ksplice. I haven't really followed the technology so I'm not sure how freely available the how-to information is but they certainly have freely available support for some Fedora and Ubuntu versions.
| Patching Linux kernel on-line (i.e. without rebooting) |
1,323,741,085,000 |
All my partitions are encrypted (/ and /home), but the /boot partition has to remain unencrypted and is open for manipulation. I was thinking about hashing the kernel on bootup and checking the result against a stored value (generated on compile, saved on my encrypted drive) to see if someone, somehow manipulated the ... |
What you're looking for — verifying that the operating system running on the computer is one you trust — is called trusted boot. (It's one of several things that are sometimes called trusted boot). Your proposed method does not achieve this objective.
Encryption does not provide data integrity or authenticity. In othe... | Signing/Checksumming the kernel to prevent/detect manipulation |
1,323,741,085,000 |
Block is an abstraction provided by filesystem, block size is integer multiples of disk sector size. Suppose a filesystem uses 4K as its block size, and the disk sector size is 512B, when the filesystem issues a write request to the disk driver, how to atomically write the entire 4K block to disk(avoid partial write)?... |
A disk should grant that a sector is written atomically. The sector size was 512 bytes and today is typically 4096 bytes for larger disks.
In order to get no problem from partially written "blocks", it is important to write everything in a special order.
Note that the only reason why there could be a partially writte... | How filesystem atomically writes a block to disk? |
1,323,741,085,000 |
I've learned that the firmware-subsystem uses udevd to copy a firmware to the created sysfs 'data' entry.
But how does this work in case of a built-in driver module where udevd hasn't started yet?
I'am using a 3.14 Kernel.
TIA!
|
I read through the kernel sources, especially drivers/base/firmware_class.c, and discovered that
CONFIG_FW_LOADER_USER_HELPER
would activate the udev firmware loading variant (obviously only usable for loadable modules when udev is running). But as mentioned on LKML this seems to be an obsolete method.
Furthermore ... | How does linux load firmeware for built-in driver modules [duplicate] |
1,323,741,085,000 |
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 backup under normal stress as before, where as Windows provides 3hrs/+ of backup under similar stress.
Below are some ... |
The problem is gone with new versions of linux kernel :). I have not seen power regression since ubuntu 14.
| Linux kernel 3.3 power regression |
1,323,741,085,000 |
I just compiled a new kernel and asked myself: What decides during the compilation process which kernel modules are built in the kernel statically?
I then deleted /lib/modules, rebooted and found that my system works fine, so it appears all essential modules are statically built in the kernel.
Without /lib/modules, th... |
You do this as part of the configuration process, usually when you run make config, make menuconfig or similar. You can set the module as built-in (marked as *), or modularised (marked as M).
You can see examples of this in a screenshot of make menuconfig, from here:
| What decides which kernel modules are built in the kernel statically during compilation? |
1,323,741,085,000 |
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 a CANBUS device that I need to attach which comes with drivers in the form of .ko files. I would like to be able to ins... |
If you have a /proc filesystem, the file /proc/modules exists if and only if the kernel if compiled with module support. If the file exists but is empty, your kernel supports modules but none are loaded at the moment. If the file doesn't exist, your kernel cannot load any module.
It's technically possible to have load... | Can I detect if my custom made kernel was built with module support? |
1,323,741,085,000 |
In the below 2.6.18 Linux Kernel (Red Hat) server, there is a lot of free memory, but I see some swap is used. I always thought of swap as an overflow when memory has been depleted. Why would it swap with about 7GB (50%) free memory? Swappiness is 60 (default).
Meminfo output:
MemTotal: 16436132 kB
MemFree: ... |
Swapping only when there is no free memory is only the case if you set swappiness to 0. Otherwise, during idle time, the kernel will swap memory. In doing this the data is not removed from memory, but rather a copy is made in the swap partition.
This means that, should the situation arise that memory is depleted, it d... | Why is swap used when a lot of memory is still free? [duplicate] |
1,323,741,085,000 |
I need a small distro, that is stable. I don't need a full X server or window manager, I only need it to run one single application with a basic UI that consists of a viewport.
I would like for the distro to be as small as possible. 700 mb or less would be ideal.
Is their a base distro of ubuntu or similar that I ca... |
Have a look at TinyCore Linux. It comes in two variants, one CLI and one including X.
The X version including a window manager and a simple desktop is about 12MiB. If you don't need a window manager, you can just start X and your application. A window manager is not required.
| Need small distro without a desktop or windows manager, just to run a single graphical app [duplicate] |
1,639,666,599,000 |
One of our devices froze today with the following kernel messages:
[79648.067306] BUG: unable to handle page fault for address: 0000000004000034
[79648.067315] #PF: supervisor read access in kernel mode
[79648.067318] #PF: error_code(0x0000) - not-present page
From the call trace (see below) it appears that this erro... |
[79648.067306] BUG: unable to handle page fault for address: 0000000004000034
[79648.067315] #PF: supervisor read access in kernel mode
[79648.067318] #PF: error_code(0x0000) - not-present page
These errors indicate kernel code tried to access an invalid pointer.
The kernel code tried to access the virtual memory add... | Kernel: BUG: unable to handle page fault for address |
1,639,666,599,000 |
I have two questions about the Linux kernel.
Specifically, does anybody know exactly, what Linux does in the timer interrupt? Is there some documentation about this?
And what is affected when changing the CONFIG_HZ setting, when building the kernel?
Thanks in advance!
|
The Linux timer interrupt handler doesn’t do all that much directly. For x86, you’ll find the default PIT/HPET timer interrupt handler in arch/x86/kernel/time.c:
static irqreturn_t timer_interrupt(int irq, void *dev_id)
{
global_clock_event->event_handler(global_clock_event);
return IRQ_HANDLED;
}
This calls ... | Linux timer interrupt |
1,639,666,599,000 |
There's a binary that I need to run which uses bind with a port argument of zero, to get a random free port from the system. Is there a way I can constrain the range of ports the kernel is allowed to pick from?
|
on Linux, you'd do something like
sudo sysctl -w net.ipv4.ip_local_port_range="60000 61000"
instruction for changing ephemeral port range on other unices can be found for example at http://www.ncftp.com/ncftpd/doc/misc/ephemeral_ports.html
| How to limit range of random port sockets? |
1,639,666,599,000 |
I am trying to install a Linux kernel (3.8.1) from source in a Fedora distribution.
The kernel is a vanilla one.
I follow the kernel's build instructions closely that is:
make menuconfig
make
sudo make modules_install install
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Everything in /boot seems fine.
I can see System... |
Easiest way to get a working kernel configuration is to just copy Fedora's .config over and then do a make oldconfig to configure it. The configuration is found at /boot/config-*
| Self-built kernel: failed to mount /dev: No such device |
1,639,666,599,000 |
I am trying to understand the disadvantages of using Linux kernel modules. I understand the benefits of using them: the ability to dynamically insert code into a running system without having to recompile and reboot the base system. Given this strong advantage, I was guessing most of kernel code should then be in kern... |
Yes, the reason that essential components (such as mm) cannot be loadable modules is because they are essential -- the kernel will not work without them.
I can't find any references claiming the effects of memory fragmentation with regard to loadable modules is significant, but this part of the LLKM how-to might be in... | Disadvantages of linux kernel module? |
1,639,666,599,000 |
Is it possible to change this value in runtime without rebooting? I don't always have this problem, when I suspend right now I'm getting a failure and
Suspending console(s) (use no_console_suspend to debug)
I would like to debug now, without having to reboot and recreate the problem.
|
Yes:
echo N | sudo tee /sys/module/printk/parameters/console_suspend
| Can no_console_suspend be set in runtime? |
1,639,666,599,000 |
In particular, I'd like to add a fd flag and a branch in a couple of fd-handling syscalls that should be used if the flag is set instead of the current code. I think the only thing that matters here for the purposes of this question is that this should be a generic rather than hardware specific modification.
How do I ... |
eudyptula-boot is quite handy for this; its introductory blog post has more details, but basically it allows you to boot a VM using the kernel you wish to test, and your existing filesystems (using overlayfs). That way you can quickly check a kernel without rebooting, and you still have access to all your files.
The o... | How do I quickly build and test the kernel if I want to modify a system call |
1,639,666,599,000 |
I'm currently attempting to remove the usbserial module in order to install a new driver module. When I attempt to remove the module I get the following issue:
[root@localhost xr21v141x-lnx-3.0-pak]# modprobe -r usbserial
FATAL: Module usbserial is builtin
How can I remove the usbserial module?
|
That means the module was compiled into the kernel. If you want to be able to unload it, you will have to compile a new kernel and have it built as a dynamically (un)loadable module instead.
| Removing builtin modules in Linux |
1,639,666,599,000 |
What is the convention for numbering the linux kernels? AFAIK, the numbers never seem to decrease. However, i think I've seen three kinds of schemes
2.6.32-29
2.6.32-29.58
2.6.11.10
Can anybody explain what are the interpretations of these numbers and formats?
|
2.6.32-29: 2.6.32: base kernel, -29 final release by ubuntu
2.6.32-29.58: 2.6.32: base kernel, -29.58 ongoing release (-29) by ubuntu
2.6.11.10: 2.6.11: base kernel, .10 tenth patch release of it. (2.6.11 was chosen by volunteers (read Greg KH) to be a "long term maintenance" release).
| Numbering convention for the linux kernel? |
1,639,666,599,000 |
What exactly are shmpages in the grand scheme of kernel and memory terminology. If I'm hitting a shmpages limit, what does that mean?
I'm also curious if this applies to more than linux
|
User mode processes can use Interprocess Communication (IPC) to communicate with each other, the fastest method of achieving this is by using shared memory pages (shmpages).
This happens for example if banshee plays music and vlc plays a video, both processes have to access pulseaudio to output some sound.
Try to fi... | What are shmpages in laymans terms? |
1,639,666,599,000 |
I'm interessted in getting the number of context switches a two processes in a KVM vm takes on a singel CPU over some time.
Earlier i have used perf, is this best practice?
And how much time is used on a context switch per CPU?
|
About 1.2 microseconds which is about a thousand Cycles
https://eli.thegreenplace.net/2018/measuring-context-switching-and-memory-overheads-for-linux-threads/
| How long time does a context switch take in Linux (ubuntu 18.04) |
1,639,666,599,000 |
I want to make a very minimal linux os which only have a terminal interface and basic commands/applications (busybox is my choice for commands/apps). I don't want the installation option on my os. I just want it to be booted and run completely from RAM. I'm planning to use ISO-Linux as bootloader. No networking, no v... |
Technically you can achieve this.
Though, kernel do not have any built-in user-interface.
You need to follow steps as:
1. Create a initramfs with static busybox and nothing else.
This initramfs will have few necessary directories: like proc, sys, tmp, bin, usr, etc
2. Write a "/init" script, whose main job will be:
... | How to make a minimal bootable linux (only with terminal) from kernel source code? [duplicate] |
1,639,666,599,000 |
I updated my buildroot for the version "2014.08" (stable version) and I updated the Kernel version (3.12.26) of my project, when the buildroot try to build the linux-headers-3.12.26 package, occurs the following error:
/output/host/usr/arm-buildroot-linux-gnueabi/sysroot 2.6; then exit 1; fi
Incorrect selection o... |
No, you don't have to change any script. It seems like your Buildroot configuration is incorrect, but since you didn't provide your config, there's no real way to give a precise answer. Can you run make savedefconfig and post the output of this file here?
Basically, what Buildroot is complaining about here is a mismat... | Error compiling buildroot |
1,639,666,599,000 |
I want to build my Linux kernel on my host and use it in my VWware virtual machine. They both use the same Ubuntu kernel now.
On my Host, I do make and make configure. Then, what files should I copy to the target machine, before I do make modules_install and make install?
What other things do I need to do?
|
The 'best' way to do this, is building it as a package. You can then distribute and install it to any Ubuntu machine running the same (major) version.
For building vanilla kernels from source, there's a tool make-kpkg which can build the kernel as packages. Other major advantages: easy reverting by just removing the p... | Build kernel in one machine, install in another |
1,639,666,599,000 |
/usr/src/linux-3.2.1 # make install
scripts/kconfig/conf --silentoldconfig Kconfig
sh /usr/src/linux-3.2.1/arch/x86/boot/install.sh 3.2.1-12-desktop arch/x86/boot/bzImage \
System.map "/boot"
You may need to create an initial ramdisk now.
--
/boot # mkinitrd initrd-3.2.1-12-desktop.img 3.2.1-12-deskto... |
You should be using mkinitramfs, not mkinitrd. The actual initrd format is obsolete and initramfs is used instead these days, even though it is still called an initrd. Better yet, just use update-initramfs. Also you need to run make modules_install to install the modules.
| How to create an initrd image on OpenSuSE linux? |
1,639,666,599,000 |
There are three spin_lock functions in the kernel I am currently busy with.
spin_lock
spin_lock_irq
spin_lock_irqsave
I only find contributions covering only two of them (including Linux documentation).
Then answers or explanations are formulated ambigouos or contrary to each other or even contain comments saying th... |
A brief description is given in Chapter 5. Concurrency and Race Conditions of Linux Device Drivers, Third Edition
void spin_lock(spinlock_t *lock);
void spin_lock_irqsave(spinlock_t *lock, unsigned long flags);
void spin_lock_irq(spinlock_t *lock);
spin_lock_irqsave disables interrupts (on the local processor only) ... | spin_lock vs. spin_lock_irq vs. spin_lock_irqsave |
1,639,666,599,000 |
I have acquired a new wireless keyboard, and I've tested it out on both a Windows and a Linux box.
It worked on both, but with an initial difference - Windows took a minute or two, to look up the keyboard's (Logitech's) drivers on the Internet and install them. It visually notified my of doing so and displayed its pro... |
Linux hardware drivers are kernel modules. Because of the open source model and licensing of the kernel, very few of these are written by hardware manufacturers; most of them are reverse engineered or based on standardized public protocols. Pretty sure bluetooth is in the later realm, and also that things like mice a... | How are drivers for peripheral hardware installed in Linux? |
1,639,666,599,000 |
The question stated below might not be technically correct(misconception) so it would be appreciable if misconception is also addressed.
Which ring level do the different *nix run levels operate in?
Ring tag not available.
|
Unix runlevels are orthogonal (in the sense "unrelated", "independent of" - see comments) to protection rings.
Runlevels are basically a run time configurations/states of the operating system as a whole, they describe what services are available ("to the user") - like SSH access, MTA, file server, GUI.
Rings are a har... | Rings and run levels |
1,639,666,599,000 |
I formatted an external hard drive (sdc) to ntfs using parted, creating one primary partition (sdc1). Before formatting the device SystemRescueCd was installed on the external hard drive using the command dd in order to be used as a bootable USB. However when listing devices with lsblk -f I am still getting the old FS... |
From the output of lsblk -f in the original post I suspected that the signature of the installed SystemRescueCd was still present in the external hard drive. So I ran the command wipefs /dev/sdc and wipefs /dev/sdc1 which printed information about sdc and all partitions on sdc:
[root@fedora user]# wipefs /dev/sdc
DEVI... | Why is lsblk showing the old FSTYPE and LABEL of a device that was formatted? |
1,639,666,599,000 |
I want to try my hand at writing a linux driver. I am trying to set up my environment. My current kernel:
$ uname -r
4.10.0-37-generic
I then download the source code:
$ apt-get source linux-image-$(uname -r)
Reading package lists... Done
Picking 'linux' as source package instead of 'linux-image-4.10.0-37-generic'
.... |
There are a number of approaches...
If you’re trying to build an external module (including one you’re developing), you only need the kernel headers:
apt install linux-header-$(uname -r)
This will provide the necessary files so that the /lib/modules/$(uname -r)/{build,source} symlinks point to something meaningful. ... | Getting kernel source code (ubuntu) |
1,639,666,599,000 |
I've noticed that some procs, such as bash, have their entire /proc/<pid>/ resources readable by the user who created that proc. However other procs, such as chrome or gnome-keyring-daemon, have most of their /proc/<pid>/ resources only accessible by root, despite the process itself being owned by the normal user and ... |
Linux has a system call, which will change the dumpable flag. Here is some example code, which I wrote several years ago:
#include <sys/prctl.h>
...
/* The last three arguments are just padding, because the
* system call requires five arguments.
*/
prctl(PR_SET_DUMPABLE,1,42,42,42);
It may be that gnome-keyring-dae... | What causes /proc/<pid>/* resources to become owned by root, despite the procs being launched as a normal user? |
1,639,666,599,000 |
I wanted to check my current Debian version so I typed uname -a and it gave me some stuff including Debian 3.2.73.
But Then I found this command cat /etc/debian_version and it gave me Debian 7.9
1- What is the difference between the two commands & 2-Which version is installed?
|
uname
It prints the name, version and other details about the current machine and the operating system kernel running on it.
3.2.73 is kernel version of your operating system. When you run the command shows the updated Operating system, kernel version, released date etc.
/etc/debian_version
This command is used to Che... | Different Debian versions from two different commands |
1,639,666,599,000 |
I was trying to study the debugging of kernel using QEMU. I tried initially and failed due to the fact that there was no virtual file system. The answers to this post suggests that there should be a virtual file system. But it doesn't talk about how to create virtual FS for kernel debugging and how to pass it over to ... |
Depending on the distribution you'd like to use, there are various ways to create a file system image, e.g. this article walks you through the laborious way to a "Linux from Scratch" system.
In general, you'd either create a QEMU image using qemu-img, fetch some distribution's installation media and use QEMU with the ... | Debugging Linux Kernel with QEMU |
1,639,666,599,000 |
Directly related: Prevent claiming of novelty usb device by usbhid so I can control it with libusb?
I want to access an RFID reader (works as HID device) from a program that uses libusb-0.1. In the code, the kernel driver is correctly detached with usb_detach_kernel_driver_np (no errors), but is seems that whenever my... |
I've solved this part of the problem:
OPTIONS=="ignore_device" was removed from the kernel (commit)
blacklist usbhid didn't do anything, not even blocked my keyboard
A configuration file in /etc/modprobe.d with options usbhid quirks=0xdead:0xbeef:0x0004 did not work because usbhid was not compiled as module
So, I ad... | Prevent usbhid from claiming USB device |
1,639,666,599,000 |
I have compiled and installed the 2.6 kernel on an ARM board. I am using the ARM mini2440 board.
I would like to know if there is already a way to access the General Purpose I/O port pins?
Or will I have to do ioctl() and access them directly from the memory?
|
Use the sysfs control files in /sys/class/gpio. The following links will hopefully be useful to helping you get started:
http://www.avrfreaks.net/wiki/index.php/Documentation:Linux/GPIO
Have seen reports of this article on the Beagle Board also working with the mini2440:
http://blog.makezine.com/archive/2009/02/blink... | Linux kernel 2.6 on ARM |
1,639,666,599,000 |
I get following errors in my logs:
kernel: snd_hda_intel 0000:00:1b.0: IRQ timing workaround is
activated for card #0. Suggest a bigger bdl_pos_adj
Google found some old posts here and here which deal with the same problem. The offered solution suggests to change the value for the kernel module:
options snd-... |
The kernel documentation describes bdl_pos_adj as follows (see the ALSA driver configuration guide and More Notes on HD-Audio Driver):
bdl_pos_adj - Specifies the DMA IRQ timing delay in samples.
Passing -1 will make the driver to choose the appropriate
value based on the controller chip.
(sic). On Intel controllers... | bdl_pos_adj: set IRQ timing workaround for hda-intel |
1,639,666,599,000 |
I am trying to run a distro in the virtual disk image with a custom kernel,so that I can experiment and debug the kernel. I followed this to make a disk image and then install Debian to it. Now I tried running distro with the following command:-
qemu-system-i386 -hda debian.img -kernel ../linux-3.6.11/arch/i386/boot/b... |
I don't think you would have to start debugging the kernel right away. This error message means that the kernel is unable to mount the partition you requested to be /. This would happen for example if you gave it an empty disk image (my hunch is this is your case) - the kernel in the VM sees an unpartitioned drive, th... | Kernel and QEMU : Unable to mount root fs error |
1,639,666,599,000 |
Is there any user space tool that can retrieve and dump the list of bad blocks in a NAND flash device? I've checked the mtdinfo command line utility, and also searched /proc and /sys, but couldn't find anything.
I am looking for something suitable for use from a shell script.
I could parse dmesg as the kernel prints b... |
I have not been able to find any user space utility doing what I need. The closest I have found is the nanddump utility from mtd-utils, which can dump NAND contents, including bad blocks.
| Print list of bad blocks in NAND flash from user space |
1,639,666,599,000 |
I was going to post this in ServerFault originally but I thought this might be a better place. Let me know if you think there is a better place to post this question.
I have an user-space application which performs networking through Java NIO's API (aka epoll on Linux) For demonstration and diagnostic purposes, I ha... |
The problem ended up being using rate-control with the default configured sockets was creating a situation where the internal TCP buffer size was automatically-adjusting to larger and larger size due to the slow read out times. (the default max size is like 6MB) When the size was automatically growing, the TCP compac... | High softirq when using rate control networking |
1,639,666,599,000 |
One of my servers keeps getting unreachable because of a kernel bug. I tried all the kernel versions mentioned below but unfortunately none of them fixed this issue.
What can I do to resolve this issue?
Ubuntu Version: Ubuntu 16.04.3 LTS
Kernel Versions:
4.13.0
4.14.17
4.15.2
4.15.3
NIC:
00:1f.6 Ethernet controller... |
I was able to resolve this issue by disabling TSO, GSO and GRO with the following command (This command needs to be run again after a server reboot, it can also be added to rc.local):
ethtool -K eth0 gso off gro off tso off
It has been over 6 months now and the issue didn't occur again since I disabled this.
| Kernel bug causes ethernet driver to stop working |
1,639,666,599,000 |
I need to use a custom kernel option at compile time (ACPI_REV_OVERRIDE_POSSIBLE) in order for my graphical card to work correctly with bumblebeed and nvidia drivers on my Dell XPS 15 9560. I'm using ArchLinux.
Every few days, there is a new kernel release (4.11.5, 4.11.6, ...).
How should I handle those kernel updat... |
That config line should exist in the /proc/config.gz file of any kernel you previously configured it in. You could do what I do, in a two-liner, on my Gentoo systems:
su -
cd /usr/src && cp -a linux-<new version> /dev/shm/ && ln -s /dev/shm/linux-<new version> linux && cd linux && zcat /proc/config.gz > .config && mak... | How to handle linux kernel updates when using a custom kernel? |
1,425,951,077,000 |
I am running VirtualBox (using the Qiime image http://qiime.org/install/virtual_box.html)
The physical hardware is a 32 core machine. The virtual machine in VirtualBox has been given 16 cores.
When booting I get:
Ubuntu 10.04.1 LTS
Linux 2.6.38-15-server
# grep . /sys/devices/system/cpu/*
/sys/devices/system/cpu/kern... |
QIIME came out with a new virtualbox image (version 1.5), which works.
If no one finds the answer to the problem above I will close the question in a week.
| VirtualBox guest: 16 CPUs detected but only 1 online |
1,425,951,077,000 |
Is there a command like
vi > out
vi | out
That I could use to cause a watchdog reset of my embedded linux device?
|
If you have a watchdog on your system and a driver that uses /dev/watchdog, all you have to do is kill the process that is feeding it; if there is no such process, then you can touch /dev/watchdog once to turn it on, and if you don't touch it again, it will reset.
You also might be interested in resetting the device u... | How do I cause a watchdog reset of my embedded Linux device |
1,425,951,077,000 |
I set up zram and made extensive tests inside my Linux machines to measure that it really helps in my scenario. However, I'm very confused that zram seems to use up memory of the whole uncompressed data size. When I type in "zramctl" I see this:
NAME ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/de... |
So after more testing and observations, I made a few very interesting discoveries. DATA is indeed the uncompressed amount of memory that takes up the swap space. But at first glance it's very deceiving and confusing. When you setup zram and use it as swap, disksize does not stand for the total amount of memory that zr... | Why does zram occupy much more memory compared to its "compressed" value? |
1,425,951,077,000 |
I have a hypothetical situation:
Let us say we have two strace processes S1 & S2, which are simply monitoring each other.
How can this be possible?
Well, in the command-line options for strace, -p PID is the way to pass the required PID, which (in our case) is not yet known when we issue the strace command. We could ... |
I will answer for Linux only.
Surprisingly, in newer kernels, the ptrace system call, which is used by strace in order to actually perform the tracing, is allowed to trace the init process. The manual page says:
EPERM The specified process cannot be traced. This could be because
the tracer has insuff... | How can strace monitor itself? |
1,425,951,077,000 |
I'd like to upgrade my Centos 7.1 kernel from 3.10 to 4.0
i did successfully in Ubuntu 15.04 using Linux 4.0.1-040001-generic
even though i updated it manually it's works fine
so please could anyone tell me how to upgrade Centos 7.1 Kernel to 4.0
|
You could upgrade the kernel via elrepo.
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm (external link)
yum install --enablerepo=elrepo-kernel kernel-ml
You can also install the updated firmware and headers
yum install --enablerepo=elrepo-kernel kernel-ml-{firmware,headers,devel}
You'll pr... | Centos 7.1 still using outdate kernel 3.10 how to upgrade to kernel 4.0 |
1,425,951,077,000 |
Is it possible to boot linux without a initrd.img ? I am planning to add default drivers as a part-of-kernel itself and avoid initrd completely.
What are the modules that should be made part-of-the-kernel instead of loadable modules ?
|
It is, unless your root volume is on an LVM, on a dmcrypt partition, or otherwise requires commands to be run before it can be accessed.
I haven't used an initrd on my server in years. You need at a minimum these modules built in:
the drivers of whatever controller where your root volume disk lives
the drivers neces... | Booting without initrd |
1,425,951,077,000 |
My kernel command line looks like this:
root=31:0 ro noinitrd console=ttyS0,115200 root=/dev/mtdblock2 rootfstype=squashfs
I think the first root entry identifies a disk by its major and minor device number and the second entry identifies it by its name. I can confirm that the rootfs is indeed on /dev/mtdblock2 but I... |
Different modules behave differently when you provide the same option multiple times. I know you can say console= multiple times, and you get multiple consoles (we use it for machines with main consoles on both their framebuffers and serial port).
However, you can only have one root partition, so root= almost certainl... | Multiple root options in Linux command line |
1,425,951,077,000 |
I would like to change my kernel's page size from 4KB to 4MB as I have had a large addition of RAM to my computer and I am never running out of anymore.
The idea is that programs requiring large amounts of memory will spend less time on allocating pages. I suppose it would improve performance, and I would like to try... |
You probably want to look at Transparent Hugepages. The .config item is CONFIG_TRANSPARENT_HUGEPAGE. Note that enabling this won't give you huge pages automatically. You'll need to set the CONFIG_TRANSPARENT_HUGEPAGE_MADVISE to 'n', in order to make it the default.
Also note that this doesn't allow you to choose an ar... | Change the size of my memory pages? |
1,425,951,077,000 |
I have a custom application running on an embedded x86 setup (built using buildroot and uClibc). The application has been running fine but this morning when I returned to work I discovered my process had been killed and the following output on my terminal
SAK: killed process 1008 (CX_SC3): fd#4 opened to the tty
SAK: ... |
SAK in this case really means Secure Attention Key. The message you are seeing is a kernel message defined in drivers/tty/tty_io.c. SAK is a key combination which ensures secure login for a user on console. On Linux SAK ensures this by killing all processes attached to the terminal SAK is invoked on. It is expected th... | My process was killed but I cannot understand the kernel notice |
1,425,951,077,000 |
I'm studying the linux kernel right know with O'Reilly's Understanding Linux Kernel and lately covered the signal and interrupt handling chapter sticking to some basic 2.4 linux version and diving into code as far as I can understand.
Yet, I couldn't explain to myself nor finding an answer elsewhere, what is the instr... |
The keypress generates an interrupt, just like you figured out. The interrupt is processed by an interrupt handler; which handler depends on the type of hardware, e.g. USB keyboard or PS/2 keyboard. The interrupt handler reads the key code from the hardware and buffers it. From the buffer the character is picked up by... | How does keyboard interrupt ends up as process signal |
1,425,951,077,000 |
I am trying to install a NVidia Cuda driver on a Amazon EC2. GPU instance (Amazon Linux AMI (HVM) 2013.09.2 - ami-e9a18d80) following the instructions laid out in a blog. It worked for the last two weeks, but today it fails.
The instructions state
sudo yum -y groupinstall "Development Tools"
sudo yum -y install git li... |
You simply need to snatch your kernel-source tree (and make sure the build is identical to your bootable kernel.)
So, yum -y install kernel-devel kernel-headers
uname -r will also tell you the specific kernel build, important to make sure it matches the devel packages!
| Driver install, kernel source not found |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.