Tag Info

New answers tagged

0

Here's a onliner to figure out all sd* devices: ls -l /sys/block/sd* | perl -npe 's#^.*?block/(sd[^/ ]+).*?/(ata[^/]+|usb(?:[-0-9/.]+))/.*#$1 = $2#' For me, the output looks like sda = ata1 sdb = ata2 sdc = ata4 sdd = usb2/2-1/2-1.6 sde = usb2/2-1/2-1.6 sdf = usb2/2-1/2-1.5/2-1.5.1/2-1.5.1.1 The output is not perfect for USB block devices but this ...


1

FAT filenames (not file contents) are encoded in a country-specific manner, DOS called those "codepages". They need to be present in the kernel so your console con correctly display the characters. This also counts for the UTF-8 encoding of the Unicode charater set. This doesn't apply to ext FS though, read up here.


0

You have missed two steps before the make install, which installs the required drivers. Before make install do make modules and make modules_install in that order. This installs drivers based on your .config files. The error can also happen due to improper configuration in the .config file and hence some missing drivers. So here is a hackish way to do the ...


2

It is possible, yes. You need to pass init=/bin/sh to the kernel and you need to remember that the rootfs is most probably mounted ro afterwards. To directly run your program you need to tell the kernel to invoke it after configuring the hardware, but note that the normal userspace won't be available to your program.


8

Bash knows nothing about ELF. It simply sees that you asked it to run an external program, so it passes the name you gave it as-is to execve(2). Knowledge of things like executable file formats, shebang lines, and execute permissions lives behind that syscall, in the kernel. (It is the same for other shells, though they may choose to use another function in ...


0

Download the kernel source code and in the source dir execute make mandocs After the man documents have been made, execute make installmandocs This will install the manual pages into /usr/local/man/man9/. Now you can view man pages by typing man <api-name>, or if you are editing in vim just press K over the API name.


1

Please keep in mind that not using the kernel distributed with Slackware may break your system. Apart of that, compiling the official kernel is a difficult task and takes its time. You can learn about how to compile your own or the official linux kernel on Kernelnewbies.org. Related: http://kernelnewbies.org/KernelBuild https://www.kernel.org


7

There are no more dedicated flush threads anymore. The Linux kernel has moved on to a worker thread model, where several generic worker threads can handle a variety of different tasks. You will see these in the process list as [kworker/#.##] Unfortunately this new design makes it a bit difficult to tell exactly what any given kworker thread is doing at any ...


0

Please try a re-install of pulse sudo apt-get remove --purge alsa-base pulseaudio sudo apt-get install alsa-base pulseaudio sudo alsa force-reload followed by a reboot. A PID check like sudo fuser -v /dev/dsp* /dev/snd/* should then produce something like this: BEN. PID ZUGR. BEFEHL /dev/snd/controlC0: <user> ...


0

Looks like setting kgdboc parameters in boot options worked, not sure why. (I'm using libvirtd)


2

A makefile recipe will stop executing if any command in it returns a failure status (unless the command is preceded by a -). The recipe you cited will ensure that /bsd only gets replaced if the cp bsd /nbsd command succeeds. The cp could fail if the partition were full or out of inodes.


1

Assuming you are using Ubuntu, apt-get install linux-manual-3.2 or similar (pick the correct version). There is also another documentation package apt-get install linux-doc but this is html.


1

The content is parsed directly (see also this) from the source .c files1: In order to provide embedded, 'C' friendly, easy to maintain, but consistent and extractable documentation of the functions and data structures in the Linux kernel, the Linux kernel has adopted a consistent style for documenting functions and their parameters, and ...


7

Your analysis so far is generally correct. The way a shell might set the stdin of a process to a pipe descriptor could be (pseudocode): pipe(p) // create a new pipe with two handles p[0] and p[1] fork() // spawn a child process close(p[0]) // close the write end of the pipe in the child dup2(p[1], 0) // duplicate the pipe descriptor on top of fd 0 ...


1

Yes, there is a man page in section 5 "File formats and conventions": man 5 proc It is surprisingly long, though - it describes 189 kinds of files in /proc.


4

Files in /proc do not have a file size in general, and are shown as having 0 size in ls -l, but you can read data from them anyway (see man 5 proc). Try, for example: zcat /proc/config.gz | wc or: $ ls -l /proc/cmdline -r--r--r-- 1 root root 0 Aug 4 10:16 /proc/cmdline Looks empty. But: $ cat /proc/cmdline | wc 1 5 114 it contains ...


1

If you didn't have an initramfs, you could do it with kernel parameters. Just add a random string as kernel parameter and then use /proc/cmdline as the key for your encryption. If it's not easy to add such parameters to your boot loader, the Linux kernel has a CMDLINE config option that lets you compile it in. (Note: it is possible for kernel parameters to ...



Top 50 recent answers are included