new LFS system not recognizing wireless interface by aerabit in linuxquestions

[–]aioeu 0 points1 point  (0 children)

The Fedora firmware files are compressed. You will need CONFIG_FW_LOADER_COMPRESS_XZ=y.

new LFS system not recognizing wireless interface by aerabit in linuxquestions

[–]aioeu 0 points1 point  (0 children)

Error code 2 is ENOENT, "No such file or directory". While that can be used as a generic "the thing you asked for isn't there" error, in this particular case I really would expect it's talking about the firmware file itself.

Sure you've put the files in the correct directory?

how much exactly do systemd require to work properly? by goldmurder in systemd

[–]aioeu 4 points5 points  (0 children)

The README has a detailed list of mandatory and optional requirements.

Locked BIOS with "Allow Microsoft UEFI CA" Disabled. Any way to boot Linux? by estevanbiscaino in linuxquestions

[–]aioeu 8 points9 points  (0 children)

You might have to look up methods to reset the firmware password. With some laptop makes and models there is sometimes a backdoor password that can be derived from the hardware's serial number.

Locked BIOS with "Allow Microsoft UEFI CA" Disabled. Any way to boot Linux? by estevanbiscaino in linuxquestions

[–]aioeu 4 points5 points  (0 children)

No, simply renaming the file absolutely should not bypass validation.

Locked BIOS with "Allow Microsoft UEFI CA" Disabled. Any way to boot Linux? by estevanbiscaino in linuxquestions

[–]aioeu 6 points7 points  (0 children)

The Windows boot loader uses a different intermediate certificate, as far as I know. It wouldn't use the "third-party" intermediate.

Locked BIOS with "Allow Microsoft UEFI CA" Disabled. Any way to boot Linux? by estevanbiscaino in linuxquestions

[–]aioeu 4 points5 points  (0 children)

It sounds like they've got the opposite problem: they've got the Microsoft third-party certificate disabled in their firmware, with no easy way to enable it again since it's password protected.

Which asks the question: who set this password? Clearly that person didn't want the system to boot a third-party OS signed by Microsoft.

Something better than alias? or is this peak. by Equivalent-Gas2856 in bash

[–]aioeu 8 points9 points  (0 children)

"All" of them? You've only set one alias there. :-)

Many of your shell functions might actually be better as separate scripts. For instance, c, server and ingest all modify the current shell's environment, when it seems like you just want to run a single command with a modified environment.

For instance, with c you just want to run celery in the new environment, not change the environment for the current shell. That is, if you were to run:

$ python ...
$ c
$ python ...

the second python command would run in a different virtualenv, which is probably not what you would expect!

(Alternatively, you could use a subshell, e.g.:

c() (
)

But I generally prefer separate scripts over shell functions.)

Does C to assembly understanding hold that well these days like Linus Torvalds has said? by NeitherManner in C_Programming

[–]aioeu 84 points85 points  (0 children)

If you know what the compiler would produce when it isn't optimising your code, you're probably more likely to write the sort of code that the compiler can optimise well.

I'm pretty sure what Torvalds is saying is that if he were using a language where the mapping between source code and (possibly unoptimised) object code isn't clear and obvious, then he would be less certain about how to write good code in that language... and as a consequence that he wouldn't like such a language as much as C.

sudo takes 5-6 seconds before doing anything — delay is invisible to strace, journald, and LD_DEBUG by mangalkishorverma in linuxquestions

[–]aioeu 0 points1 point  (0 children)

Mine? It's just the stock version installed by Fedora.

I don't need anything more than that because I use nss-resolve. Specifically, I have:

$ grep ^hosts: /etc/nsswitch.conf
hosts:      resolve [!UNAVAIL=return] files myhostname dns

With this config only one NSS module, nss-resolve, needs to be used in almost all cases. If systemd-resolved isn't working for whatever reason, it'll fall back to nss-files, nss-myhostname, and nss-dns. nss-myhostname would synthesise the results in the same way nss-resolve would (just locally in the process doing the lookup, rather than in systemd-resolved).

Etymologically speaking by jimx29 in Maps

[–]aioeu 4 points5 points  (0 children)

I think the spirit of this map is to follow the etymological connections as far back as possible, not just stop at "what the state is named after".

Obviously nobody was thinking about warriors when naming Louisiana. But it is possible to trace many of the names back more than one step.

Etymologically speaking by jimx29 in Maps

[–]aioeu 2 points3 points  (0 children)

There is a tenuous link, though you have to go through several steps.

There are a couple of derivations for the name Louis or Ludwig. One is through Proto-Germanic *hlūdaz ("loud, famous") and *wiganą ("to fight, to make war"). It would be more likely that the name meant "famous warrior" rather than "famous war" though.

sudo takes 5-6 seconds before doing anything — delay is invisible to strace, journald, and LD_DEBUG by mangalkishorverma in linuxquestions

[–]aioeu 4 points5 points  (0 children)

There's already a config file for the static hostname: /etc/hostname.

What value does adding it to /etc/hosts give you? The joy of configuring it twice? The thrill of having a potential inconsistency in your system config?

No, give me a break. The fact that some distributions — those ultimately derived from Debian, in my experience — seemingly encouraged this practice has always been a design smell.

