date
int64
1,220B
1,719B
question_description
stringlengths
28
29.9k
accepted_answer
stringlengths
12
26.4k
question_title
stringlengths
14
159
1,389,107,558,000
I'm having an incredibly tough time making sense of this excerpt from the Linux device drivers book (sorry for text-heavy post): The kernel (on the x86 architecture, in the default configuration) splits the 4-GB virtual address space between user-space and the kernel; the same set of mappings is used in both cont...
Why can't it work with 4GB of memory and just map different stuff into the 1GB space available for the kernel as needed? It can, that's what the HIGHMEM config options do for memory that doesn't fit to be mapped directly. But when you need to access an arbitrary location in memory, it's much easier to do that if yo...
Linux Kernel memory management quote
1,389,107,558,000
First, the issue that I'm having is being unable to run VirtualBox on Kali 2.0. I set up a usb live with persistence running Kali 2.0, which at the time had the 4.6.0-kali1-amd64 kernel. I have since updated/upgraded/dist-upgraded etc with all of the recommended sources. As a part of this, the new headers/kernels th...
Due to a bug in either the way my live system was installed or the way live-tools handles the mounted partition, live-update-initramfs does not work in this particular case, as it looks to /lib/live/mount/medium/ as the root of the usb live device, though this was not the mountpoint (and there are 3 partitions needed ...
How to change the boot kernel of a usb live w/ persistent running Kali
1,389,107,558,000
I am monitoring file operations events (VFS). I have a problem with BTRFS filesystem, BTRFS is using subvolumes, All highest hierarchy directories in btrfs has the same inode (256/512). Short story: When I receive file operation event, I receive the path and then resolve it to inode. By resolving I mean: given a pat...
Instead of going to the dentry - inode - superblock - device id. I get the device Id using the getattr(..) on the dentry. My solution is taken from the Suse patch in the subject (after alot of google digging). https://patchwork.kernel.org/patch/2825842/
BTRFS how to get real device Id
1,389,107,558,000
After switching from Debian stable to Debian testing i have a problem to mount my FreeBSD root partition on my system: How to mount ufs file system under Debian testing? I find out what filesystems my Linux kernel supports through this command cat /proc/filesystems : nodev sysfs nodev rootfs nodev ramfs nodev ...
Using a standard debian kernel? Try modprobe ufs as root to load UFS filesystem support.
How to enable Unix file system support on Linux kernel? [duplicate]
1,389,107,558,000
I'd like to modify the security module (Specifically security/IMA) of the linux kernel.(This module has to be compiled into the kernel) I have to use functions from a shared library (an .so file) in this module. but I don't know how to compile it. Is there a way to put the shared library file to the Linux kernel? And ...
You practically cannot do that (linking a shared library into the kernel or some kernel module). The kernel is conceptually a freestanding program (so does not know about low-level standard C functions like malloc or fprintf that your shared library is very likely to use). Kernel modules (*.ko files) are specially bui...
Linking shared library in linux kernel
1,389,107,558,000
Question intended for system administrators. Consider system running a old but working kernel and all the required functionality is available. (Ubuntu 12.04 LTS specifically with kernel 3.2) Then a new version of kernel is released ( Ubuntu 16.04 LTS with kernel 4.4). Above is just an example case. I have been sugge...
This question has a big chance of getting closed due to the answers you will get are going to be mostly opinion based. But here is my 2 cents. Production systems are reliant on stable releases of operating systems. If you install the latest and greatest kernel/patch/update on your system, you don't know what deficienc...
Why should not I update to most recent kernel immediately after release [closed]
1,389,107,558,000
I'm reading about Unix in a book "The design of UNIX operating system". But, in the text middle of process state (e.g wakeup, interrupt), there is term 'raise processor execution level'. What does "raise processor execution level" mean?
"Raise processor execution level" means to temporarily block all interrupts so that the kernel can get some critical (by definition, non-interruptible) task completed. Reference: Operating Systems by I. A. Dhotre I hope you enjoy reading The Design of the UNIX Operating System. I haven't read that one since back when ...
what means 'processor execution level'?
1,389,107,558,000
I would like to enable my wifi card automatically at the startup every time. However, the command below requires sudo. I see Hardware Disabled at the wireless connection which blocks the internet access through wireless connection without the sudo command. There is no permanent solution to this problem, since those...
Your question is stated in a rather chaotic way, but this is what I understand: You're talking about enabling your wireless network adapter using a command that requires root privileges (hence run using sudo). The command you're executing actually removes a module (see man modprobe under the -r option). It was probab...
How to run modprobe for Wi-Fi at login?
1,389,107,558,000
In the linux kernel, there is a section "Library routines" with a snippet shown below: Library routines ---> <M> CRC-CCITT functions <M> CRC ITU-T V.41 functions <M> CRC7 functions <M> CRC32c (Castagnoli, et al) Cyclic Redundancy-Check <M> CRC8 function ... ... I have most of the options compiled in a...
CCITT stands for "Comité Consultatif International Téléphonique et Télégraphique" and ITU for "International Telecommunication Union". These modules have to do with (error correction) for telephone-modem connections. Since even old style high-end modems (to which you would normally communicate via a, real, hardware se...
Library routines in linux kernel
1,389,107,558,000
I am wanting to download EVERY version of the Linux kernel as source code, Debian files, and RPM files. Where can I find a single site where I can download them all at once? If that is not possible, I know I can get the source code for every kernel here (https://www.kernel.org/pub/linux/kernel/), but I need the .deb a...
I'd be surprised if you'd find every version as a .deb and .rpm on a single site. You'll be lucky if you find every version of the .rpms. I'd be very surprised. You can reach back to Fedora Core 1 (FC1) through FC6 here on the Fedora Project Archive. Fedora 7 through 18 (plus the latest) are available on the same site...
Download the Complete Linux Kernel Collection
1,389,107,558,000
I am current in the process of migrating my website(big and complex with mysql backend) from debian server to ubuntu server. The kernel of debian and ubuntu are different. I have some concerned questions : Is it possible to migrate database and website (with etc and home folder) from one server to another if the kern...
Do not copy the binary database files. Instead do a dump and restore the dump. That's the most portable way. Dump: mysqldump -u [username] -p [password] [databasename] > backupfile.sql Restore: mysql -u [username] -p [password] [database_to_restore] < backupfile.sql More detailled information can be found here: Back...
Migrating Data from Debian to ubuntu server
1,389,107,558,000
I'm compiling my own version of the linux kernel and I was wondering if there is any way to do parse a local XML or JSON file.
jsawk will probably do what you need: https://github.com/micha/jsawk Edit: However I found jshon to work much better. Here is an example: curl 'http://twitter.com/users/username.json' | jshon -e "location" Outputs: "new hampshire"
Parse JSON or XML on bootup
1,389,107,558,000
I want to practice with makedumpfile. However, it needs /proc/vmcore which is the memory image of the currently running kernel. Also, reading the man page of makedumpfile, we also need 2 kernels: panicked kernel (crashed kernel) and capture kernel. Does this capture kernel run on the same machine or remotely?
The capture kernel runs on the same host. It runs in memory that the panic'd kernel reserved for the capture kernel to use. The capture kernel is started with the kexec mechanism by the panicing kernel. /proc/vmcore should be provided by the kernel if its setup to export a memory image. If your kernel does not have...
How can I generate /proc/vmcore?
1,389,107,558,000
I have recently compiled linux kernel 3.2. But at time of compiling in make menuconfig, I had disabled sound support. Now, I want to enable it without recompile it. I don't want to use stock kernel or direct kernel image, I always wanted to use compiled kernel.
make menuconfig and enable it as a module. Then, make modules_install, which compiles and installs modules, should do the trick. Though you wil not need to compile whole kernel, you will have to compile modules. At least on Gentoo. You haven't mentioned what distro you are using. May be someone else could provide bett...
how to enable sound support in linux kernel without recompile?
1,389,107,558,000
I can only boot into Ubuntu suddenly if I choose either 6.5.0-14-generic in recovery mode or 6.2.0-39-generic normally. But this setting does not persist so I have to enter GRUB everytime I start the PC. I believe that the automatic update GUI "Actualizations" in the task bar in Kubuntu installed the new Kernel a day ...
The easy way is to remove the buggy kernel: sudo apt remove linux-image-6.5.0-14-generic Or, you can set the working kernel in your grub configuration file. To list the kernel in order: grep -P "menuentry" /boot/grub/grub.cfg | cut -d "'" -f2 Then set the GRUB_DEFAULT=n in /etc/default/grub, 0 is the current and th...
Can only boot into Ubuntu if I choose 6.2.0-39-generic or 6.5.0-14-generic (recovery mode)
1,389,107,558,000
Since the TSS does not store the values of the registers in x86-64, how are those saved when the context switch occurs?
The general-purpose registers are mostly saved on the stack; see PUSH_REGS and struct pt_regs. To find actual uses, look for PUSH_AND_CLEAR_REGS and POP_REGS. The rest of the CPU state is stored in thread_struct. Linux avoids the TSS as much as possible (early 32-bit x86 versions used it, but that changed a long time ...
How is the execution state saved at context switch in x86-64 linux kernel?
1,389,107,558,000
Assuming the Linux kernel doesn't swap out my process's memory pages, can I assume their physical location in RAM will not be changed, or is it possible the kernel will move them around? The reason I'm asking is that I'm considering writing my own memtester from scratch, and I was wondering if it's possible a newly al...
I’m aware of two cases where an allocated page’s physical address can change, and thus where a subsequent allocation can re-use a previously-used physical page: swap-out (as you mention) compaction The former can be prevented in all cases by locking memory with mlock() or mlockall(). For the latter, the vm.compact_u...
Does Linux keep the memory on the same physical location?
1,389,107,558,000
Is it generally safe to manually compile and install a new kernel from kernel.org using: make -j 8 make install make modules_install or might the distribution, e.g. Debian, break, because it assumes that it manages kernel upgrades through apt? Intuitively, everything should continue to work, since the kernel preserv...
Yes, it’s safe; Debian doesn’t require a packaged kernel, and as you say the kernel is backwards-compatible. You only need to make sure your kernel configuration is functional. However, you can build a kernel package from the upstream kernel source, and install the resulting packages instead. Run this in the kernel so...
Is it safe to manually install a new kernel for Debian and other distributions?
1,389,107,558,000
I want to use the return values from statvfs to get the total and free filesystem size. unsigned long f_bsize; /* Filesystem block size */ unsigned long f_frsize; /* Fragment size */ fsblkcnt_t f_blocks; /* Size of fs in f_frsize units */ fsblkcnt_t f_bfree; /* Number of free blocks */ ... Source:...
Fragments of blocks seems to be a filesystem feature in some legacy filesystems (googling suggests UFS and JFS have a use for it). The fragment size seems to indicate the minimum value a fragment is allowed to be and should be between 1 and f_bsize. On filesystems that do not support it, this value should equal f_bsiz...
Using statvfs to get total and free filesystem size
1,389,107,558,000
I'm configuring the Linux kernel and at this point I am not sure what it means. Symmetric multi-processing support This enables support for systems with more than one CPU. If you have a system with only one CPU, say N. If you have a system with more than one CPU, say Y. If you say N here, the kernel will run on uni-...
More than one CPU means that there is more than one microprocessor, (physical chip or a single chip with more than one CPU core). I don't know what type of CPU you have, but if it's a regular, rather recent computer, you can probably say "Yes". You take a look at /proc/cpuinfo to see more data.
Linux-Kernel Config - Symmetric multi-processing support - Does this apply to my CPU?
1,389,107,558,000
Where does qemu pull modules from when using a custom-built kernel (using -kernel)? Will the kernel try to find them in the guest FS or is the whole linux/qemu setup smart enough to realize that modules should be pulled from the custom-built kernel set up on the host?
-kernel only says where to load a kernel from, nothing else. It's like telling the bootloader in real hardware "load this kernel file". Once the guest kernel has booted, it is what makes the decision about where to look for modules (or even whether to look for modules at all). So the modules have to be in the guest fi...
qemu - where are modules pulled from if using -kernel?
1,612,418,083,000
In a call trace we see: WARNING: CPU: 3 PID: 123456 at xxxxxxxx Modules linked in: cmac md4 cifs ccm ipt_MASQUERADE nf_nat_masquerade_ipv4 xt_conntrack ipt_REJECT nf_reject_ipv4 iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack ip6table_filter iptable_filter bridge stp llc cdc_acm i2c_mux_lt...
“Modules linked in” lists all the modules currently loaded, along with their taint flags if any. If modules have been loaded and then unloaded, the last unloaded module is listed too. If any modules are being loaded or unloaded, they are marked with + or - respectively. The list isn’t limited to modules involved in th...
What does 'modules linked in' mean in call trace?
1,612,418,083,000
I started Firefox from by bash window by entering the command "firefox", it started the Firefox browser in the user interface. When I checked the Firefox process by entering "ps" command, I found Firefox process has a controlling terminal attached to it (pts12 / which is evident from above screenshot) and also the f...
Input to X11 applications doesn’t go through a tty device, it’s provided as X11 events. The X11 server receives the input event, determines which application currently has the focus, and translates the input event into the corresponding X11 event. The X11 server provides an abstraction for the hardware in the system. ...
How GUI applications receive keyboard input?
1,612,418,083,000
I have a server running CentOS 7.3.1611, kernel 3.10.0-514. Now when installing kernel-devel, the version in repo is 3.10.0-1160 which differ from kernel version. I know that I can get exact kernel-devel rpm, but the dependency is too complicated. I would like to ask is there any feasible way to install specific kerne...
All the packages that were ever released by CentOS can be found in an archive on vault.centos.org. You can just point yum to the package(s) you want. For example: yum install https://vault.centos.org/7.3.1611/updates/x86_64/Packages/kernel-devel-3.10.0-514.26.2.el7.x86_64.rpm If you need yum to automatically pull in ...
Is there any feasible way to install a kernel-devel version that not in base repo anymore?
1,612,418,083,000
From here: wait_table A hash table of wait queues of processes waiting on a page to be freed. This is of importance to wait_on_page() and unlock_page(). While processes could all wait on one queue, this would cause all waiting processes to race for pages still locked when woken up. A large group of processes contendi...
There is no race condition, the spinlock ensures this. The thundering herd problem is that when something happens, typically a lock being released or an I/O input event completing, lots of processes which have been waiting will resume. One will be choosen and all the rest will typically resume waiting on the lock or I...
What is the "thundering herd" problem and how can a race condition happen even after using spinlocks?
1,612,418,083,000
I need to update the kernel of an old headless server (small machine logging some instruments). Alas I cannot upgrade beyond Debian 8 Jessie. Some Virtualbox modules I need are only available for 3.16.0-11-amd64 and not for 3.16.0-4-amd64: $ cat /lib/modules/3.16.0-4-amd64/modules.dep | grep vbox <NOTHING> $ cat /lib...
By looking at the contents of /boot you can see which bootloader is used and then set it up to boot that certain kernel you need.
Debian 8 is not using the latest kernel
1,612,418,083,000
Fresh install Ubuntu Server 20.04. cat /proc/filesystems shows exfat in the output. Not installed any other packages for exFAT as it should work from kernel. Mounted 2 internal HDDs on in fstab as below #INT-1TB-4K Internal HDD mount to /mnt/INT-1TB-4K UUID=0E7E-6579 /mnt/INT-1TB-4K exfat defaults, permissions 0 0 #I...
exfat behaves just like vfat and since it has no concept of permissions, chown and chmod both won't work. You have to specify mount options such as uid, fmask and dmask, e.g. defaults,noatime,nofail,uid=1000,fmask=0133,dmask=0022 (run id to find out what your ID is).
Native exFAT support in 5.4 kernel - issues?
1,612,418,083,000
Is it possible to modify source binary in Linux if any process spawned from that binary is still running? Will OS allow to perform write operation on that binary?
Try it: cd $(mktemp -d) cp /bin/sleep . ./sleep 120 & echo test > sleep The shell’s redirection operator changes the file in-place, and this fails with a “text file busy” error. It is however possible to replace the file: cp /bin/ls sleep This is how, for example, packages can be updated while the program they conta...
Is it possible to modify source binary in linux if any process spawned from that binary is still running?
1,612,418,083,000
I am trying to make a restriction to procfs like only a certain groups of members can perform read and write actions. kernel document says we can do that by setting hidepid and gid in /etc/fstab. It will restrict the malicious user from making read and write on procfs but I have a doubt whether it is possible for mal...
/proc is the interface between the kernel and userspace for all its contents, and most of those contents aren’t available in any other way (for content under pid directories, outside of that process). So hidepid=2 is effective in hiding information such as a process’ command line and environment from other users. Some...
What is the best way to restrict /proc fs from malicious users (linux)? [closed]
1,612,418,083,000
If we create a listening socket it will return us a descriptor (let say root descriptor) and we are binding this descriptor to a address. Whenever a new client connection is available the root descriptor informs us and we accept that new connection and receive a unique descriptor (let say client descriptor) for each ...
The TCP/IP and UDP/IP protocols know a "session" which is defined by local and remote IP address and port [1]. A TCP/IP package, for example, will contain source and target IP address and port [2]. A server or client (say, Firefox) which has more than one connection open will distinguish at the OSI [3] session layer...
How does the TCP/IP protocol differentiate between clients?
1,612,418,083,000
I am running Fedora 29 on a DELL XPS 15 9570, latest BIOS installed. Since upgrading to kernel 5.0.3 / 5.0.5, my laptop screen stays blank (with occasional white flicker) after the BIOS logo, and it makes a weird high-frequency, "coil-whiny" noise. I can force the system to boot by entering GRUB and picking an older 4...
The problem has been discussed here: https://bugs.archlinux.org/task/61964 It was introduced by an optimization for eDP 1.4+ ("link config fast and narrow") in the 5.x kernel; the patch doesn't work for some panels, including that of the XPS 15, and had to be rolled back. The rollback was merged and should be released...
Fedora 29: screen blank/flickering after upgrade to Kernel 5.x on DELL XPS 15 9570
1,612,418,083,000
I am trying to debug my kernel module. When I run it I get the following kernel warnings, but it seems that there is no informative message like other warnings I've seen. Is it possible to get any useful info out of this? Some more info: The module is called firewall, it diverts tcp packets to a proxy server in user ...
Have you tried following backwards from end of stack trace with addr2line? For example looking at the last line sysenter_do_call+0x12/0x28 It tells us that the offset is 0x12 and the length is 0x28 $ addr2line -e [path-to-kernel-module-with-issue] 0xc15af55f and so on...gdb is another alternative in terms of breaking...
Understanding a dmesg kernel warning message
1,612,418,083,000
I am really struggling to get to the bottom of this one. For some reason cron cannot see a file system I mounted manually. This is a USB drive formatted to ext4 mounted to /backup. For completeness I mounted it while logged into SSH, not directly at a terminal. If I compare typing mount | sort at the commandline (ov...
This sounds like the daemons are running in different mount namespaces, so changes you make in your SSH session aren’t visible in cron or at jobs. Look at mountinfo and ns/mnt inside the various deamons’ /proc/${pid} directories to check which namespaces they’re using and what they can inherit.
What can cause different processes to see different mount points?
1,612,418,083,000
I have updated my server with ubuntu 14.04 to the newest kernel: 3.13.0-141-generic Which is the second release after the disclosure of the spectreMeltdown vulnerability as far as i can tell. But when running the spectre-and-meltdown vulnerability checker: https://github.com/speed47/spectre-meltdown-checker My system...
The best source of information regarding Ubuntu-specific mitigations of Meltdown and Spectre is the dedicated page in their security knowledge base. The information there matches what you’re seeing: your CPU hasn’t been updated to support IBRS/IBPB, so the mitigations for Spectre variant 2 aren’t functional; Meltdown...
Still vulnerable after SpectreMeltdown ubuntu kernel 3.13.0-141-generic update?
1,612,418,083,000
Today I tried to remove the old kernel in Debian Stretch with sudo aptitude purge linux-image-4.9.0-3-amd64 While the procedure went smoothly in most of the servers, and has been going smoothly over several years, this time I got the following error in 2 of my servers: Failed to substitute package name in title: 10 ...
Investigating a workaround, I noticed that /usr/bin/linux-check-removal is a Perl script; according to man: linux-check-removal - check whether removal of a kernel is safe SYNOPSIS. linux-check-removal VERSION DESCRIPTION. linux-check-removal is intended to be called from the prerm maintainer ...
Error deleting older kernel package
1,612,418,083,000
I came across the term "Kernel Memory Patching" in a presentation. I googled it but couldn't find the exact answer somewhere. My understanding tells me that Kernel Memory Patching is somehow adding or increasing the memory size of kernel or the address space it accesses? Can someone please correct me. Or give more inf...
In reverse order because the explanation is a bit easier that way: Loadable kernel module: This refers to a piece of code that can be loaded at runtime by the kernel. Usually these are drivers, but in some cases it may provide extra functionality that has nothing to do with hardware or protocols (for example, add s...
Kernel memory patching
1,612,418,083,000
I read in Tanenbaum's book about operating systems that there are protection rings and ring 0 belongs to the kernel. Is it in general that one may say that "kernel modules handle the I/O and memory management of ring 0" or is "kernel module" specific for linux and not applicable for example for OpenBSD and MULTICS?
The ideas presented by Andrew Tanenbaum are usually not directly applicable to Linux (or any traditional monolithic Unix kernel). The answer to your question is much simpler than you are suggesting: a Linux kernel module is kernel code that has been compiled and linked into a separate file, instead of being linked int...
Are kernel modules specific for linux or a general mechanism?
1,612,418,083,000
Does the GNU Linux kernel downloadable from www.kernel.org comes with all the hardware architecture like arm, amd, ppc etc? In the arch folder, I couldnt find any architecture like amd64 ( the 64 bit intel architecture ) or is it referred as something else. Where can I see the list of architecture supported by the ke...
There’s a single kernel tree containing all the code for all the architectures it supports. The list of architectures supported by the Linux kernel (which isn’t a GNU project) is given by the list of directories in arch. Currently: alpha: Alpha arc: ARC arm: 32-bit ARM arm64: 64-bit ARM (Aarch64) avr32: 32-bit AVR bl...
GNU Linux kernel architecture
1,612,418,083,000
When linux kernel written in C so is it possible to write in java programming language, microkernel and monolithic kernel ? Concern developing java os.
Unlike C programs which get compiled in machine language, Java programs rely on a Java runtime engine which in turn relies on an existing system (including the kernel). Even if it was conceptually possible to organize everything to get Java code to be run by the kernel, it would be inefficient and would probably requi...
Is it possible write linux kernel in Java Programming Language? [closed]
1,612,418,083,000
I have a driver I maintain, I need to compile it with Linux headers 4.1.21 but I get compile errors for aio_read, aio_write, they are missing from struct file_operations, I assume they were replaced. How do i find out what the replacements are? fs.h in kernel 4.0 has: struct file_operations { struct module *owner; l...
If you are doing kernel work you should have a subscription to Linux Weekly News. A very quick search turned up this article which mentions that aio_read and aio_write are being handled by the read_iter and write_iter. You can also find a brief statement to that effect in Documentation/filesystems/porting.
file operations aio_read changed in kernel 4.1
1,612,418,083,000
I have a Gentoo installation. For compiling the kernel I used the configuration from Ubuntu 14.04 kernel. I find it hard to understand why the sizes of the modules libraries are so different: In Ubuntu oz123@ubuntu $ du -sh /lib/modules/4.2.0-36-generic/ 202M /lib/modules/4.2.0-36-generic/ In Gentoo oz123@gentoo ...
Since you have build the Gentoo modules yourself, you most probably forgot to remove debug info from them. Try strip --strip-unneeded snd-ua101.ko and see if it makes a difference. Next time you rebuild modules for your system, strip all modules using make INSTALL_MOD_STRIP=1 modules_install
Why is /lib/modules so huge under my gentoo, compared to Ubuntu
1,612,418,083,000
I bought a Dell XPS 13 2016 with a i7-6500u (SkyLake). This notebook is not officially linux-supported but I found a few articles on how to get it up and running. But I cannot find an answer to this question. Current ArchLinux has the Linux Kernel 4.2.5 but Skylake-Support was added with Kernel 4.3 (article). How is i...
I bought MSI gs40 that has skylake 67000hq with intel HD 530 inside. I was able to run even 1 year old kernel from liveusb and you should be. Everything except X should run without any issues since as was mentioned Skylake is x8086 and kernel supports it. Another thing that intel integrated graphics are not properly s...
How can Linux 4.2.5 boot on a Skylake CPU when they are supported from 4.3+
1,612,418,083,000
While scanning a filesystem for changes with a shellscript, I forgot to exclude /dev, so core got tested too. Strangely enough, which ever way I test it, it is not consistent for a type: $ if [ -f ./core ] ; then echo file ; else echo something else ; fi file $ ls -al core lrwxrwxrwx 1 root root 11 Sep 29 15:40 core -...
First, /dev/core is a symbolic link to the regular file /proc/kcore. So both test -h /dev/core and test -f /dev/core are true: -h because it's a symbolic link, -f because the target of the symbolic link is a regular file. Now for what /proc/kcore is. It's a regular file, but it's a bit different from the regular files...
What type of file is /dev/core or /proc/kcore?
1,612,418,083,000
This is a question that I had in my mind long ago but just now resurfaced back after reading this article. May I know why CPU and memory do not require driver? What other hardware components do not require driver?
A driver is a translation software that sits between the hardware and the Operating System and perform multiple tasks as : control of I/O operations, initialization and configuration of the hardware device. Your Operating System doesn't need a driver for the CPU because it has been compiled to work with a determined ...
What hardware components do not require driver and why
1,612,418,083,000
I've faced the problem installing Gentoo: after the installation is seems to be completed and LiveCD is extracted, network becomes unreachable: gentoo~ # ping 8.8.8.8 connect: Network is unreachable ifconfig shows only loopback device lo and no actual network devices (there should be also ethernet enp3s0 and wireless...
Gentoo/Linux LiveCD Ethernet won't connect: troubleshooting steps: Re-Confirm that you have the latest .iso or Bootable USB image from the official boot media website. Motherboard/Ethernet Manufacturers like Intel introduce breaking updates and Linux developers have to fix it with software updates. Re-Confirm that y...
Why Gentoo detects no network devices? [closed]
1,612,418,083,000
Wondering why ARM based devices like Raspberry Pi, Android phones, Routers etc. are not shipped with latest Linux kernel ? Is it simply due to lack of proprietary device driver support ? Like lack of opensource drivers for GPU,DSP etc ? Or they have some limitation to run latest kernel version ?
The Raspberry Pi does not really ship with any kernel at all; it does not include software, although you can buy it from some third party retailers with a pre-formatted SD card (and you can buy such a card separately). There are a number of binary GNU/Linux distributions specifically for the A/B/+ pi (since the Pi 2 i...
Why ARM devices are not shipped with latest Linux kernel?
1,612,418,083,000
I had a Slack 13.1 machine with 2.6.36 kernel. Then, I updated the kernel to 3.12.1. This machine has connected: a bootable disk with three partions (/dev/sda1 --> Linux OS files..., /dev/sda2 --> data, /dev/sda3 --> more data), a "dummy" SSD just to store things (/dev/sdb1) and USB ports. The fact is that whenever I ...
The problem is that the disk names are created sequentially; the first disk to be detected by the kernel becomes /dev/sda, the second is /dev/sdb etc. The solution to your problem would be to disable use (i.e. detection) of USB disks (including USB drives) until after your system has completed booting. This could be d...
Boot process - Dev sdX name changes
1,612,418,083,000
I've been looking on Google for 4 hours and I can't find a solution to my problem. I have a computer running CentOS 5.10 using Kernel 2.6.18-371.9.1.el5 and I would like to upgrade my kernel to 2.6.32 in order to run lxc (it need at least kernel 2.6.29). I've been following this HowTo and tried to install the 2.6.32 s...
Have you looked at ELRepo? They have kernels from the 3.2 branch for EL5 (and therefore CentOS5) which should run lxc. It might save you having to compile! Have a look here.
Upgrading kernel 2.6.18 to 2.6.32 on CentOS 5.10
1,612,418,083,000
When I was reading a book(Linux kernel programming), I found an interesting/confusing paragraph about mm_segment_t addr_limit(one of the member in struct_task) as shown below: mm_segment_t addr_limit; Unlike the older kernels, since 2.4 tasks (threads) also can be within the kernel. These can access a larger addres...
The phrase "within the kernel" is likely referring to kernel threads which are used by the kernel itself for work that can be preformed asynchronously. You can see examples of these threads in your process tree: # ps aux | grep '\[.*\]$' | head root 2 0.0 0.0 0 0 ? S May05 0:00 [kthread...
Linux kernel: task vs thread
1,612,418,083,000
I know that in general this means that I have a "bad disk". But I'm after a more specific reason for why I am getting these messages from the kernel: sd 15:0:0:0: [sda] Attached SCSI disk sd 15:0:0:0: [sda] Unhandled sense code sd 15:0:0:0: [sda] Result: hostbyte=0x10 driverbyte=0x08 sd 15:0:0:0: [sda] Sense Key : ...
From the SCSI2-Draft standard (the only one I have that isn't a PDF): Table D.1 (continued) +=============================================================================+ | D - DIRECT ACCESS DEVICE | | . .W - WRITE ONCE READ MULTIPLE DEVICE ...
What does this key code qualifier mean?
1,612,418,083,000
I got this errors in syslog. Any idea what does it mean? The system is running on Ubuntu 12.04, kernel: 3.8.0-35-generic #52~precise1 It looks to me like failure when trying to write to disk... [151850.317166] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [151850.318428] ffff8803640f5be8...
The message appears in case that certain process (in this case sftp-server) doesn't get CPU for 120s (default limit). This could be caused by high load on the system. Generally this could be caused waiting on any resource, most likely candidates are CPU, disk and network. When debugging such problems you can test writ...
kernel: "echo 0 > /proc/sys/kernel/hung_task_timeout_secs"
1,612,418,083,000
I'm trying to boot a Linux system stored in a USB drive that I got by following the Linux from Scratch manual. I finished all but the booting part, the problem is that when the kernel tries to to mount the file system the USB drive is not part of the options, only the hard drive. I suppose USB and other storage syste...
The way I would solve this problem is by having what is called an "initrd". I don't know how familiar you became with initrd when doing Linux from scratch, but they have a page about initrd here: http://www.linuxfromscratch.org/blfs/view/svn/postlfs/initramfs.html What initrd does is act as a small root filesystem th...
Linux Booting with USB File System [closed]
1,612,418,083,000
In the Linux kernel configuration, a fake LR-WPAN driver can be enabled and added to the kernel that will be compiled. Why would someone want a fake LR-WPAN driver? I assume it would be for debugging, but I do not want to only assume. The documentation and Google do not appear to have an answer.
From the description in the kernel configuration file (Kconfig in the driver directory): tristate "Fake LR-WPAN driver with several interconnected devices" depends on IEEE802154_DRIVERS ---help--- Say Y here to enable the fake driver that serves as an example of HardMAC device driver. This driver allows testing, deb...
Why have a fake LR-WPAN driver?
1,612,418,083,000
I've downloaded a kernel binary which I am using now. In order to use the watchdog on my system I must recompile the kernel with watchdog support. Is it possible to obtain the current kernel configuration of the binary? The binary is obtained from this page. I've used version R5.
If the kernel config is not distributed in /boot/config-* or available at /proc/config.gz, it is nearly impossible to get it. As Alex wrote, they could also have patched the kernel and included proprietary drivers. But because the kernel is under GPLv2, the owner of the site where you download the binaries, have to gi...
Find or create kernel configuration of kernel binary
1,612,418,083,000
First of all I am running a CentOS 6.4 installation. My computer is a laptop and I am trying to install the drivers for my ethernet card, because this week end I lost my ability to connect to the Internet. So I downloaded the driver : jmebp-1.0.8.5 I installed gcc, kernel-devel and since it wasn't working I finally in...
First Issue You're missing the kernel-headers package. You need these to compile kernel modules. yum install kernel-headers Assuming this where you downloaded the drivers from. When I unpacked them on a CentOS 6.4 system I got the following error: $ cd jmebp-1.0.8.5 $ ls CHANGELOG jme.c jme.h Makefile scripts $ m...
Problem compiling a driver : "No rule to make target"
1,612,418,083,000
I'm looking for a way to learn about and understand this technique. Here's what I'm talking about: Slax boots, {does stuff, like copy itself to RAM}, then transitions control to the kernel/file system it just made SYSLINUX boots off a FAT32/NTFS system, {does stuff}, then boots into a kernel ISOLINUX boots off a CD/D...
I'm guessing this is how: http://linux.die.net/man/8/kexec kexec(8) - Linux man page Name kexec - directly boot into a new kernel Synopsis /sbin/kexec [-v (--version)] [-f (--force)] [-x (--no-ifdown)] [-l (--load)] [-p (--load-panic)] [-u (--unload)] [-e (--exec)] [-t (--type)] [--mem-min=addr] [--mem-max=addr] Desc...
How does kernel swapping / INT 13h interrupts work?
1,612,418,083,000
I have an old kernel ( 2.4.37.9 ) and I want to override or substitute the root=XXXXX parameter to send to the kernel inside the initrd script. I already made some attempt to do that but it seems that at the end of initrd grub alway pass to kernel the root parameter define inside the menu.lst file, while I'm tryng t...
This is not the more polite solution to this problem, but it works and mybe should be helpfull to some other so I brifly describe here how I solved my problem to have a DOM capable to change it boot device automatically. Inside the linuxrc, the script of initrd, I detect wich device is available and based on that resu...
Kernel/grub : how override root parameter inside initrd script
1,358,808,462,000
I've attempted to install drivers for an FPGA device, but require that I remove the usbserial module. This happens to be impossible because usbserial is a built-in module. It was suggested that I compile a new kernel to make usbserial dynamically loadable and unloadable. I'm now trying to compile a custom kernel w/ Fe...
Try using make nconfig or make menuconfig which presents you with interactive text UI. Both have search facility for both the kernel CONFIG_* options (those which are placed in .config which governs the build) and strings within the currently selected option menu. IMHO both of these TUIs are more usable than the GUI. ...
Compile Linux Kernel w/ Dynamically (Un)loadable usbserial Module
1,358,808,462,000
Kernel Version 3.3.4-5.fc17.x86_64 CPU info: sashan@dhcp-au-122 ~ $ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 42 model name : Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz stepping : 7 microcode : 0x28 cpu MHz : 2793.577 cache size : 4096 KB physical id : 0 sib...
My grub boot config had acpi=off in the kernel boot parameter list. Changed this to acpi=on. I originally had to turn acpi off when using the live cd to install this version of Linux because it wouldn't boot on this laptop from the default live cd kernel boot parameter list.
Kernel not detecting multicore cpu
1,358,808,462,000
From here: http://www.xenomai.org/documentation/xenomai-2.6/TROUBLESHOOTING Q: Which CONFIG_* items are latency killers, and should be avoided ? ... APM: The APM model assigns power management control to the BIOS, and BIOS code is never written with RT-latency in mind. If configured, APM routines are invoked...
You can find this option yourself: Press / in the menu menuconfig interface , and put CONFIG_APM there , if you find anything , it's supported I can only give you output from 3.3.7 version: But anyway , you could edit the .config file yourself , and append CONFIG_APM=y , then redo make menuconfig ,
Where is CONFIG_APM in kernel - 2.6.38.8
1,358,808,462,000
I need to install another kernel (2.6.34) into my fedora machine (x86) and i need to show the old and new boot up options in the boot menu (both new and old kernel) I have downloaded the new kernel and i need to compile it and need to build it. can you explain me the steps for doing that? I got the correct steps from...
If you just need any 2.6.34-kernel, you might head over to koji and try to find a precompiled one for you version of fedora. You can install it as root after downloading all required rpms with yum localinstall kernel-*.rpm and it will automatically appear in Grub. If you need to modify the kernel, it is best to also s...
Installing new kernel (by commandline) as side of old kernel and effective configuration of ' menuconfig'
1,358,808,462,000
ip addr show output from within a Kubernetes pod root@customer-fd99fb7dc-82hrr:/app# ip -c addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft...
qlen is the interface parameter set with ip link set eth0 txqueuelen 1000 or ifconfig eth0 txqueuelen 1000 (see ifconfig(8)) In the kernel it is called dev->tx_queue_len and defaults to DEFAULT_TX_QUEUE_LEN = 1000. This is what ip link ls shows. When a queueing discipline is attached to a device it takes the the devic...
What does qlen 1000 mean for a noqueue qdisc
1,358,808,462,000
On the RHEL 9.3 I have renamed the logical volume (LV) /dev/lvm01/root to /dev/lvm01/root.vol. I did everything to make the new name correctly recognized: changed /etc/fstab entry reloaded systemd configuration remounted / And I also modified the /etc/default/grub entry: GRUB_CMDLINE_LINUX="root=/dev/mapper/lvm01-ro...
Well, the temporary solution seemed to be # grub2-mkconfig --update-bls-cmdline -o /boot/grub2/grub.cfg But it only fixed the actual state. The update of kernel still used the previous LV name. The only solution which helped also for kernel updates seems to be grubby: # grubby --update-kernel=ALL --args="root=/dev/ma...
The grub2-mkconfig does not propagate renamed root logical volume on RHEL 9
1,358,808,462,000
Somewhere along the line, the nested kvm kernel module became enabled by default. As hard as it may be to believe in this day and age, not everyone in the world had a need to run kvms on every host that gets built. Is there any performance cost to leaving this default enabled even if you have zero intention to deploy ...
Or, is this just case of "if it ain't broke, don't fix it"? I'd go with that :) There's no cost to the module being there. There might be a cost to the CPU having the feature enabled (which, on some older x86_64 you could disable in the UEFI setup, not sure this is still the case on modern machines), namely that of ...
Is there any benefit in disabling kvm module on bare metal that won't ever run kvm guests?
1,358,808,462,000
Why the check mechanism is changed? Because of the MTRR code upgrade? Or was that a bug in checking before? https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/x86/mm/pgtable.c?h=v6.5.7&id=12f0dd8df14285a5604f35ed3af8b8c33e8fd97f x86/mm: Only check uniform after calling mtrr_type_lookup() Toda...
The code was changed because the semantics of uniform weren’t correct. This was discovered in an earlier iteration of the patchset; Juergen Gross asked The problem arises in case a large mapping is spanning multiple MTRRs, even if they define the same caching type (uniform is set to 0 in this case). So the basic ques...
Only check uniform after calling mtrr_type_lookup()
1,358,808,462,000
I just got the following error when compiling linux-5.14.2.tar.gz and patch-5.14.2-rt21.patch on CONFIG_DEBUG_INFO_BTF=y: AS arch/x86/lib/iomap_copy_64.o arch/x86/lib/iomap_copy_64.S: Assembler messages: arch/x86/lib/iomap_copy_64.S:13: 警告:found `movsd'; assuming `movsl' was meant AR ar...
I resolved this issue by changing the kernel version. linux-6.4.tar.gz and patch-6.4.6-rt8.patch.
failed: load btf from vmlinux: invalid argument make on CONFIG_DEBUG_INFO_BTF=y
1,358,808,462,000
I made a bit of research on the matter and also asked ChatGPT, but there doesn't seem to be a way to measure full boot time of an alpine distribution with OpenRC. Using dmesg, I can see the last message [ 0.689037] Run /sbin/init as init process But I want to know how much time it took to "complete" the init proces...
First, install coreutils in order to get millisecond precision in alpine. apk add coreutils Then, we will create two services: In /etc/init.d/boot-start #!/sbin/openrc-run description="Boot Start Service" start() { ebegin "Starting boot-start" date +%s%3N > /var/boot-time.log eend $? } And in /etc/init...
How to know the boot time (kernel + init) in Alpine using openRC?
1,358,808,462,000
We have a Centos 5.8 system that was experiencing CMOS battery errors, which we resolved by replacing the battery. However, after replacing the battery, the system displays a "kernel panic" error message every time it boots up. What steps can we take to resolve this issue, and are there any additional details that wo...
The messages No volume groups found mount: could not find filesystem '/dev/root' all hint to that the kernel can't find the disk containing the root filesystem. While the disk can be accessed by the BIOS and the bootloader using the BIOS, it seems like it is inaccessible using the Linux drivers built in the kernel...
Kernel Panic after replacing CMOS battery
1,358,808,462,000
After upgrading the linux-kernel on a Debian testing System: Operating System: Debian GNU/Linux 12 (bookworm) Kernel: Linux 6.1.0-7-amd64 Architecture: x86-64 Hardware Vendor: TOSHIBA Hardware Model: PORTEGE R30-A Firmware Version: Version 4.20 GNOME Shell: 43.4 I get the following lines print...
Note that these are only “possibly missing”, and in fact your laptop doesn’t need them and there’s no benefit in installing them for that specific model (which has an Intel HD Graphics 4600 integrated GPU, which doesn’t use host-provided firmware). These firmware files are provided by firmware-misc-nonfree. To install...
Debian GNU/Linux 12 (bookworm) - Possible missing firmware (*.huc*; *.guc*; *.dmc* for module i915)
1,358,808,462,000
I've recently bought a Lenovo IdeaPad 5 14ABA7 (Type 82SE) with a AMD Ryzen 5 5625U processor and Integrated AMD Radeon Graphics. The laptop comes without any OS and I installed Debian 11 on it (current kernel: 5.10.0-19-amd64). Unfortunately there is no specific documentation for this hardware. The installation seeme...
I have finally found a solution, thanks also to the suggestion of Aubs. I post that here in case it's of help for other people with a similar problem. I have tried to update to Kernel 6.0 via backport as proposed by Aubs and it almost solved all the problems! This means: suspension, screen brightness, animation and ba...
Several problems installing Debian on Lenovo IdeaPad 5 (AMD Ryzen 5 and AMD Radeon)
1,358,808,462,000
When I plug in USB disk, I get a message like this: kernel: usb 2-10.2: new SuperSpeed USB device number 5 using xhci_hcd kernel: usb-storage 2-10.2:1.0: USB Mass Storage device detected kernel: scsi 10:0:0:0: Direct-Access SanDisk Ultra 1.00 PQ: 0 ANSI: 6 kernel: sd 10:0:0:0: [sdf] 30031872 512-byte l...
This does not satisfy as an answer, yet I came across your question and here is my observation. Below outputs are taken from journalctl -fa Following this askubuntu topic I found out the lines outputting [sdb] are actually due to eject command or some equivelant of it. Output of eject /dev/sdb: Sep 05 14:30:54 knight ...
kernel: USB disconnect message
1,358,808,462,000
ERROR: type should be string, got "\nhttps://github.com/torvalds/linux/blob/bf272460d744112bacd4c4d562592decbf0edf64/arch/x86/kernel/cpu/mce/core.c#L1543\n if ((m.cs & 3) == 3) {\n /* If this triggers there is no way to recover. Die hard. */\n BUG_ON(!on_thread_stack() || !user_mode(regs));\n\nas above, what is die hard? what is die soft?\nWill the rest of the code continues running after BUG_ON() execution?\n"
The "die hard" means killing the thread. As opposed to letting it carry on running, possibly by returning a failure result, that calling code can then process to exit/continue gracefully. From the BUG FAQ that @don-aman referred to, BUG_ON( condition ); is the same as if ( condition ) BUG(); So if the...
What is die hard in linux? is there a die soft?
1,358,808,462,000
After changing a disk size in VMware (for example increasing it by 10 more GB), the next step is to rescan it in Linux so that kernel identifies this size change. For this we use this command: echo 1>/sys/class/block/sda/device/rescan In our scripts, we rescan every couple of minutes from a cron job, in order to veri...
The way to identify that a block device has been resized is to rescan it. That’s it. There’s no need to find another way of rescanning the block device in order to decide whether to rescan it. In a virtualised environment it should be safe to run this every two minutes; there will be a very slight performance hit when...
On Linux, is it possible to know if disk size was changed without rescanning the disk?
1,358,808,462,000
I'm trying to recompile the kernel (following the official Arch Linux guide: https://wiki.archlinux.org/title/Kernel/Traditional_compilation) but every time I get compilation errors: In file included from help.c:12: In function ‘xrealloc’, inlined from ‘add_cmdname’ at help.c:24:2: subcmd-util.h:56:23: error: poin...
First of all, your make is not "crashing", it's exiting due to GCC errors. GCC 12.1 is ill-advised to compile certain kernels because it enables new stricter checks in terms of code [quality] which means that various -Werror options ("treat warnings as errors") could result in errors which were not present in earlier ...
Linux kernel 5.15.54 compilation errors with GCC 12.1
1,358,808,462,000
I'm currently learning about terminals, pseudo-terminals, etc. and I'm curious - today we all use the pseudo-terminals such as xterm or gnome-terminal that are part of the Linux GUI, and less often the virtual consoles which are part of the kernel. In this area I pretty much know how things work, what happens when and...
On the host side you need to run something which will listen on the serial port for a connection then hand off to /bin/login when a connection is negotiated. That something is typically a program named getty. On the device where the screen and the keyboard are you need some sort of terminal emulator. Minicom has been ...
Open a terminal from an external device?
1,358,808,462,000
I'm attempting to build the Linux Kernel (version 5.16). I know that there's a compile-time option to randomize various structure fields (indicated by macros like randomized_struct_fields_start). However, I'm looking through make menuconfig and I can't find the right option.
The options you need to enable are in “General architecture-dependent options”, but they depend on GCC plugins. For the latter to work, $(gcc -print-file-name=plugin)/include/plugin-version.h must exist; on Debian for example, that means you need to install gcc-10-plugin-dev. Once that’s done, enable “GCC plugins”, t...
Build Linux Kernel with randomized struct fields
1,358,808,462,000
my goal is to make my kernel-headers to have the same version as my kernel and kernel-devel. Currently I have: $ sudo yum install kernel-headers Last metadata expiration check: 1:55:19 ago ... Package kernel-headers-5.15.4-200.fc35.x86_64 is already installed. Dependencies resolved. Nothing to do. Complete! $ yum --s...
According to an answer to a similar question, this package isn't released with every version. Yum doesn't omit any packages here. I'd recommend just trying the devel, as recommended in the first linked forum.
Cannot install any specifc version of `kernel-headers` on Fedora
1,358,808,462,000
I installed the newer 5.15.0 kernel onto my Linux Mint 19.3 (Ubuntu 18.04) by https://github.com/pimlie/ubuntu-mainline-kernel.sh . All worked fine, but not for kernel headers which gave me an installation error due to the expected LIBC version that must be >= 2.34, instead of Ubuntu 18.04 that is shipped with the 2.2...
Issue solved compiling the new kernel on my own.
Install kernel 5.15.0 on Ubuntu 18.04
1,358,808,462,000
After downloading ubuntu source from kernel.ubuntu.com, I tried to set configuration for arm64. When I do command below, LANG=C fakeroot debian/rules ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- editconfigs and select to change config for arm64, the config menu appears and below is the screen when I searched for STACK...
Options that contain HAVE_ are generally things that depend on your build environment, not options per se. You can see this one being defined in arch/arm64/Kconfig: config CC_HAVE_STACKPROTECTOR_SYSREG def_bool $(cc-option,-mstack-protector-guard=sysreg -mstack-protector-guard-reg=sp_el0 -mstack-protector-guar...
where can I find CC_HAVE_STACKPROTECTOR_SYSREG
1,358,808,462,000
TL;DR: The kernel module sht3x (https://www.kernel.org/doc/html/latest/hwmon/sht3x.html) seems to be missing in a standard debian installation. I need it in order to read an external sensor. How can I install this kernel module? The whole story I try to connect an SHT31 temperature/humidity sensor to my Debian noteboo...
I’m assuming you’re running Debian 10, but the instructions for later versions are similar. The module you’re after is supported by the kernel version used in Debian 10, but it is not enabled; let’s fix that. Install the kernel source for the default version in your release: sudo apt install linux-source Extract it...
hwmon: add missing kernel module
1,358,808,462,000
I have been testing binfmt_misc feature of Linux on Debian 10, and have found that setting the flags to "OC", to use the credentials of the binary instead of interpreter, causes execution to fail silently. In the POC below, /tmp/test.sh is the interpreter, while qux.go is the binary. Why is /tmp/test.sh executed succe...
You’re being tripped up by two features. The first is that, when exec fails, the shell will look at the contents of the file you’re attempting to run, and if it looks like a shell script, it will interpret it itself. An empty file looks like a shell script. You can see this by running strace -f ./qux.go, which shows t...
Why don't binfmt_misc with flags "OC", when it works without any flags?
1,358,808,462,000
I've been already made a bootable Linux-based OS using the kernel, busybox only, and testing it in the QEMU emulator is successful. The next step I need is to install dpkg and APT (Debian package manager) on my custom Linux. How can I do that? Just install the Debian Package manager source code and compile and then p...
Before I continue let me disclaim: If your professor is using apt, then she is using a debian-based system. I recommend using the same distro instead of your own "from-scratch" system. If you and using a from-scratch system because you want a custom kernel, then you can install that kernel a debian-based system. I...
How do install the Debian package manager (dpk and apt) in my custom Linux distribution? [closed]
1,358,808,462,000
A few months ago I installed Debian 10 on my laptop, I have already managed to use it regularly for my daily activities, so I am starting to customize my settings. And started by validating the drivers that are installed for each component of my laptop. I have a Dell Inspiron 15-3567 laptop According to the details of...
I believe the 'Host Bridge' that lspci is referring to is the PCI host bridge that connects the CPU to the PCI bus. I have a 3rd generation Core i5 and my host bridge description says: 00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller (rev 09) I think what it means is that ...
How to update the driver used by the Debian Linux kernel for my processor?
1,358,808,462,000
Earlier today I was upgrading my computer from Ubuntu 19.04 to 19.10. The update temporarily broke my computer, booting into GRUB safe mode. With the accepted answer from grub error: you need to load kernel first I was able to load the kernel, specifically the following snippet: insmod linux linux /vmlinuz root=/dev/s...
I solved the problem using Freddy's comments, specifically sudo grub-install /dev/sda and then sudo update-grub.
Ubuntu 19.10 boots into GRUB and I have to manually load the kernel. How do I have it load automatically?
1,358,808,462,000
I know that the Linux kernel keeps track of the status of each physical page frame with the help of a C structure struct page. The structures for all page frames form an array mem_map[]of type struct page so that you can easily retrieve the structure for a specific page frame by using the page frame number as the inde...
There are three different physical memory models used by the Linux kernel: the flat model which you describe, the discontiguous memory model, and the sparse memory model. Most (if not all) 64-bit architectures supported by Linux use the latter by default. It relies on memory sections, and a virtually allocated memory ...
How does the Linux kernel initialize the mem_map array on 64 bit systems?
1,358,808,462,000
I need to secure erase SSD disk with hdparm on my server: hdparm --user-master u --security-erase NULL /dev/sda but the disk is currently "frozen", as reported by hdparm: hdparm -I /dev/sda | grep frozen All instructions suggest I should put my server to sleep to unfreeze. But my kernel does not have suspend compile...
The problem could well be that your BIOS freezes the disk when booting, that's why suspend/resume helps because it power cycles the drive without the BIOS getting its hands on it again (see this convo/comment over at the Ubuntu Forums). An alternative to suspending/resuming would be (if your hardware and BIOS allow it...
unfreeze SSD disk when kernel does not support "suspend"
1,358,808,462,000
I am working on custom made embedded board. Its currently running 3.10 kernel I am trying to upgrade from 3.10 to 4.19. So based on the kernel config options in 3.10, I am enabling/ disabling default kernel options in 4.19. While doing that, I must have messed up something as I am getting this: [ 0.000000] Memory:...
The values are there, they're just not printed. Linux has updated the print functions to not expose kernel addresses. See the "Plain Pointers" section in the kernel printk documentation: The kernel will print (ptrval) until it gathers enough entropy. This can be disabled with the debug_boot_weak_hash kernel boot p...
Linux kernel 4.19.82 - Virtual Kernel Memory Layout - .text, .init, .data, .bss - unable to set the addresses
1,358,808,462,000
I am reading "Linux Kernel Development" by Robert Love and he wrote that the system call executes in process context and is capable of sleeping. The current pointer will refer to the current task, which is the process that issued the system call. What I don't understand is if a system call can sleep, how does executi...
The key part is this: user processes cannot execute in kernel space This is incorrect. When Robert Love writes that the system call executes in process context, basically it means that the process runs in kernel mode to run the system call. When the kernel is handling a system call, it’s still running in a process, ...
If the kernel can sleep when handling a system call, how does execution return to the system call?
1,358,808,462,000
I have a robot on local server that has the task of creating rules a number of times per day on remote server.The purpose of the robot is to calculate the traffic consumed by each port. Access to the remote server is via SSH and the robot is written in Python. The operating system of both servers is Ubuntu. The rules ...
The fact that running firewall-cmd --reload removes the manually added rules indicates your system is running firewalld. It is a management system for IPTables firewall (and its future replacement nftables). Since your robot is manipulating IPTables directly instead of telling firewalld what it wants done, firewalld ...
Why the rules I create in the iptables OUTPUT chain are deleted after a while?
1,358,808,462,000
I'm following this answer, trying to generate some major page faults with mmap: #include <fcntl.h> #include <stdio.h> #include <sys/mman.h> #include <sys/stat.h> int main(int argc, char ** argv) { int fd = open(argv[1], O_RDONLY); struct stat stats; fstat(fd, &stats); posix_fadvise(fd, 0, stats.st_size, POSI...
Yes, the kernel does readahead by default (what you called prefetching), see https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/mm/filemap.c?h=v5.5#n2476 You can disable readahead on this memory region by calling posix_madvise() after mmap() with the POSIX_MADV_RANDOM advice.
Weird major page fault number when reading sequentially / randomly in mmap region
1,358,808,462,000
I have built the linux distro Boot2Qt from source with the yocto tools for the board Colibri iMX6ULL which has the integrated wifi chip Marvell W8997-M1216. I installed the whole linux firmware-stack and i think also the correct kernel modules for the wifi chip. There is no mlan interface showing up. What exactly crea...
I managed to find the correct kernel modules and its working now. Here the complete process: Add the following lines to your local.conf: BB_DANGLINGAPPENDS_WARNONLY ?= "true" MACHINE ?= "colibri-imx6ull" DISTRO_FEATURES_append = " wifi packagegroup-base-wifi dhcp-client" // add wifi tools like iw and a dhcp client ...
Yocto Boot2Qt Build for Colibri iMX6ULL no wifi interface
1,358,808,462,000
Is it possible to cause kernel panic by removing a device driver and then making a system call that uses that driver so that kernel goes in panic?
It is possible when driver is not properly removed and application tried to use. If driver is removed properly kernel will give error like driver not found but never crash(In 99.99% cases until it hit any bug).
How to cause kernel panic by deleting a device driver (module)?
1,358,808,462,000
few words about shared memory Shared memory allows processes to access common structures and data by placing them in shared memory segments. It is the fastest form of inter-process communication available since no kernel involvement occurs when data is passed between the processes. In fact, data does not need to be co...
The default value for shmmax is #define SHMMAX (ULONG_MAX - (1UL << 24)) This is an upper bound, chosen to be as large as possible while limiting the risk of overflow: SHMMNI, SHMMAX and SHMALL are default upper limits which can be modified by sysctl. The SHMMAX and SHMALL values have been chosen to be as large po...
SHMMAX + how effected kernel parameter that not set correctly by mistake
1,358,808,462,000
I need a more up to date kernel than what even buster ships with (5.1.x to be precise) due to the hardware I'm using. Building that kernel is nor problem whatsoever 8building it with make deb-pkg) and even when I install the kernel package on the live system it works just fine. Also when I modify the ISO and add that ...
The failing check is here: you need to have -amd64 in your package name (in a similar fashion to linux-image-5.0.0-trunk-amd64). More accurately, your package name has to end with -amd64, or contain -amd64-. One way to do this is to set LOCALVERSION, in the “General Setup” section of the kernel configuration.
Custom built kernel supposedly not usable on amd64 during preseeded installation
1,358,808,462,000
I have an issue on my Debian computer with Intel Stick. Link to screenshot => I have extra character in console tty like ^[ This issue is only with supperior 4.11.12 kernel Debian kernel and 4.11.12 kernel is ok I dont know why
This is not your TTY settings, and the reset command (which you could not even execute anyway, as you have not logged in) will gain you nothing. Indeed, in most modern Linux operating systems the terminal has just been reset before running the login program (by dint of systemd's TTYReset=yes setting or otherwise), an...
Keyboard issue console terminal
1,358,808,462,000
I have a kernel module with netfilter hooks at different points in the packet route, and the hooks use shared resources. In addition, the module has a char device that may be written to, that also affects these resources. I am not sure if I need to use locks when different handlers access these resources. I read that ...
Depending on what you've written and what data structures it uses, it's hard to say, but: I read that interrupts can't sleep, does that mean I am guaranteed that my handlers (hooks and read handlers) will be executed one after the other, or do I need to use locks to prevent simultaneous access to the same resources f...
Resource locking in interrupts
1,358,808,462,000
I use various Linux Distros, mostly Debian-based, usually all default (I change nothing in the kernel/shell or internal-utilities (utilities that come with the distro). I usually install Apache, MySQL and PHP on these systems and doesn't change there anything either. I never did a kernel upgrade to any system as I don...
With most modern Linux distros, the kernel is distributed as a package, just like any other piece of software/library. Therefore, with Ansible as the example, you can have a task such as: - name: Ensure that latest kernel is installed apt: name: linux-image-amd64 state: latest update_cache: yes notify:...
Can kernel upgrades be done with configuration management (CM) tools for above-OS software?
1,545,111,506,000
Reading one of Stephen's excellent replies, When the operating system shuts down, processes are shut down using SIGTERM and SIGKILL, but those signals don’t come from the kernel (or not directly — calling kill() with a pid of 0 or a negative pid will result in the kernel sending the signal to a number of processes). ...
A service manager knows it should terminate its services because the system administrator asked it to halt or reboot the system. When the administrator runs reboot, or the user chooses the corresponding option in his/her desktop environment, the init process is told to reboot (not the kernel, at this point). The init ...
When the operating system shuts down, how does a service manager know that it should sends SIGTERM and SIGKILL to its services?
1,545,111,506,000
Looking for a list of libraries which can be called from a custom Kernel Module. I understand that there are restrictions compared to user space and libraries like <stdio.h> and <string.h> can't be used. Which are the most popular ones which can be used, or even better is there a rule of thumb to help me distinguish w...
None of the standard user space libraries are available from kernel code. There are some functions in the kernel that behave similar to the corresponding user space functions, but you should always verify that there are no differences. Concerning the mmap function, this function is just a system call to the kernel. It...
Which Libraries can be called inside a Kernel Module
1,545,111,506,000
We have a kernel module that was building fine for RedHat family of Linux distribution, until the recent RHEL7.5. When trying to build on RHEL7.5, we've got an error of: ...error: ‘GENL_ID_GENERATE’ undeclared... Did some reading, and it seems like this is an change since kernel 4.11+, but RHEL7.5 is based on kernel ...
Looking at the git commits for netlink it looks like several changes were made to the structure in version 4.11: First, you can omit the .id field completely from your initializer in genl_family as Linux has removed static family IDs. As well, the genl_register_family_with_ops function is not used any more. Instead, a...
netlink: GNEL_ID_GENERATE definition removed from RHEL7.5 kernel library