News for hackers. Stuff that matters.
Re:Systemd needs official documentation on best practices by jandrese on Friday November 08, 2019 @04:30PM (#21487018)
I spent the time to learn it and yeah, it's pretty nice when it's working.

The problem is of course when you need to do something that isn't supported by SystemD, in which case you're in for a world of hurt as the system constantly fights you.

For example, I had a requirement to make sure some machines randomized their MAC addresses when connecting to untrusted WiFi in Ubuntu 14. Turns out this functionality was broken in NetworkManager and trying to go around its back was a huge huge headache because the system was relentless in checking the MAC of the interface and setting it back to the physical one.

There are other times where it bites you in the ass too, like writing a raw image to a SD card. In the old days you would just dd the image onto the card, but you can't do that anymore because shortly after you write the filesystem header to the card SystemD will notice the new filesystem attempt to mount it, killing off your dd process.

I always try to work with SystemD now because it's so much harder to fight it.

Re:Systemd needs official documentation on best practices by pritambaral on Saturday November 09, 2019 @09:40AM (#21491779)
> ... because shortly after you write the filesystem header to the card SystemD will notice the new filesystem attempt to mount it, killing off your dd process.

Could you elaborate on this? I develop an embedded OS which regularly flashes itself while running systemd (we support two methods: 1. write partition table to disk, write fs header to partitions, explicitly mount fs and write file content to fs; and 2. dd pre-built image) and I have never seen this happen. We have also flashed (via dd) our images onto cards from within Ubuntu 16.04 and 18.04 and never seen this.

Re:Systemd needs official documentation on best practices by Skunkleton on Friday November 08, 2019 @06:25PM (#21488009)
Are you talking about systemd-networkd or Network Manager? Those are separate projects, and I agree that Network Manager is garbage. Still, you don't have to take systemd wholesale. You can still use ifupdown if that is your jam.

In your specific case, if you were using systemd-networkd you could specify MACAddressPolicy=random in your link file to achieve what you wanted.

Re:Systemd needs official documentation on best practices by loudmax on Friday November 08, 2019 @04:41PM (#21487129)
To be fair, you can run systemd without NetworkManager or an automounter. For network access, you can run dhcpcd with systemd (on Arch anyway). I've never wanted an automounter on any system.

Likewise, systemd doesn't prevent you from running ALSA instead of PulseAudio. The flexibility is there. Better documentation/best practices would be helpful.

Re:Systemd needs official documentation on best practices by Twirrim on Friday November 08, 2019 @06:30PM (#21488052)
Ubuntu 14 doesn't use systemd. It was the last LTS prior to the systemd switch.
Re:Systemd needs official documentation on best practices by jandrese on Friday November 08, 2019 @10:03PM (#21489301)
Ack, I misspoke. Ubuntu 16 was the one with the busted MAC randomization. It worked in 14, but was broken in 16 due to the SystemD deployment.

https://bugs.launchpad.net/ubuntu/+source/network-manager/+b...

Re:Systemd needs official documentation on best practices by rob-olmos on Friday November 08, 2019 @04:52PM (#21487229)
What was the solution for the SD card imaging?
Re:Systemd needs official documentation on best practices by jandrese on Friday November 08, 2019 @05:51PM (#21487755)
Download a bloated electron app to do the imaging, like you're on Windows.

https://www.balena.io/etcher/

Re:Systemd needs official documentation on best practices by wibble10 on Friday November 08, 2019 @05:58PM (#21487805)
Eurgh. What have we done? :(