Skip to content

u/2brainz

In this archive from Jan 2011 to May 2023

8
posts
779
comments
0
media
5.4k
score

I wouldn't know if or where this would be documented.

Anyway, the initramfs is just like your normal root filesystem, albeit way more minimalistic.

The mkinitcpio hook has two files: the install file and the runtime hook file. The install file copies files from your root filesystem into the compressed initramfs image. The situation with the runtime hook file is more complicated.

If you use the base hook, the /init file is a shell script that will (among other things) execute all the runtime hooks in order.

If you use the systemd hook, then /init will be a symlink to systemd. This means that the runtime hooks will not have any effect on startup. If you want to do anything useful in this mode, you have to install and enable the correct systemd units. Installing a unit means copying the unit file in the install hook. Enabling it means creating the correct symlink in the install hook.

Back to your example: the runtime hook starts dbus and bluetoothd and ensures they are killed before switching to the real root. To do the equivalent with systemd, you have to add and enable the appropriate unit files for dbus and bluetoothd. For more details, you can consult the extensive systemd documentation.

1 points

So, the base+udev hook is basically like the old pre-systemd init scripts. When encrypt is called, it will poll the encrypted device and unlock it as soon as it exists. Since this is just a single device, it probably works fine and for the simplest case is likely reliable.

The problems start when this device depends on more than just a hard drive partition. Things like LVM layered on encryption layered on LVM are incredibly hard to get right.

The systemd method is event-based, just like your actual system and thus allows you to model more complex situations.

6 points

I'm going to do one-word quotes as well, just so the context is always as as clear in your reply.

purist

Nice way to jump to conclusions.

everything

Not everything. The systemd core daemon. Don't put words in my mouth.

And as to why: systemd is a critical piece of the system, it must run with full privileges and it has had its share of critical bugs due to memory safety issues.

Linux

And that is a bad thing. You need to learn a specific language dialect instead of the language as everyone else uses it.

manpower

Sure, that's why nobody has done it yet.

standard

Rust has a one language that everyone agrees upon. That is not written in a standards document (which nobody would read anyway), but still everyone agrees on the language. C has a standard, and yet projects tend to write "my C". Don't claim that this is a good thing.

ABI

This does not apply to systemd. Please don't try to use off-topic arguments to try to discredit what I said.

ambitions

Rust is not a person, it's a language. And the only ambition of the Rust community is to create an efficient, safe and developer-friendly language. If you think that ambition is too high, then you might as well sit in a cave and hit rocks together, because creating tools is also too much ambition.

And next time you try to argue something: 1) don't try to put words in their mouth that they didn't say, 2) don't use off-topic arguments to strengthen your point, 3) actually quote what you are referring to.

1 points

The linked comment completely neglects the feature-creep in the larger systemd project. I stand by what I said about systemd (the daemon) itself.

One common criticism is about logind: most desktops now depend on logind, and logind depends on systemd. There is no independent implementation of logind that is init system agnostic. There are many daemons in the systemd project whose use case I consider questionable and which should be separate from systemd.

Another criticism is that systemd is not written in standard C, but uses gcc-specific extensions. In particular, it heavily relies on RAII-style cleanup. That in itself is a good thing, but instead of using non-standard C, it would have been appropriate to use a subset of C++. Today, systemd should be rewritten entirely in Rust, using async and probably a custom lightweight async executor. It's a perfect fit for the style in which systemd is designed internally.

7 points

More links:

module-null-sink: Create a virtual sink to play your audio to. You can use a "Monitor of ..." device to capture from it.

module-loopback: Route audio from a source (microphone) to a sink.

module-combine-sink: Combine two sinks into one.

You can now route your microphone from your microphone to a sink using loopback, combine that sink with a null sink and then capture from the monitor of the combined sink.

13 points

Thanks.

So rather than try to maintain a likely unused set of code, I'll just aggressively remove it, and see if anybody even notices.

Funny that I did not notice. I guess if there would be much interest in the text console, we would see userspace fb console implementations that are actually maintained.

2 points

I seem to be the only one that runs Arch on a Pi 3A+. The A version is much smaller, has only 1 USB port and lacks Ethernet. Since the 3 has WiFi, it is still pretty useful.

I use it with a USB DAC and librespot to play music.

2 points

Some DEs like you to run NetworkManager instead of systemd-networkd, or they will complain they can't manage the network for you. I don't know about KDE.

That's because networkd is mainly useful for static network setups. For anything dynamic, like wifi with automatic fallback to LAN, use NetworkManager. You still need to run networkd (with no configuration) so that timesyncd knows when you are connected.

7 points

But yeah, it requires physical access

First of all, let me get the most important point out of the way: Attacks through physical access is the only thing that hard drive encryption protects against. So, if you don't worry about physical access, then you don't need to encryption the hard drive.

unencrypted /boot leaves open the possibility that they can tamper with your boot image / kernel. I think this would allow much more than key logging.

At some point, the kernel and initrd need to be decrypted so the code can be executed. This means that some piece of software needs to supply the decryption key. In the case of encrypted /boot, that is usually the boot loader. So, the keylogger attack is still possible, you just need to compromise a different piece of software.

Since encryption is a tool to ensure secrecy, and the kernel/initrd contain no secrets, encrypting /boot is simply unnecessary.

If you want to protect against evil maid attacks, you can:

  • Use secure boot to verify the integrity of your boot loader, kernel and initrd. Manipulating the hardware to circumvent this protection is extremely hard and expensive (I once read an article by a scientist or engineer who extracted the private key from an outdates TPM. It took him tens of TPMs that he broke in the process and cost insane amounts of money. So even if someone can afford it, it is very likely to fail).
  • Keep the kernel and initrd separate from the computer (on a flash drive that you keep with you at all times).

Keep in mind that if someone wants to break your encryption, there is a more likely attack scenario: https://xkcd.com/538/

18 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.