New answers tagged

1

kdump is used exclusively to debug kernel crashes. Enabling it has one main downside, taking up a significant amount of memory. For example, on a system with 2GB RAM, it will use up just under 8% of the RAM. As RAM is often a limiting factor in the performance of servers, it's a hit to the "weakest link" for most users, so this can be a significant ...


1

In linux distributions the term 'upstream' (also applied to kernel) refers to the original version (as is released by software developers) of a program/software (kernel in your case) while 'downstream' refers to the software provided by linux distribution. The latter version often contains some patches and is distributed with some specific configuration ...


-1

General Protection Fault A General Protection Fault may occur for various reasons. The most common are: Segment error (privilege, type, limit, read/write rights). Executing a privileged instruction while CPL != 0. Writing a 1 in a reserved register field or writing invalid value combinations (e.g. CR0 with PE=0 and PG=1). Referencing or accessing a null-...


2

Running make (or make all) will by default already execute make modules. So, running make modules again, after the modules have already been built, will turn up this message. You likely have a functional kernel and modules at this point, and can run make modules_install and make install as usual. $ make help | grep "*" all - Build all ...


0

I had this happen on Homebridge image for Raspberry Pi. I managed to fix it by connecting the RPi by Ethernet cable to my router, then SSH'ing to it and letting the wifi driver know where I live, exactly this: pi@homebridge:~ $ cat /etc/modprobe.d/set_80211_region.conf options cfg80211 ieee80211_regdom=SE then reboot. Like magic, my wifi now appears -- ...


2

Okay, I found the solution.When I run systemd-analyze time, I saw that kernel was taking around 45 seconds. This gave me an idea. Actually, I set up a hibernation sequence by following this. This was creating the problem when I wanted to boot my PC freshly (NOT from Hibernation). So, I just went to /etc/default/grub file and changed [...


0

Turned out that what I had in my mind is kind of possible (but it's complex). We have two ways to tell Linux to exclude one or more CPUs from its normal process scheduling. The isolcpus boot option (documentation) The Linux specific cpusets (documentation) After that, a program can tell Linux that it wants to be run on that CPU with the following system ...


2

hibernate/resume depends on the ability to write all of the RAM to swap. Without swap, you cannot hibernate. Swap space can either be a "swap file" or a "swap partition". Read man mkswap swapon fallocate. Don't use dd to create a swapfile, it'll end up fragmented.


0

A signal can only be delivered when a return to user mode (i.e. exit from kernel mode) is executed and it is your process scheduled to run (usually a privileged assembly instruction that restores the process context and may or may not set user mode, depending whether your process was within a system call or not) - this can be when a system call returns, or ...


1

Some people on reddit recommended to delete the partition from windows disk management. Which I did. Wasn't essentially what I wanted but I went with the easy route.


0

The accepted answer would work for kernel versions up to 5.8. Starting from 5.9, KVM needs to be disabled before the Fully Preemptable option appears. The option can be found in: Virtualization -> Kernel-based Virtual Machine (KVM) support I found this out thanks to https://unix.stackexchange.com/a/616822/231640 and https://lore.kernel.org/linux-rt-users/...


1

An example for a really time-consuming system call is pause(). It never completes, except when the process receives a signal. read() can be interruptable (a better term would be "signalable"), e.g. when reading from a serial line, or not, e.g. when reading from a block device. Why? The original UNIX logic is as follows: We don't know if any input ...


0

True interrupt handlers are in the kernel, and not really associated with a user process. Signal handlers are the closest thing a user process has to an interrupt handler. Some signals are blocked during signal handlers, but SIGKILL is not one of them, so it would exit immediately, just like it would for any other user code.


2

Some system calls can be interrupted (see e.g. siginterrupt(3)). Otherwise the signal is only delivered when the call returns to userland.


0

Kernel threads are like normal processes, with the following two differences: (1) kernel threads are run in kernel mode, and (2) they do not have an address space of their own. Like the name says, kernel threads do not transition to user space, but continue to run in kernel mode. Kernel threads each have their own stacks, but otherwise the address space is ...


0

A kernel thread gets its own process context. Kernel threads are listed by ps: $ ps -ef UID PID PPID C STIME TTY TIME CMD root 1 0 0 May29 ? 00:00:44 /sbin/init root 2 0 0 May29 ? 00:00:00 [kthreadd] root 3 2 0 May29 ? 00:00:05 [ksoftirqd/0] root 5 2 0 May29 ? ...


1

I use inxi for this, it gives a convenient report that is fairly complete depending on the verbosity levels selected (-x, -xx, -xxx, or -a). Also, there are other drive types than sd, there's hd, fio, nvme, mmcblk, a few others. Where this data comes from varies depending on if it's GNU/Linux or BSD, some is generated internally (like vendors), some comes ...


1

The disks are unmounted, if you want view information then to use: lsblk -o MODEL,TRAN,VENDOR,NAME,FSTYPE,LABEL,MOUNTPOINT,SIZE,MAJ:MIN,TYPE,STATE,SUBSYSTEMS or sudo lshw -class disk


0

To cross-compile a kernel for AArch64 on Ubuntu, you need to install gcc-aarch64-linux-gnu, and run the build as make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- ... Thus make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- menuconfig to configure, and make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- all to build the kernel and modules. If you can’t find an ...


0

Using the -n flag with make install (based on @Mat's comment), I obtained the following output: make -f ./scripts/Makefile.build obj=arch/x86/boot install sh ./arch/x86/boot/install.sh 4.19.99 arch/x86/boot/bzImage \ System.map "/boot" So, the make install target runs a script based on CPU architecture. I'm using x86, so arch/x86/boot/install....


1

you can read the mem file with the xxd program in this example i'm going to read the heap of a program $ cd /proc/<the-pid> $ cat maps | grep heap 55fe7eec6000-55fe7eee7000 rw-p 00000000 00:00 0 [heap] $ $ sudo xxd -s 0x55fe7eec6000 -l $((0x55fe7eee7000 - 0x55fe7eec6000)) mem | less flag s: seek offset position 0x05..6000 flag ...


0

When you say "VM server", do you mean the server is a physical machine that hosts VMs, or that the server is a Virtual Machine? If the logs are from a physical machine, it seems a large number of SATA links have died at once; maybe power supply problems, or SATA controller problems? If the server is a VM, this might mean the host suddenly stopped ...


0

Rehashing symcbean's answer systemd handles limits on a per-process basis, which subsequently means it ignores other limits, so its actually necessary to configure the limit within that service's unit file. The following is an example: [Unit] Description=example systemd service unit file. [Service] ExecStart=/bin/bash /usr/sbin/example.sh LimitNOFILE=32768 ...


2

Yes, there is a special case where USB mass storage devices are accessed using a character device: when they’re accessed using the SCSI generic device. (That link goes to the Linux kernel’s documentation, but this isn’t Linux-specific.) However that is unusual for USB devices, and you wouldn’t realistically use that to access the contents stored on the USB ...


Top 50 recent answers are included