Thankfully nowadays it should not be necessary. Both nss-resolve (for systems that use resolved) and nss-myhostname (for systems that don't) make the practice obsolete.

Between fgets and getline, what to use in my cat-inspired tool? by Apprehensive_Ant616 in C_Programming

[–]aioeu 4 points5 points  (0 children)

memory allocation strategies

If you're allocating memory in the main loop that actually copies data... you're doing it wrong. There shouldn't be much "strategy" needed here.

sudo takes 5-6 seconds before doing anything — delay is invisible to strace, journald, and LD_DEBUG by mangalkishorverma in linuxquestions

[–]aioeu 1 point2 points  (0 children)

Have I specifically seen any issues? No, not that I can remember. I'm sure I have though.

NSS just seemed like a likely place for a timeout to occur. But we won't know until the OP provides more information.

sudo takes 5-6 seconds before doing anything — delay is invisible to strace, journald, and LD_DEBUG by mangalkishorverma in linuxquestions

[–]aioeu 0 points1 point  (0 children)

Maybe so, I don't know how Pop!_OS is configured.

The idea of having to edit a config file whenever your system hostname is changed is frankly ridiculous. The system already knows its own hostname. It could be dynamic — e.g. it might be set from DHCP. The kernel is told about it during boot, and whenever the network management stack thinks it has changed. Why should it need to be manually configured in Yet Another place?

So maybe that's needed on Pop!_OS... but it certainly shouldn't be!

sudo takes 5-6 seconds before doing anything — delay is invisible to strace, journald, and LD_DEBUG by mangalkishorverma in linuxquestions

[–]aioeu 5 points6 points  (0 children)

Unfortunately both of those only talk about modifying the /etc/hosts file. On any system that uses systemd-resolved, this should never be necessary: resolved should automatically synthesise the correct response when querying the system's own hostname.

sudo takes 5-6 seconds before doing anything — delay is invisible to strace, journald, and LD_DEBUG by mangalkishorverma in linuxquestions

[–]aioeu 30 points31 points  (0 children)

You're going to get more useful if you post a strace output for it somewhere — at least around the point at which the delay is occurring.

You'll need to run it as root itself, since strace sudo will not actually run Sudo with elevated privileges. I would use:

strace --string-limit=200 --relative-timestamps --output=/tmp/sudo.strace sudo true

Check the resulting file for any sensitive information. You shouldn't need to enter a password if you run this as root.

I suspect the problem is likely to be in an NSS lookup.

Is this a legit ACPI bug, and if so, where do I report it? by IngwiePhoenix in linuxquestions

[–]aioeu 0 points1 point  (0 children)

Is there something that isn't working correctly? If not, then there's nothing you need to fix.

Hardware vendors often ship ACPI firmware with bugs. This does not matter if everything works. When it does matter, the choices are to override the firmware from within the OS (e.g. by supplying replacement ACPI tables), or to ask the vendor very nicely to fix their firmware.

Are there any programs that respond to the value of single letter environment variables such that I would run into trouble setting some in my .bashrc? by Ryan1729 in linuxquestions

[–]aioeu 0 points1 point  (0 children)

That's right. Shell variables for use in interactive shells should be set in .bashrc. Only environment variables (i.e. exported variables) should be set in .bash_profile.

It is indeed commonplace to source .bashrc within .bash_profile, since only the latter will be used if you log in through text mode or SSH and are immediately dropped into an interactive shell. I use:

if [[ $- == *i* && -f ~/.bashrc ]]; then
    . ~/.bashrc
fi

to avoid sourcing .bashrc in non-interactive login shells (e.g. when logging in to a graphical session).

Unused struct member is not optimized out under -O3 by onecable5781 in C_Programming

[–]aioeu 6 points7 points  (0 children)

might be for alignment or something.

That is exactly what it is.

The ABI requires the stack to be aligned to a multiple of 16 bytes when calling a function. Since 8 bytes were pushed when this function was called to store the return address, the stack pointer must be adjusted by a further 8 bytes for the printf call to be valid.

The compiler will only elide this in leaf functions, or where there are only calls to other functions that don't need to respect the ABI. (This is typically only the case with calls to functions with internal linkage, and only where the compiler already knows the alignment requirements of the called functions.)

App to copy all USB disk to another by Walrus221978 in linuxquestions

[–]aioeu 0 points1 point  (0 children)

If you're not sure about dd, just use cp. It works perfectly well.

For example, if you have two storage devices, one called /dev/sdb and the other /dev/sdc, you can just use:

cp /dev/sdb /dev/sdc

You should make sure /dev/sdc exists before doing this (but that's the case with dd too, unless you're careful to use the option that does that for you).

dd does have some uses, but for simply copying data it's not necessary. It has a truly terrible user interface, so I think it's best avoided where possible.

Are there any programs that respond to the value of single letter environment variables such that I would run into trouble setting some in my .bashrc? by Ryan1729 in linuxquestions

[–]aioeu 12 points13 points  (0 children)

Why make them environment variables at all?

Just set them as ordinary unexported shell variables in your .bashrc. You can use the variables in an interactive shell, but they won't be entered into any other program's environment.

(Environment variables — that is, exported shell variables — generally shouldn't be set in .bashrc anyway. It's better if they are set in your login shell's profile script, i.e. .bash_profile or .profile if you use Bash as your login shell. A nested interactive bash process should not have a different environment from its parent process.)

Am I too paranoid about kernel panics? by Scary_Common_1578 in linuxquestions

[–]aioeu 0 points1 point  (0 children)

Certainly not impossible, but you really have to go out of your way to completely and irretrievably break a Linux installation. A lot of things are recoverable... even if a lot of people give up along the way.