date
int64
1,220B
1,719B
question_description
stringlengths
28
29.9k
accepted_answer
stringlengths
12
26.4k
question_title
stringlengths
14
159
1,489,492,456,000
A Plextor PX-750A on a Linux system has made many DVD+R DL coasters while trying to burn an 8GB DVD .iso file with growisofs and the Schilling cdrecord program. I tried growisofs first: growisofs --version * growisofs by <[email protected]>, version 7.0, front-ending to genisoimage: genisoimage 1.1.8 (Linux) The co...
Try another DVD writer. Failing commands functioned properly when used with a USB-attached LG M/N GE24LU20 DVD writer. Check DVD writer firmware revision. Upgrade the firmware if a newer revision is available. Both growisofs and cdrecord commands above that fail on a Plextor PX-750A-UF 1.01 burner succeed wit...
Command line to burn DVD+R DL media on Linux?
1,489,492,456,000
(This is not about restricting client access, for which ext3 permissions do the trick) I'd like to encrypt the data on my NAS drive (Buffalo LinkStation Pro with SSH access enabled, if that matters) in a user-friendly way. Currently, a truecrypt container has to be manually mounted via SSH and also unmounted again (un...
I'm seeing a sketch of a solution using Samba "logon scripts" - client-side code that runs after a samba login - but a complete solution needs to complete the sketch with details. Also related are "preexec scripts" - server-side code that runs during a samba login. Referencing the smb.conf man page logon script (G) T...
How to set up an encrypted directory to be mounted only during samba access?
1,489,492,456,000
I am trying to generate sound data, convert it and store it to a WAV format. I'm almost there - except I'd like to hear the generated sound while it is being "recorded". This command just generates data and plays it back: perl -e 'for ($c=0; $c<4*44100; $c++) { $k=1*sin((1500+$c/16e1)*$c*22e-6); print pac...
You can use tee(1) to multiplex the stream, e.g. perl -e 'for ($c=0; $c<4*44100; $c++) { $k=1*sin((1500+$c/16e1)*$c*22e-6); print pack "f", $k; }' | tee >(sox -c1 -r44100 -t f32 - test.wav) \ >(sox -c1 -r44100 -t f32 - -d) > /dev/null You might also be interested in soxs' synth effect, which can produce mo...
Command line audio - piping for simultaneous playback and recording
1,535,912,384,000
What are the platforms that Linux is being used frequently on besides x86? I know that x86 dominates. But, what are other platforms that some people also use Linux for? Are there links for statistics about this?
ARM is huge for linux. Aside from the Rasberry Pi and other hobbyist ARM SoC you have every Android phone and tablet and many of the Chromebooks running Linux on ARM. I couldn't find any hard numbers on total devices in use, but total android activations number somewhere north of 1 billion. The Chromebooks are A...
What are the platforms that Linux is being used frequently on besides x86?
1,535,912,384,000
For example, I have directory with multiple files created by this way: touch files/{1..10231}_file.txt I want to move them into new directory new_files_dir. The simplest way to do this is: for filename in files/*; do mv "${filename}" -t "new_files_dir" done This script works for 10 seconds on my computer. It is ...
Just use a shell where mv is or can be made builtin, and you won't have the problem (which is a limitation of the execve() system call, so only with external commands). It will also not matter as much how many times you call mv. zsh, busybox sh, ksh93 (depending on how it was built) are some of those shells. With zsh:...
How calculate the number of files which can be passed as arguments to some command for batch processing?
1,535,912,384,000
I know that different distributions patch the packages that are available in the respective repositories but I've never understood why is there a need to do so. I would appreciate it if somebody could explain or point me to the relevant documentation online. Thanks.
It took a few tries, but I think I comprehend what you're asking now. There are several possible reasons for a distribution to patch given software before packaging. I'll try and give a non-exclusive list; I'm sure there are other possible reasons. For purposes of this discussion, "upstream" refers to the original sou...
Why do different Linux distributions need to patch packages?
1,535,912,384,000
How can I add line numbers to man pages or info pages in Linux? I want to use line numbers to navigate in man pages. I can write the man page in a file and then open it with Vim, but is there a better way?
Open a manpage, Hit -N then Enter. ( -, then ShiftN, then Enter) e,g: man man: 1 MAN(1) Manual pager utils MA 2 3 NAME 4 man - an interface to the system reference manuals 5 6 SYNOPSIS 7 man [man o...
How do I add line numbers to the man page?
1,535,912,384,000
The third party scheduling application our enterprise uses doesn't execute rm commands as expected. By this, I mean I expect the rm -f $filetoremove to complete and then continue to the next line of code in the script. But I need to get it to execute preferrably rm -f. Is there another method to remove a file witho...
The unlink command is also part of POSIX: unlink <file>
How to remove a file without using rm? [closed]
1,535,912,384,000
I accidentially destroyed my cd command. I tried to automatically execute ls after cd is called. I found a post saying that I have to execute alias cd='/bin/cd && /bin/ls', but now I get -bash: /bin/cd: No such file or directory and can't change directoy anymore.
Your system (like many Unix systems) does not have an external cd command (at least not at that path). Even if it had one, the ls would give you the directory listing of the original directory. An external command can never change directory for the calling process (your shell)1. Remove the alias from the environment ...
-bash: /bin/cd: No such file or directory - automatically execute ls after cd
1,535,912,384,000
Does the command pwd in a shell script output the directory the shell script is in?
There are three independent "directories" at play here: your current shell's current working directory, the shell script's current working directory, and the directory containing the shell script. To demonstrate that they are independent, you can write a shell script, saved to /tmp/pwd.sh, containing: #!/bin/sh pwd ...
What does pwd output?
1,535,912,384,000
I can't determine exactly what file is eating up my disk. Firstly I used df command to list my directories: devtmpfs 16438304 0 16438304 0% /dev tmpfs 16449868 0 16449868 0% /dev/shm tmpfs 16449868 1637676 14812192 10% /run tmpfs ...
My magic command in such situation is : du -m . --max-depth=1 | sort -nr | head -20 To use this : cd into the top-level directory containing the files eating space. This can be / if you have no clue ;-) run du -m . --max-depth=1 | sort -nr | head -20. This will list the 20 biggest subdirectories of the current direc...
How to Pin Point Large File eating space in Fedora 18
1,535,912,384,000
how to delete the files that created on Aug 7 with the name DBG_A_sql* under /tmp as the following example: -rw-r--r-- 1 root root 51091 Aug 7 11:22 DBG_A_sql.2135 -rw-r--r-- 1 root root 15283 Aug 7 11:22 DBG_A_sql.2373 -rw-r--r-- 1 root root 51091 Aug 7 11:22 DBG_A_sql.2278 -rw-r--r-- 1 root r...
You can use find. Calculate date according to your requirement and use, find /tmp -maxdepth 1 -mtime -1 -type f -name "DBG_A_sql*" -print After confirming it delete them, find /tmp -maxdepth 1 -mtime -1 -type f -name "DBG_A_sql*" -delete
Finding and deleting files with a specific date
1,535,912,384,000
Objective: Check in /etc/shadow if user password is locked, i.e. if the first character in the 2nd field in /etc/shadow, which contains the user's hashed password, is an exclamation mark ('!') Desired output: a variable named $disabled containing either 'True' or 'False' Username is in the $uname varable and I do some...
Why not just do it all with awk? awk -F: '/<username>/ {if(substr($2,1,1) == "!"){print "True"} else {print "False"}}' /etc/shadow
BASH: Check in /etc/shadow if user password is locked
1,535,912,384,000
I am using Linux oess (CentOS). I am working on a VM: In the terminal, I'm trying to: ping 8.8.8.8 to see my connectivity. It says: Network is unreachable Then I typed: ifconfig: inet addr: 192.168.56.101 Then: sudo /sbin/route add -net 0.0.0.0 gw 192.168.56.101 eth0 Now I'm doing the same ping and it says: De...
First things first: can you ping 192.168.56.1? If so, then you have an IP connection to the router. Set this as your default route. Otherwise try pinging 192.168.56.255 (broadcast) to see on what address you might get replies. See arp -a to check what addresses you can find. Can you ping 8.8.4.4 (google) after changin...
network: destination host unreachable
1,535,912,384,000
I have a file of patterns and I want to return all the line numbers where the pattern was found, but in a wide format and not long/spread. Example: fileA.txt Germany USA UK fileB.txt USA USA Italy Germany UK UK Canada Canada Germany Australia USA I have done something like this: grep -nf fileA.txt fileB.txt which r...
Using GNU datamash: $ grep -n -x -F -f fileA.txt fileB.txt | datamash -s -t : -g 2 collapse 1 Germany:4,9 UK:5,6 USA:1,2,11 This first uses grep to get the lines from fileB.txt that exactly matches the lines in fileA.txt, and outputs the matching line numbers along with the lines themselves. I'm using -x and -F in ad...
grep output from long to wide
1,535,912,384,000
I'm trying to remove a lot of files at once but need to be specific as to not remove any of the files I actually need. I have a ton of corrupt files that start master- but there are valid files that start with master-2018 So, I want to do something like rm -rf master-* --exclude master-2018* Is that I need possible?
Yes you can use more than one pattern with find: $ find -name 'master-*' \! -name 'master-2018*' -print0 -prune | xargs -0 echo rm -fr (remove the echo if you're satisfied with the dry run) You should add a -maxdepth 1 predicate just after find if you only want ro remove files from the current directory, ie mast...
Remove files that start with but don't contain
1,535,912,384,000
This example was in a Linux book: $ cat sort-wc #!/bin/bash # Sort files according to their line count for f do echo `wc -l <"$f» lines in $f done | sort -n $ ./sort-wc /etc/passwd /ect/fstab /etc/motd What I don't get is why there is only a single backtick, a single double quote and what the >> does. Isn't >> f...
This is from page 121 of "Introduction to Linux for Users and Administrators" and that's a typographical error in the text. The script is also avaliable in other texts from tuxcademy, with the same typographical error. The single » character is not the same as the double >> and it serves no purpose in a shell script. ...
I don't understand what a single backtick and double quote and >> do in this script
1,535,912,384,000
I'm looking to find the lines between two matching patterns. If any start or end pattern missing, lines should not print. Correct input: a ***** BEGIN ***** BASH is awesome BASH is awesome ***** END ***** b Output will be ***** BEGIN ***** BASH is awesome BASH is awesome ***** END ***** Now suppose END pattern is mi...
cat input | sed '/\*\*\*\*\* BEGIN \*\*\*\*\*/,/\*\*\*\*\* END *\*\*\*\*/ p;d' | tac | sed '/\*\*\*\*\* END \*\*\*\*\*/,/\*\*\*\*\* BEGIN *\*\*\*\*/ p;d' | tac It works by having tac reverse the lines so that sed can find both delimiters in both orders.
Print lines between start & end pattern, but if end pattern does not exist, don't print
1,535,912,384,000
I want to play with Linux to better understand how it works. Thus, I am looking for a very basic and small Linux to play with. I tried small Linux distributions (which copy themselves to RAM), but they have their own structure (like Live CD). Instead, I wish to have a minimal but standard Linux structure. I installed ...
Slackware should do. And to be honest - there is no "standard" linux. You define your standard afer you defined what you need to do with it and what to expect from it. The low-level (plug and play, device-naming, network configuration, system configuration, detection of network services, hardening) is quite different ...
Very basic Linux for educational purposes
1,535,912,384,000
When I log in to SSH while forwarding my local port, it's 21 FTP port, with the command: ssh -R 2101:localhost:21 [email protected] -p 8288 After successfully logging in, I sent this command in the SSH: ftp ikiw@localhost -p 2101 The command runs normally, and I also successfully logged into FTP smoothly, but when...
FTP is a horrible protocol. Yes, it uses multiple ports; there's the control port and then each data transfer (ls or get and so on) opens a second new random port. Worse, depending on if you're doing PASV or active mode FTP, the server could try to initiate the connection. FTP isn't easy to handle with forwarding lik...
Cannot do "ls" in FTP while port forwarding to SSH
1,535,912,384,000
Does the Linux kernel use original Unix code or do they share the idea? Since both are written in C, is that true?
In cases like this it helps to define Unix more precisely. In this response I will be talking about AT&Ts unix specifically. Linux is a Unix Clone and shares no actual code. This is what allowed Linux to be licensed under the GPL and hence free software. If it had inherited code, it would have been owned by the creat...
Does Linux use original Unix code or do they share the idea? [duplicate]
1,535,912,384,000
So GNU/Linux is an operating system, consisting of several programs at a minimum: Linux kenel, gcc, gnu-binutils, Gnome desktop, etc. What makes a Linux distribution GNU? Is it the tools, with which the kernel was compiled? Is it the tools, with which the distribution is shipped? Do there exist fully functional, des...
An operating system is a combination of a kernel and a userland. Basically, the kernel manages the hardware while the userland provides a comprehensive interface to the users. In a common GNU/Linux distribution, Linux provides the kernel while the GNU project brings the userland tools. GNU was started way before Linux...
What makes a distribution GNU and are there Linux distributions, that are not GNU? [duplicate]
1,535,912,384,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,535,912,384,000
free -m total used free shared buffers cached Mem: 15708 15539 168 124 6 6272 -/+ buffers/cache: 9260 6447 Swap: 0 1759218604 0 sysctl vm.swappiness vm.swappiness = 0 grep Swap /proc/meminfo SwapCached: ...
That's a very old RHEL/CentOS 6 kernel bug, you need to update to kernel-2.6.32-573.6.1.el6 (or newer). See this RH customer portal article (requires RH account) and this question on serverfault for more details. I would also recommend upgrading your system, CentOS 6 is no longer supported and 6.7 is not even the late...
swap total is zero but used is too high
1,535,912,384,000
I am trying to use yocto poky environment. I did the following: #source environment-setup-cortexa9hf-neon-poky-linux-gnueabi Now, if I try to compile the program using: #$(CC) hello.c -o hello.elf it throws me error since $(CC) isn't defined. However, if I do $CC it works. I am confused on what is the fundamental ...
I'm assuming that you've seen $(CC) in a Makefile where it serves as an expansion of the variable CC, which normally holds the name of the C compiler. The $(...) syntax for variable expansions in Makefiles is used whenever a variable with a multi-character name is expanded, as $CC would otherwise expand to the value ...
What is the difference between $(CC) and $CC?
1,536,525,681,000
I'm having some trouble trying to remove write permission from the owning group (g), and to add read permission to others (o) at the same time. How would I remove some permission from the owning group and add some permission for others in the same line?
Noting the title of your question: Removing and adding permission using numerical notation on the same line With chmod from GNU coreutils, which you probably have on a Linux system, you could use $ chmod -020,+004 test.txt to do that. It works in the obvious way: middle digit for the group, 2 is for write; and last...
Removing and adding permission using numerical notation on the same line
1,536,525,681,000
I've accidentally created a file named °. Now I'm having trouble deleting it with bash. [/opt/etc/sudoers.d] # ls -l -r--r----- 1 admin administ 21 Feb 3 23:54 010-root -rw-r--r-- 1 admin administ 20 Feb 3 23:50 ° Typing rm ° seems to only move the caret to the beginning of the line, i.e. no...
How about? rm -i ? I think this should work...
How do I delete a file named "°" in bash
1,536,525,681,000
Given that /etc/sudoers and /etc/sudoers.d/ are not readable by regular users, is there a way that I, as a normal user, can find out what sudo permissions I have?
Run sudo -l. Depending on how sudo is configured on your system, it might request your password first, but it will display all sudo configuration options that apply to your account, and then all the permitted command definitions applicable to you.
linux sudo list permitted commands [duplicate]
1,536,525,681,000
A cpp file I'm working with creates a directory, i.e. mkdir( path, ... ), where path comes from an environment variable (e.g. getenv( "FOO" );). As an example, say $FOO is /foo, and path, created above, is `/foo/newPath/'. For my question scenario, it is possible that /foo/oldPath/ exists and has content (assume no fu...
They are not guaranteed that. It is possible that /foo/oldPath is a mount point. This can, however, be easily checked by running mount | grep 'on /foo/oldPath' No output should indicate that the oldPath directory is not a mount point. You will need to be more careful if you are using nested directories, since you can ...
Are two subdirectories with the same root guaranteed to be on the same mounted file system?
1,536,525,681,000
I want to use aufs to combine a few disks.I am able to mount the aufs file system using the mount command from the command line. However, when trying to mount the same through an fstab entry, it fails. Google tells me that fstab does not mount file systems in the specified order, creating this problem. I also found re...
Systemd has native support for mounts (man systemd.mount). In fact systemd reads /etc/fstab, uses it to generate mount units, and mount the filesystems itself. Rather than relying on fstab, it's also possible to create mount units by hand. This is how system mounts like /dev, /sys, /proc, etc are handled (/usr/lib/sys...
How to mount aufs file system on boot in archlinux?
1,536,525,681,000
If you want to read the single line output of a system command into Bash shell variables, you have at least two options, as in the examples below: IFS=: read user x1 uid gid x2 home shell <<<$(grep :root: /etc/passwd | head -n1) and IFS=: read user x1 uid gid x2 home shell < <(grep :root: /etc/passwd | head -n1) I...
First note that using read without -r is to process input where \ is used to escape the field or line delimiters which is not the case of /etc/passwd. It's very rare that you would want to use read without -r. Now as to those two forms, a note that neither are standard sh syntax. <<< is from zsh in 1991. <(...) is fro...
What is more efficient or recommended for reading output of a command into variables in Bash?
1,536,525,681,000
Given this input: # Lines starting with # stay the same # Empty lines stay the same # only lines with comments should change ls  # show all major directories               # and other things cd      # The cd command - change directory               # will allow the user to change between file directories touch     ...
If all your commands and arguments do not contain #, and one other character (say the ASCII character given by byte 1), you can insert that other character as an extra separator and use column to align the comments (see this answer). So, something like: $ sed $'s/#/\001#/' input-file | column -ets $'\001' # Lines star...
Complex text alignment in bash
1,536,525,681,000
My data looks like: $ cat input 1212103122 1233321212 0000022221 I want the output to look like: $ cat output 1 2 1 2 1 0 3 1 2 2 1 2 3 3 3 2 1 2 1 2 0 0 0 0 0 2 2 2 2 1 I tried: sed -i 's// /g' input > output but it does not work. Any suggestions?
Here you are: sed 's/\(.\{1\}\)/\1 /g' input > output And if you want to save the changes in-place: sed -i 's/\(.\{1\}\)/\1 /g' input How it works: s/\(.\{1\}\)/\ /g will add a space, after each 1 character. For instance, if you wanted an output file like: 12 12 10 31 22 12 33 32 12 12 00 00 02 22 21 You could edit...
how to insert space between individual digits in a file?
1,536,525,681,000
I would like to know if a particular folder is present or not. I used the following command find /mnt/md0/ -maxdepth 1 -name 'dcn'||'DCN' I want to know if folder name is DCN or dcn . How would I do this ?
You're looking for the option -iname, which stands for "ignore case" on GNU find along with the option -type d for selecting only directories. find /mnt/md0/ -type d -maxdepth 1 -iname dcn For more a detail explanation on find switches you consult explainshells.com's explanation of find. (This will match any case: dc...
Using find command to find folder ignoring case
1,536,525,681,000
I've been looking for an all around Linux Programmers manual but there isn't one... So that leads me to ask if the Unix Programmers Manual is relevant for Linux? The manual is here: http://cm.bell-labs.com/7thEdMan/v7vol1.pdf
The Unix Programmers Manual you linked to is probably mostly relevant for Linux also. However, that manual was published in 1979. Things have changed since then in all descendants of the original Unix.
Is the Unix Programmers Manual relevant for Linux?
1,536,525,681,000
Possible Duplicate: How do I delete a file whose name begins with “-” (hyphen a.k.a. dash or minus)? This is an awkward one, I have received some files from a windows machine which have been named things like "----index.html" When I try to grep hello * in a directory containing these files I get grep errors and w...
mv -- ----index.html index.html grep hello -- *
Linux Rename File Beginning with "--" [duplicate]
1,536,525,681,000
I need to find out what kind of script runs fsck during the boot on CentOS 7? I know that all scenarios are located in /etc/rc.d directory. But I haven't any idea about where is this script is located.
I know that all scenarios are located in /etc/rc.d directory. What you know is wrong. Welcome to CentOS 7. The world has changed. In particular, your base of Red Hat Enterprise Linux 7 has changed. You are using a systemd Linux operating system. A lot of the received wisdom about Linux is not true for such syste...
Fsck script location
1,536,525,681,000
I've somehow managed to create a file with the name "--help". If I try to remove the file using "rm" funny stuff happens. Please help here's a printout of the dir listing: [pavel@localhost test]$ ls -la total 3640 drwxrwxr-x. 5 pavel pavel 4096 Jun 19 18:33 . drwxrwxr-x. 6 pavel pavel 4096 Jun 9 12:23 .. -rw...
Either rm ./--help or rm -- '--help' See Utility Syntax Guideline 10 in the POSIX.1-2008 specification for a description of the end-of-options indicator, --
How can I remove a file called "--help" with bash command line? [duplicate]
1,536,525,681,000
I'm running Debian Squeeze 6.0.5. Does the use of swap memory make my computer run slower? If so, how can I reduce the size of the swap memory after the system is already installed?
One doesn't always want to reduce it, but often to increase its lazy usage instead — the more clean pages are already in swap, the better, it means they can easily be set off RAM when free RAM is needed. Linux VM, though, has some weird behavior regarding swapping — intensive disk I/O (like huge file cp) can make your...
How to reduce size of swap after a system is already installed?
1,536,525,681,000
On my Archlinux, /dev/pts is mounted by the devpts, so who created the /dev/pts/ptmx device node? What's the purpose of this node? it's the same (Major=5 Minor=2) device node same as /dev/ptmx/, but with different access mode, for what?
The old AT&T System 5 mechanism for pseudo-terminal slave devices was that they were ordinary persistent character device nodes under /dev. There was a multiplexor master device at /dev/ptmx. The old 4.3BSD mechanism for pseudo-terminal devices had parallel pairs of ordinary persistent master and slave device nodes ...
Where does `/dev/pts/ptmx` come from? [duplicate]
1,536,525,681,000
I have a Dir1 with multiple subdir and files inside it. I intend to copy the Dir1 to Dir2 so that all the files in it will be just empty files but with same file name as Dir1. Then I intend to push the Dir2 to github to explain example data-structure and filenames to users. Is there a command to copy files in a way...
Or more complicatedly but with a single filesystem pass (for even more portability ~ should be written as $HOME) find . \( -type d -exec mkdir -p "~/elsewhere/{}" \; \ -o -type f -exec touch "~/elsewhere/{}" \; \) The complexity here is that of Boolean logic (which may be of some benefit to learn) and precedence (a...
create empty files with same directory structure as reference directory
1,536,525,681,000
I may be being daft here, but if I want to do something while a process is running, why do I do: while kill -0 $PID do #... done instead of until kill -0 $PID do #... done ? kill -0 exits with code 1 if the process is not found, and 0 if the process is found: $ kill -0 123444 -bash: kill: (123444) - No such ...
When dealing with return codes "0" is a success and non-zero is failure. The syntax of a while loop is: while COMMANDS; do ...; done The while statement checks the return code of the last command in the provided list of commands. In you last example of while 0, this will attempt to execute a command called "0" and ch...
Why is it "while kill -0 $PID" and not "until kill -0 $PID"?
1,536,525,681,000
At work, I spend a lot of time manipulating files on a networked computer that's running SME Server (but that's set up for Windows filesharing, if that somehow makes a difference). I have been wondering how to cd to the network drive's root from bash so that I don't have to keep calling up Finder / nautilus every time...
For OS X look for your share name under /Volumes (it may have a "-digit" at the end if you have many mounts with the same name). The same goes for mounted CD/DVDs and disk images.
How to cd to a Windows file share?
1,536,525,681,000
I have a Linux machine that only has very minimal cmds available on it, for example the /bin looks like this: /bin# ls ash chattr clockdiff dd dumpkmap fdflush gunzip linux32 ls mktemp mt pidof printenv rmdir...
If you can transfer files to it, then you can copy the required timezone definition from your local system's /usr/share/zoneinfo to /etc/localtime on the limited system. Testing this out in an Alpine container: % docker run --rm -it alpine date Fri Sep 1 07:15:13 UTC 2023 % docker run --rm -it -v /usr/share/zoneinfo/...
How can I set a time zone on a Linux machine that has only very minimal cmds available?
1,536,525,681,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,536,525,681,000
I'm looking for a "meta-command" xyz such that: (echo "foo"; echo "bar") | xyz rev will return: foo oof bar rab I'd like to avoid temporary files, i.e. I'm looking for a solution neater than: tempfile=$(mktemp) cat > $tempfile cat $tempfile | rev | paste $tempfile - (And of course I want a general solution, for any...
There will be a lot of problems in most cases due to the way that stdio buffering works. A work around for linux might be to use the stdbuf program and run the command with coproc, so you can explicitly control the interleaving of the output. The following assumes that the command will output one line after each line ...
A command to output each line forward then backwards
1,536,525,681,000
I'm not sure how this happened, but I have a number of files that have becomed symlinked to themselves. It seems likely that there won't be any way to restore the files, but hopefully there is. Here is what ls -l says lrwxrwxrwx 1 bob users 50 Sep 9 21:45 background.png -> /path/to/background.png I tried unl...
If a file is symlinked to itself then there's no data present and any attempt to access it will result in a loop, and ultimately an error eg $ ls -l myfile lrwxrwxrwx 1 sweh sweh 19 Sep 9 22:38 myfile -> /path/to/here/myfile $ cat myfile cat: myfile: Too many levels of symbolic links Since there's no data, deleti...
How to unlink file symlinked to itself without destroying
1,536,525,681,000
I have one file called abc.csv, its format is: aa,size:12 bb,size:13 cc,size:3 I want to delete size: , and the file will become like this: aa,12 bb,13 cc,3 Can anyone tell me how to use shell script to perform this task?
You can use sed easily for this task: sed -i -- 's/size://' abc.csv s/size:// is a simple regex that says replace size: with <blank>.
Linux shell script delete specific contents in file
1,536,525,681,000
How can I work out the link count of an inode number? If I know the inode number is, say, 592255 - what workings out can I do to find out the link count? I know directories have a link count of at least 2, but don't know how to work it out.
Finding the link count using the name You can use the stat command to get a link count on a given file/directory: $ stat lib/ File: ‘lib/’ Size: 4096 Blocks: 8 IO Block: 4096 directory Device: fd02h/64770d Inode: 11666186 Links: 3 Access: (0755/drwxr-xr-x) Uid: ( 1000/ saml) Gid: ( 10...
Work out the link count of inode number?
1,536,525,681,000
I'm running a propietary program which generates text output. Kind of like a logger. logger I'd like to both view this output on the terminal to watch the server breathe, and send it to a text file. So normally I'd do: logger | tee /tmp/log.txt But these log files can become large enough to overwhelm my VMs disk s...
With ksh93, zsh or bash: logger | tee >(gzip > /tmp/log.txt.gz) That uses that ksh feature called process substitution. >(gzip > /tmp/log.txt.gz) is substituted with the path of a file (typically something like /dev/fd/something, but that could also be a temporary named pipe) that refers to the writing end of a pipe....
Send stdin to console and compressed file
1,536,525,681,000
I have one IBM AIX server (serverA) which is connected to the san storage. I have created a volume group and also file system (jfs2) and mounted to directory /profit. After that I created a NFS share for that directory and started the NFS daemon. Over at another server, which is IBM AIX also (serverB), I created a mo...
Remember that each of the NFS client systems will determine the username by looking up the numerical UID locally using the local system's /etc/passwd, or in your centralized user database. The NFS server only stores the UID in numerical format, and does not know about usernames. This is also true for group names vs. G...
Why is file ownership inconsistent between two systems mounting the same NFS share?
1,410,375,331,000
Our Linux based Thecus N12000 NAS recently experienced this message in its dmesg log. [2014-05-21 11:34:56] ------------[ cut here ]------------ [2014-05-21 11:34:56] WARNING: at net/ipv4/tcp_input.c:2966 tcp_ack+0xd88/0x1a1c() [2014-05-21 11:34:56] Hardware name: IRONLAKE & IBEX PEAK Chipset [2014-05-21 11:34:56] ...
You're correct about the location of the WARN, this code is from the upstream kernel tag v2.6.38: net/ipv4/tcp_input.c 2953 static void tcp_fastretrans_alert(struct sock *sk, int pkts_acked, int flag) 2954 { ... 2964 if (WARN_ON(!tp->sacked_out && tp->fackets_out)) 2965 tp->fackets_out = 0; 296...
Is this kernel warning a major problem that needs my attention?
1,410,375,331,000
I've built a kernal module from source and now would like to load the module at boot. The .ko file is in the build directory in my user folder, and I know it works because running insmod ./vizzini.ko from the appropriate place works fine. I made the directory vizzini in /lib/modules/2.6.32-5-amd64/kernel/drivers/ and ...
Everything seems fine so far. You just need to run depmod - then modprobe should find your module.
Integrating custom kernel module into Debian
1,410,375,331,000
We got a new server at work and I installed harddrive from the old system. Ubuntu 8.04 boots up just fine. The only problem is: $ifup eth0 device not found $lspci Ethernet Controller Intel Pro(100/1000) $dmesg | grep eth (nothing) Should I add some sort of default ethernet module using modprobe or is there another ...
Try modprobe e1000 or modprobe e1000e.
ethernet not found- load module into linux kernel?
1,410,375,331,000
I'm having problems setting up X.org on Gentoo. At the moment I have kernel 2.6.37-gentoo-r4 installed and have built X against this kernel. I have nouveau drivers installed and they seem to be working correctly, from what I can see in terminal. I have nVIdia GeForce 9500M GS and it should be supported by the driver ...
I also get the No DRICreatePCIBusID symbol error when I try to run X -configure on my system. Thankfully, I didn't really need to run it in order to make X run. These are the files inside my /etc/X11/xorg.conf.d/: 10-evdev.conf 10-monitor.conf 10-quirks.conf 20-nouveau.conf 10-evdev.conf and 10-quirks.conf came wit...
Xorg -configure doesn't work with nouveau drivers
1,410,375,331,000
I am running Debian 6, and decided to install 2.6.38 kernel from Unstable. I also installed the headers so that I can later on : sudo apt-get install --target-release=unstable linux-image-2.6.38-2-686-bigmem linux-headers-2.6.38-2-686-bigmem I then re-installed virtualbox-ose-dkms to that the VirtualBox drivers for 2...
autoconf.h moved from include/linux to include/generated in Linux 2.6.33. Authors of third-party modules must adapt their code; this has already been done upstream for VirtualBox. In the meantime, you can either patch the module source or create a symbolic link as a workaround. As for the NMI-related errors, the NMI w...
I am failing to build VirtualBox driver for Linux 2.6.38
1,410,375,331,000
I have an older P5K asus mobo with: 01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GT218 [GeForce 8400 GS Rev. 3] [10de:10c3] (rev a2) Subsystem: eVga.com. Corp. Device [3842:1302] that hangs (the entire system) if nvidiafb module (from kernel 6.6.5) is loaded. I found https://forums.gentoo.org/vie...
nvidiafb which has long been deprecated must be disabled or blacklisted and nouveau should be used instead.
Why does nvidiafb module hang the entire system?
1,410,375,331,000
I need to install the linux-header-* package for other kernel versions in order to compile a kernel module locally for a different system. Say, I want to compile for Debian 10, with a kernel version of 4.19.0-13-amd64, using Ubuntu 20.10, with a kernel version of 5.8.0-43-generic. In that case, is it possible to insta...
You can't install the debian linux-headers on Ubuntu but you can download the source: Add only the debian sources , it doesn't harm ubuntu: printf "%s\n" "deb-src http://deb.debian.org/debian buster main" |\ sudo tee /etc/apt/sources.list.d/debian-src.list Add the gpg keys: sudo apt-key adv --recv-keys --keyserver ke...
How to obtain linux-headers-* for other kernel versions than the most current using `apt-get`?
1,410,375,331,000
I am trying to create a virtual webcam from OBS(26.1.1) so I can feed it to Zoom. I am Linux Mint 20.1 Cinnamon, version 4.8.6, Kernel 5.4.0-64-generic. I did: sudo apt-get install v4l2loopback-dkms sudo apt-get install v4l2loopback-utils but v4l2loopback is not showing up as an option in zoom I went to the v4l2loop...
Installing v4l2loopback-dkms will install the modules on your system (at least: if all goes well), but it will not load the modules for you. So, you need to manually load the module with something like modprobe v4l2loopback In order for zoom to use the device, you will first have to attach OBS Studio to it. You proba...
How to best install v4l2loopback on Linux Mint?
1,410,375,331,000
I run a debian 10 with kernel 5.9.0.0 I installed v4l2loopback from the official repo, as in sudo apt install v4l2*, which installed sudo apt install v4l2* Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'v4l2loopback-source' for glob 'v4l2*' Note, select...
I'll answer my own question. Since my kernel is 5.9.0.0, which I installed from buster-backports, while v4l2 was installed from buster repo, it was off. I solved it by just installing that too from buster-backports and it works fine
modprobe: FATAL: Module v4l2loopback not found in directory
1,410,375,331,000
I'm trying to compile the kernel from source on the system CentOS 7. The output of uname -a is: Linux dbn03 3.10.0-957.el7.x86_64 #1 SMP Thu Oct 4 20:48:51 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux Here is how I download the source code and compile it: wget "http://vault.centos.org/7.6.1810/os/Source/SPackages/kernel-3....
Try this instead: rpm -ivh kernel-3.10.0-957.el7.src.rpm cd ~/rpmbuild/SOURCES rpmbuild -bp kernel.spec cd ~/rpmbuild/BUILD/kernel-3.10.0-957.el7/linux-3.10.0-957.fc32.x86_64 make menuconfig make bzImage make modules
Compiling kernel from source got a fatal error: too few arguments to function 'part_round_stats'
1,410,375,331,000
Some two years ago, I was able to set a very dim backlight brightness by writing a non-integer value to /sys/class/backlight/intel_backlight/brightness. $ echo 0.3 > /sys/class/backlight/intel_backlight/brightness But now, it seems that there is some sanity check... so, the system complains: bash: echo: write error...
Sounds like an implementation detail of your specific hardware driver. Have you used the exact same hardware when setting float dim values resulted in actually less lit display? Or do you now have simply a less finely configurable backlight, maybe? Probably, you could go to an intel support forum and ask there for the...
Non-integer value to (/sys/class/backlight/intel_backlight/brightness)
1,410,375,331,000
When starting Xubuntu 19.04 get this in boot.log: [[0;1;31mFAILED[0m] Failed to start [0;1;39mLoad Kernel Modules[0m. See 'systemctl status systemd-modules-load.service' for details. I run systemctl status systemd-modules-load.service which yields: Failed to find module 'nf_nat_proto_gre' With sudo modprobe nf_n...
First: the obvious question should be: is this module needed? This is to support using (probably multiple rather than just one) GRE tunnels behind NAT. If no GRE tunnel is used, the question becomes moot. Now what happened? It appears Ubuntu 19.04 is using kernel 5.0 and there were a few netfilter reworking started fr...
Failed to find module nf_nat_proto_gre
1,410,375,331,000
I'm trying to insert an external kernel module in permanent mode. During the boot, my module is being loaded by systemd-modules-load service so long as Selinux is permissive. But I want to keep Enforcing mode. I wasn't able to insert my module into Selinux list with semodule command. What else could I do? This is my e...
Solved! After building the kernel module, I put it into directory /lib/modules/$(uname -r)/kernel/drivers/net. And then with the command depmod I resolved this issue. Now it's loaded after every boot.
Selinux is blocking my external kernel module
1,410,375,331,000
I am unable to launch the cryptoloop module on Kali 4.6. How can I to install it? # modprobe cryptoloop modprobe: FATAL: Module cryptoloop not found in directory /lib/modules/4.6.0-kali1-amd64
You should re-compile the kernel to be able to load the cryptoloop module. Edit your source.list , uncomment the deb-src, then run the following: apt update apt-cache search linux-source Then install the appropriate kernel source (the linux-source-4.6.0 is an example): apt install kernel-source-4.6.0 then mkdir ~/...
How to install cryptoloop module on Kali 4.6?
1,410,375,331,000
My machine: An Ubuntu server 16.04 LTS on a PINE64 with an ARM 64-bit processor (Linux pine64 3.10.105-0-pine64-longsleep #3 SMP PREEMPT Sat Mar 11 16:05:53 CET 2017 aarch64 aarch64 aarch64 GNU/Linux) My goal is to get my PINE64 worked as a VPN server with L2TP/IPsec protocol by strongSwan. Now, I have a problem th...
You might be able to build them your self from source. A similar question was asked here. https://askubuntu.com/questions/168279/how-do-i-build-a-single-in-tree-kernel-module
How to install missing kernel modules? Is it possible?
1,410,375,331,000
I want to load kernel modules, ip_gre.ko and gre.ko, on a embedded-device running embedded-linux to make that device to support GRE protocol. Since I do not want to change Embedded-linux device's kernel, I try to load kernel modules instead of re-installing device kernel. Fortunately, I have that device's kernel sourc...
I solved the problem by analyzing & modifying kernel module. Analyzing kernel module source code indicates that compatible kernel options should be concerned to load kernel modules as Gilles commented. Loading gre kernel module caused the problem because existing pptp module uses protocol ID IPGRE_PROTO that is equal ...
Loading kernel modules that were compiled for another kernel failed
1,410,375,331,000
I use Fedora 19 (Schrödinger’s Cat) on most computers as I prefer it over others (I probably would use Fedora 20 if I could have Gnome 3.8 plus a few other packages). My problem is that I use kmod-staging package for drivers (e.g. SD card reader driver), provided by the RPMFusion repos. Now, when the system updates th...
The RPMFusion project is run by volunteers and this is likely just lagging due to either no time to do it, or perceived low interest. From the FAQ: excerpt #1 from FAQ Q: What is RPM Fusion? RPM Fusion is a repository of add-on packages for Fedora and EL+EPEL maintained by a group of volunteers. RPM Fusion is not a s...
kmod-staging-3.14* on Fedora 19?
1,410,375,331,000
In order to build and install V4L2 module, do I have to download it, or it is already part of the kernel (and all I have to do is to choose it, in order to build it, via kernel configuration)? I 'm running Angstrom distribution [kernel 2.6.32.61]. Kernel configuration's result: --- Multimedia support *** Multime...
It is part of the vanilla linux source, and that should include 2.6.x. If you run make menuconfig and hit /, you get a search. For the 3.11 source, the V4L2 core is triggered by VIDEO_DEV which requires Device Drivers->Multimedia Support and either Device Drivers->Multimedia Support->Cameras/video grabbers or some ...
Install kernel module [V4L2]
1,379,978,403,000
I'm trying to install the webcam driver for my Logitech C210. After some googling Linux UVC driver seems to be what I need. I followed their typical use in hope to get it installed: git clone git://linuxtv.org/media_build.git cd media_build ./build make install Now, I get these errors when I try to ./build: make ...
You need to install the linux-headers package in order to compile additional modules. This package contains the .config file and other files that are generated during the compilation of the kernel. Pick the version of the package that matches your running kernel.
How can I install my webcam on Debian?
1,379,978,403,000
Following instructions at http://lik.noblogs.org/post/2010/05/07/wacom-debian/ Though, i downloaded and built linuxwacom-0.8.8-11 ./configure --enable-wacom --with-kernel=/usr/src/linux-headers-2.6.32-5-686 completes without any problem, then copy sudo cp src/2.6.30/wacom.ko /lib/modules/2.6.32-5-686/kernel/drivers/...
I'm posting this as an answer, seeing as the OP has resolved his/her issue Apparently, performing a dist-upgrade will fix this issue. Although without more information we cannot really say how.
wacom pen & touch cth-460 on debian [closed]
1,379,978,403,000
Attempting to create xfs partition in NVMe disk type in ubuntu 20.04 in GCP is throwing me this error: ubuntu 20.04 , nvme disk root@my-euwe3a-vm:/home/myuser# mkfs.xfs /dev/myvg1/my_lv meta-data=/dev/myvg1/my_lv isize=512 agcount=4, agsize=327680 blks = sectsz=512 attr=2, projid...
It seems the issue does not appear in Ubuntu 22.04 LTS, so it looks like an incompatibility between mkfs.xfs and SSD NVMe in Ubuntu 20.04.
ubuntu 20.04 LTS mkfs.xfs problem creating xfs in nvme disk on GCE GCP
1,379,978,403,000
I'm writing a livepatch module to hook a function and replace it with one that causes the process to terminate. I can't call abort() because that calls BUG() and my kernel will panic on oops. Importantly, the function must terminate the process immediately and must not return.
Well, I'm dumb. Turns out I was still using do_exit_group() and forgot to switch to do_exit().
What is the proper way to exit the current process from a kernel module?
1,379,978,403,000
I have a USB device that I am using with Ubuntu 20.04.3. The manufacturer provided a library and a driver. I can install the driver and get the device to work, but every time the kernel updates I must reinstall the driver to the new tree. I understand that this is the job of dkms and I started working on getting that ...
As @ReedGhost so helpfully suggested in the comments (thanks!), this is exactly what I wanted to do. I found the built in xr_serial module and echoed my device vendor and product id to the newid file. The built-in driver recognizes my device as compatible and is loaded when I plug it in. However, this did not solve my...
Is it possible to set up a new device with an existing driver on linux when the modalias doesn't match?
1,379,978,403,000
I have written a "device driver" (see source code here: https://bitbucket.org/wothke/websid/src/master/raspi/websid_module/ ) that runs fine for most of the time (see https://www.youtube.com/watch?v=bE6nSTT_038 ) but which still seems to have the potential to randomly crash the device occasionally. The "device driver...
After having failed to improve the situation by adding "memory barriers" at every reasonable point in my code I finally found a workaround that works. The problem does not seem to be linked to the shared memory at all. Instead it seems to be triggered by the scheduler and adding calls to "schedule()" in my long runnin...
Am I making invalid assumptions with regard to my kernel module's shared memory?
1,379,978,403,000
During my Linux studies, I came up with this question which I've thus far been unable to find a satisfactory answer. Suppose I have a computer and I've just installed a Linux OS. A certain piece of hardware is not working because the required module is not in the kernel. I have the hardware information but how do I f...
Sometimes the install media will have many modules available, so while you've booted the install media you can run lspci -k to show the name of the driver associated with the piece of hardware: $ /sbin/lspci -k 00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 01) ...
Is there a command line option or single resource to determine the module(s) required for a piece of hardware?
1,379,978,403,000
Some time ago, I installed GeForce GTX 970 on my computer running under Fedora 20. An import thing to know is that I'm using the card only as an accelerator (not for graphics). Until recently, it worked fine. But then I've faced the following problem when trying to launch a .cu executable: modprobe: FATAL: Module nvid...
I fixed my problem by reinstalling the drivers. First I tried to reinstall it with yum (because it was initially installed in this way) but that didn't help. So I removed it and downloaded drivers from NVidia official cite. Installation was done according to this instruction. After that everything worked. As for LKMs:...
NVIDIA drivers as LKMs in Unix: Module nvidia not found
1,428,446,776,000
I want to ring bell in bash I've set lsmod |grep pcs pcspkr 1987 0 xset b and finally echo -e \\a But no ring.
Solution found modprobe pcspkr and echo -e "\a" Works..but only on tty,not on pts.
Slackware won't ring my bell
1,428,446,776,000
I'm compiling third-party kernel modules. Their build system goes to /usr/src/linux-headers-[version] (of a custom kernel chroot) and runs make from there. I want to find out, which files - sources and headers - have been used for the compilation, and which have not. Standard scripts/Makefile.build creates *.d files f...
Try using libtrashcan. After compiling it and installing, preload the library to your process. For example, the following will create a test file and then try to remove it, but because of libtrashcan the unlink system call will be replaced by a move, so the file will end up in ~/Trash: export LD_PRELOAD=/usr/local/lib...
How to preserve .d files after kernel compilation?
1,428,446,776,000
I have been trying to set up iptables on my archlinux server, however when I run iptables -nvL I receive the error iptables v1.4.20: can't initialize iptables table 'filter': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. Having tried to load the modules and failin...
As I run a custom kernel, I do not know if the module needed for the filter table is included in the stock arch kernel. But perhaps you do not even need exactly this table. On my system, I normally just use the nat table. Pass the parameter -t to all iptables invocations to select a given table, for example trying ipt...
Archlinux not configured with iptables
1,428,446,776,000
I just compiled and installed the new 3.0-rc2 kernel from kernel.org on my Fedora 15 system. Everything seems to work fine and I can successfully boot into the system. However, this broke my previously installed NVIDIA driver, so I need to compile a new one. I downloaded the installer from nvidia.com, but I am having ...
Well, I wasn't going crazy. The NVIDIA installer needed to be patched. Kernel version 2.7.0 was hardcoded as the upper bound. That was bumped up to 3.1.0 from a simple patch. Here is the patch file: nvidia-patch @ fedoraforum.org --- conftest.sh.orig 2011-05-30 12:24:39.770031044 -0400 +++ conftest.sh 2011-05-30 12...
NVIDIA installer can't find kernel source/build files (compiled from kernel.org)
1,428,446,776,000
when I do dpkg --get-selections or less /proc/modules I see two different list. I don't understand the difference between the elements of each...
The two commands are not related in any way. dpkg --get-selections returns the selection state of available packages. From man dpkg: --get-selections [package-name-pattern...] Get list of package selections, and write it to stdout. Without a pattern, non-installed packages (i.e. those which have been previ...
What is the difference between a linux package and a linux module?
1,428,446,776,000
I am reading through Salzman's Linux Kernel Module Programming Guide, and I was wondering about where the file linux/kernel.h is located. I couldn't find it with find. Or rather the files I found did not have any printk priority macros in them.
The linux/kernel.h header which gets used for module builds is the header which is part of the kernel source. When modules are built in the kernel source tree, that’s the version which is used. For external module builds, the build process looks for the header in /lib/modules/$(uname -r)/build/include/linux/sched.h. T...
Where exactly is the file linux/kernel.h?
1,428,446,776,000
I've a RTL8153 based USB ethernet adapter, which uses the cdc_ether driver by default. I want to use the r8152 driver, which could be loaded by creating a custom udev rule, as present in the Realtek's linux driver source. But here's confusing part, when I plug-in the adapter, both of the cdc_ether and r8152 modules ar...
ACTION=="add", DRIVER=="r8152", ATTR{idVendor}=="2357", ATTR{idProduct}=="0601", ATTR{bConfigurationValue}!="$env{REALTEK_NIC_MODE}", ATTR{bConfigurationValue}="$env{REALTEK_NIC_MODE}" The meaning of this udev rule is as follows: "When a device with idVendor value 2357 and idProduct value 0601 (and managed by driver ...
Why Udev is loading two kernel modules for a single USB device?
1,428,446,776,000
In the distro I'm most familiar with -- ALTLinux, a command like apt-get install kernel-image-std-def#3.0.... would install another kernel, and update the initramfs and the bootloader config accordingly; an even better command would be the specific update-kernel, which would also install the accompanying kernel module...
Simply installing the new kernel package will handle everything for you. Most of the time, you want to go ahead and upgrade all of your packages, as it will mostly include bug fixes and security updates: apt-get update apt-get upgrade If you call "install" on a package that is already installed, it will be upgraded i...
The command to upgrade to a new kernel from Ubuntu repositories
1,428,446,776,000
I assembled a new machine on Asus P9X79 motherboard, using its RAID controller to create a RAID1 array of two 500Gb drives. When booting Arch from an external drive I am able to work fine with /dev/md126 which corresponds to the array. This way I created the partitions and filesystems on it, then chrooted and installe...
(Lev found the solution, I'm doing exegesis to explain why it works.) using its RAID controller to create a RAID1 array That's a bad sign: you're using fakeraid — a RAID implementation which is mostly implemented by the Windows driver with a little help from the firmware. You get all the downsides of hardware RAID (...
Can't remount local file systems for read-write (RAID1)
1,428,446,776,000
Quite a lot has been going on to advance inter-process security (UID the same) and priveledge dropping in userland, yet it is common that proprietary linux kernel components are used (it seems that GPLv2 does not really solve closed source kernel module issue sadly). My quesiton is about concept (existing or in develo...
Yes, there is a sandboxing concept for proprietary drivers. It's called userland drivers. If you run code inside the kernel, it has access to everything, so it's impossible to sandbox it. (Impossible with respect to the Linux system — that system could run in a virtual machine, and then the VM would be doing the sandb...
Are there sandboxing concepts for proprietary binary kernel modules in linux?
1,428,446,776,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,428,446,776,000
What is the difference between 'm' and 'y'? I am reading a guide, and the first step is to make sure that my kernel supports PPP and MPPE. It should be: # cat /boot/config-`uname -r` | grep G_PPP= CONFIG_PPP=y # cat /boot/config-`uname -r` | grep MPPE CONFIG_PPP_MPPE=y I get: root@N550JV:~# cat /boot/config-`uname -r...
Kernel features can be compiled in-kernel or compiled as loadable modules. When specifying y, the feature will be compiled in kernel. When m is specified, the feature will be compiled as a loadable kernel module. Reference docs: PPP: http://tldp.org/HOWTO/PPP-HOWTO/ MPPE: http://mppe-mppc.alphacron.de/
CONFIG_PPP_MPPE=m vs CONFIG_PPP_MPPE=y
1,428,446,776,000
When running an $ lsmod command, the output lists: dm_mirror 21715 0 dm_region_hash 15984 1 dm_mirror dm_log 18072 2 dm_region_hash,dm_mirror I have tried to search for "dm-mirror module" and found for example a http://en.wikibooks.org/wiki/Linux_Guide/Modules as result. But th...
dm_mirror is a Linux kernel module. Therefore better search the kernel.org website. kernel.org "dm_mirror site:kernel.org" returns loads of less relevant results. The search query "dm_mirror -bugzilla site:kernel.org" does a better job. One of these search engine results links to https://www.kernel.org/doc/menuconfig/...
What is the purpose of kernel module dm_mirror a.k.a. dm-mirror?
1,428,446,776,000
I have recently acquired a device driver for an integrated watchdog timer on a x86 board on which I am running a minimal Linux system. The kernel is 3.6.11 and it has been built using buildroot. My installation does not run udev so I am required to manually perform an insmod and mknod for any drivers that I require. I...
If it uses the normal kernel watchdog interface, that's at /dev/watchdog, which is 10, 130 here. It may also export another one (/dev/watchdog0, etc.). You can find that by querying sysfs: $ cat /sys/class/watchdog/watchdog0/dev 253:0 $ cat /sys/class/watchdog/watchdog0/uevent MAJOR=253 MINOR=0 DEVNAME=watchdog0 And...
Installing a platform driver
1,428,446,776,000
I just downloaded and compiled tg3.ko kernel module. Where should I put it on a Debian system? There is one in /lib/modules/2.6.32-5-xen-amd64/kernel/drivers/net/tg3.ko already. Ideally, I would like to leave the original one where it is, and "bump the priority" for mine. So if mine doesn't get loaded or disappears, t...
Place your module in /lib/modules/2.6.32-5-xen-amd64/updates/ (make the directory if it doesn't exist) and re-run dpkg-reconfigure linux-image-2.6.32-5-xen-amd64 (or just run depmod if you know how). Check that the new driver is found with modprobe -l tg3. Read man 5 depmod.conf for more details.
proper way to overwrite debian kernel modules
1,428,446,776,000
I am trying to install a Cisco VPN client under Ubuntu 10.04 LTS. In the extracted folder I type: alex@alex-laptop:~/Downloads/cisco4.8/vpnclient$ sudo ./vpn_install and there is output of activity which appears to end unsuccessfully with: /home/alex/Downloads/cisco4.8/vpnclient/linuxcniapi.c:458: error: ‘struct sk_b...
Your kernel is too recent for the Cisco VPN client. You'll need to downgrade your kernel to a 2.6.30 version or below. See the release notes.
Kernel module for Cisco VPN client doesn't compile under ubuntu 10.04 LTS?
1,428,446,776,000
I need to know what config and data files are pulled in to make the initrd.img-xxx when update-initramfs (mkinitramfs) is executed. I am having a video driver problem that I have narrowed down to the generation of the initrd.img-xxx after kernel updates. I only get low-resolution single screen VESA, I should have two ...
If you run update-initramfs with a "verbose" option, e.g. update-initramfs -u -v, it will display the name of every file it adds to the initramfs, and every hook script it executes.
What files are pulled in by update-initramfs?
1,428,446,776,000
I'm on CentOS 8 stream. My IP is 2001:570:1:b86::12, and I ran this:- ip -6 route add local 2001:570:1:b86::/64 dev lo and built and ran one of these, and i can now connect (locally) to my server on any of those 18,446,744,073,709,551,615 IP addresses and it all works. I can also connect from a remote machine to th...
OP's method is possible since Linux 2.6.37, but requires additional settings. The IPv6 equivalent for ARP is NDP (which is using ICMPv6 multicast/unicast instead of ARP's dedicated L2 protocol with broadcast/unicast). proxy_ndp doesn't behave exactly as Proxy ARP here (it still requires per-IP settings, which we don't...
I've "bound" an entire IPv6 /64 - now how do I get my kernel to respond to ARP to accept packets?
1,428,446,776,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,428,446,776,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,428,446,776,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,428,446,776,000
My question mostly about hardware, specifically the Intel i5-2500K CPU which Intel describes as having # of Cores 4 # of Threads 4 Linux shows me 4 processors: $ cat /proc/cpuinfo | grep ^processor processor : 0 processor : 1 processor : 2 processor : 3 Nevertheless, I've written a littl...
You should use for_each_online_cpu or for_each_present_cpu instead of for_each_possible_cpu. That will limit the output to CPUs which are really online or present, respectively.
Kernel module shows me 8 processors instead of 4 for Intel i5-2500K
1,428,446,776,000
This is a fresh installation of Manjaro, installed using Manjaro Architect on an existing LVM partition inside a LUKS-encrypted partition and using a separate unencrypted boot partition. I've reinstalled several times, with the same result every time. The problem manifests itself on the second and subsequent boots, in...
Manjaro includes a kernel-alive package which provides a systemd service called linux-module-cleanup that is supposed to clean up old kernel modules, but apparently has a bug in it that causes it to just wipe the entire /usr/lib/modules directory... The solution is to just disable the service with systemctl disable li...
/usr/lib/modules getting deleted on boot