Reputation
20,553
Top tag
Next privilege 25,000 Rep.
Access to site analytics
Badges
12 73 104
Impact
~2.0m people reached

Feb
28
comment How do I begin with building a Linux system from scratch?
You can configure grub to boot a Linux kernel. There are many places to find out how to do that; the most authoritative of which would be the official manual(gnu.org/software/grub/manual/grub.html). Once the kernel boots, it will attempt to start a program located at /sbin/init (unless configured otherwise). This program can do anything you want. There are some common options to use for /sbin/init, such as Upstart, sysvinit, systemd, or just bash. From there, that program is in control. If it ever exits, the kernel will crash, so it should be capable of starting other programs.
Feb
20
comment using parallel to process unique input files to unique output files
@JJones - monitor_workers is just like process_file - it's a function that does whatever you want. About the monitor - you were right; it should save the pids of its workers (so it can send a kill signal) and the counter needs to be incremented when it starts a worker. I've edited the answer to include that.
Feb
17
comment Help with getting wifi up and running in Arch Linux on Mac Mini 3,1
@TomIngram You'll have to use wpa-supplicant (wiki.archlinux.org/index.php/WPA_supplicant). You should try and do as much as you can, and when you run into a problem, ask a new question.
Feb
17
comment How to stop a program running as daemon
I would add conditions to your statement. Don't use kill -9 unless you have tried other relevant signals or unless you know what the consequences of not allowing that process to terminate cleanly are and they are acceptable.
Jan
31
comment What can make passing init=/path/to/program to the kernel not start program as init?
Actually, it checks execute_command first, which comes from the kernel command line init= parameter. If it can't execute it, it prints a warning and tries to run init in various locations. This is in init/main.c in the function init_post(). I looked through the kernel printk messages and found the warning in my kernel's output, so now I have to figure out why it can't start /bin/sh or anything else that I try to start.
Jan
31
comment What can make passing init=/path/to/program to the kernel not start program as init?
It's not any distro - it's my own build; which is why I'm trying to debug the init scripts.
Jan
28
comment What is Bash's string{ending1,ending2} construct called and what is the equivalent in zsh?
Very strange; it's working for me now. I tried it before and it gave me some error, so I've been avoiding it for a month or so.
Jan
28
comment How can I low-level format flash memory in Linux?
It's not extraordinarily wrong to write /dev/zero to a flash device. The only advantage that writing 1s to the device gives is that you might get slightly faster write times the next time you write to the disk since it doesn't have to be erased first - and that depends on the flash translation layer being smart.
Jan
21
comment Strange behaviour in recursive copy
I think you have an extra cp -r 1/* 2/* in there - it's done twice in a row with (apparently) different results. It should always complain about not finding a 2/* because the shell can't expand that glob - nothing matches it. And the contents of 1 is not copied to f in this example.
Jan
21
comment Configure reboot on Linux kernel panic
Yes, I'll be booting either to a different kernel, or giving the kernel a different rootfs path. There is a variable in the bootloader's config that gets changed when userspace boots successfully; if it doesn't change, it knows to try something different. I was hoping for something more than just the kernel command line for this because the bootloader's config can be modified by the Linux userspace. If there's a problem, it's likely that userspace started writing, then the device powered off; and there is a fallback default config for that; I'm still looking for the most solid I can get this.
Jan
21
comment Configure reboot on Linux kernel panic
Yes, I do have a watchdog. I'm just putting as many safety nets in place as possible.
Jan
20
comment Configure reboot on Linux kernel panic
grub is not on all systems; the one I'm working with is not using grub. My bootloader's config is stored in flash.
Jan
20
comment Configure reboot on Linux kernel panic
I'm looking for a kernel config option here, not something from userspace. Specifically, if for some reason, it can't mount the root filesystem (or for some other reason, userspace never comes up), I need it to reboot.
Nov
16
comment How to find a file in the filesystem from the command line?
There are options in some shells that pass the stars along to the program if they don't happen to match anything. Try creating a file in your current directory that is matched by that pattern, and try the command again.
Nov
16
comment How to find a file in the filesystem from the command line?
You need to quote or escape the *s to prevent the shell from interpreting them.
Nov
6
comment How to run a command when a directory's contents are updated?
incrond may also be of interest.
Nov
2
comment What's the difference between udev and hald?
From hal-spec: HAL can notify other peers on the message-bus when devices are added and removed as well as when properties on a device are changing.
Oct
30
comment Testing if a process is running via if and -z
Thanks, @Arcege; I edited it included `> /dev/null'.
Oct
30
comment How do I recursively delete directories with wildcard?
Make sure to either quote or escape the *, otherwise the shell will expand it, and find will not see it. And as I understood the question, you don't want to get the directories, so make sure to include ! before -type d to tell find not to match directories.
Oct
29
comment Are there any “scp -p” just like “cp -p”
I can't speak for others, but I suspect the downvotes are because this information is easily found by using man, which should be the first source of information when wanting to know more about a utility. I would encourage people not to downvote a question for that reason. See the discussion here: meta.unix.stackexchange.com/questions/203/…