@dan@upvote.au avatar

dan

@dan@upvote.au

Aussie living in the San Francisco Bay Area.
Coding since 1998.
.NET Foundation member. C# fan
d.sb
Mastodon: @dan

This profile is from a federated server and may be incomplete. Browse more on the original instance.

dan, (edited )
@dan@upvote.au avatar

Docker images should really be distroless most of the time. There’s way too much junk in the majority of Docker images when in most cases, you really just need your app and whatever dynamic libraries or runtimes it requires (if you can’t statically compile it). You don’t need an OS in there!

Also there’d be way more servers running Debian compared to Ubuntu.

dan,
@dan@upvote.au avatar

I assume there’s an advantage to the binary formats though. More efficient in terms of storage size? Easier to quickly search by a particular field even in huge files? Maybe something like that. (I genuinely don’t know)

dan, (edited )
@dan@upvote.au avatar

Debian lets you switch and AFAIK it mostly works fine. They provide both sysvinit and runit as alternatives. Packages are only required to provide systemd units now, however a lot of core packages still provide sysvinit scripts, and Debian provides a package orphan-sysvinit-scripts that contains all the legacy sysvinit scripts that package maintianers have chosen to remove from their packages.

That’s just in the official repository, of course. Third-party repos can do whatever they want.

dan, (edited )
@dan@upvote.au avatar

Or, asked another way, does systemd load the Linux kernel, and if not, what does?

Immediately after the BIOS/POST, the first thing that starts is the boot loader. This is usually a piece of software called GRUB. There’s a part of GRUB in the Master Boot Record on the drive, that the loads the rest of GRUB from /boot. /boot has to be a basic partition so that the MBR code can mount it, so for example if you use something a bit fancier (like LVM) then you’ll usually have a separate small ext2 or FAT partition just for /boot.

GRUB shows a list of available kernels, and other operating systems (if any are installed), based on a config in /boot.

Once you select a kernel to boot (or wait a few seconds for it to automatically choose the default option), it starts loading the kernel. There is a small disk image called the “initial ramdisk” in /boot, usually with a name like initrd or initramfs. This is a small ramdisk that contains all the drivers needed to mount your root partition - for example, drive drivers (NVMe, SATA, etc), file system drivers (ext4, ZFS, XFS, etc), LVM, RAID drivers if needed, and so on. If the root disk is on an NFS network share (not as common any more, but still doable), it also needs to contain network drivers for your network card. It also contains a few basic utilities, usually provided by BusyBox.

Some Linux distros (such as Debian) build a custom initramfs, whereas others (like Fedora) have a generic one containing all possible drivers.

The initial ramdisk then mounts the root partition and hands control over to the Linux kernel, which starts actually booting the OS. The very first process the kernel starts running is the init process, which these days is usually systemd but can be a different one like sysvinit or runit.

Hope that helps :)

dan,
@dan@upvote.au avatar

Friendly reminder if you prefer dealing with JSON - YAML is a superset of JSON, so any valid JSON is also valid YAML.

dan, (edited )
@dan@upvote.au avatar

Create a separate partition for /home so you can change distro without having to backup and restore the files in your home directory. Just be sure to NOT format that partition in the installer for your new distro. Take a backup anyways.

dan, (edited )
@dan@upvote.au avatar

stares at Debian Bookworm VPS that’s been upgraded in-place and hasn’t been reformatted since Debian Etch (2007)

dan,
@dan@upvote.au avatar

For this particular VPS, I’ve moved provider several times, but every time I just use Clonezilla to clone the disk over the internet. Maybe I should do a fresh reinstall one day. There’s just so much random stuff running on it though.

dan,
@dan@upvote.au avatar

I did this in my development environment at work! Luckily they take backups every 15 minutes.

dan,
@dan@upvote.au avatar

promise of write once run anywhere

PWAs are great if they’re written well, especially if they allow offline access.

There’s platforms like React Native where the apps are native on each platform (they use native UI widgets). You can’t just run the same code, but you can reuse probably 90-95% of code across platforms.

dan,
@dan@upvote.au avatar

Upgrading/tinkering doesn’t void your warranty. Explicitly.

This is generally true with everything in the USA (covered by the Magnuson-Moss Warranty Act) even though companies are sketchy about it and try to convince people that it’ll void their warranty. The manufacturer has to prove that your upgraded part was the direct cause of the issue you’re trying to claim under warranty.

dan,
@dan@upvote.au avatar

I love companies like that. The world needs more of them.

My PC is hacked

I just received a call from an indian microsoft technician. He informed me that my PC is sending a ton of error messages to microsoft. Most likely it has been hacked, and he would help me by remoting in and fixing the problem for me. I just wonder… Is it my PopOs or my Manjaro PC that sends all this info to microsoft?

dan,
@dan@upvote.au avatar

Ah yes, I remember back in the day we had to build WINE with unofficial patches to get malware to work. How times have changed.

dan, (edited )
@dan@upvote.au avatar

there are no protections against creating multiple accounts to upvote your own posts

They don’t even have to be real accounts. Lemmy uses the ActivityPub protocol, and nothing’s stopping someone from creating an ActivityPub server that federates with a Lemmy instance and spams upvotes from randomly-generated usernames. The server could just pretend that every username is a valid one.

Of course, I think something like that would be defederated pretty quickly.

dan,
@dan@upvote.au avatar

This looks great! Thanks for the recommendation.

I like Netdata because it’s web based, has a large number of metrics, you can pan/zoom the graphs, and it doesn’t use much CPU power. Console UIs are nice but they’re more limiting than something web-based.

dan,
@dan@upvote.au avatar

I wish Microsoft kept Windows as a paid product, instead of making it effectively free (with things like free upgrades from older versions) and sticking ads all over the place.

dan,
@dan@upvote.au avatar

Do you mean products like their VPN? They really need the revenue to try and become more independent from Google. Right now something like 90% of their income comes from a deal with Google to make Google the default search engine.

Thanks to dust I deleted a 70 gig file on my drive

Dust is a rewrite of du (in rust obviously) that visualizes your directory tree and what percentage each file takes up. But it only prints as many files fit in your terminal height, so you see only the largest files. It’s been a better experience that du, which isn’t always easy to navigate to find big files (or atleast...

dan,
@dan@upvote.au avatar

Try dua. It’s like ncdu but uses multiple threads so it’s a lot faster., especially on SSDs.

dan,
@dan@upvote.au avatar

Good content will still be surfaced on its own

Not if you don’t do basic SEO at least… Things like ensuring that pages have:

  • Good title tags, with the most important parts (post topic) at the start of the title
  • Meta tags - description, keywords, canonical URL, etc
  • Open Graph tags - for when links are shared on social media sites
  • been optimized to load quickly - Google prioritises faster sites above slower ones

Plus the site should have a robots.txt and sitemap XML that’s been submitted to Google Webmaster Tools.

dan,
@dan@upvote.au avatar

Like, if a web crawler sees a Beehaw post, and then seees Lemmy.ml’s mirrored page of that same post, could it just show up as two different results? Could it work against the SEO in that it gets marked as “duplicate” or “spam” content in some way?

The ideal solution is that the page has a canonical tag, telling search engines what the main URL for the content is: ahrefs.com/blog/canonical-tags/. I don’t know if Lemmy already does this, nor do I know how well canonical tags work cross-domain as I’ve only ever used them for content on the same domain.

dan,
@dan@upvote.au avatar

Yeah I’m confused about that too. I drink ice water all the time when it’s hot… But I live in an area with a mild climate, where 27C (80F) is considered hot.

dan,
@dan@upvote.au avatar

Google Maps is best-in-class IMO. Some other services come close but aren’t quite as good.

dan,
@dan@upvote.au avatar

HERE maps is pretty good… It’s one of the only major competitors to Google Maps. I’ve used their APIs in the past.

dan,
@dan@upvote.au avatar

My wife (in her 30s) got shingles and doctors / people at the pharmacy said the same thing. “only people over 50 get that!”

She was in a lot of pain. 0/10 would not recommend getting shingles.

dan,
@dan@upvote.au avatar

It’s what Elon is missing from the code of Tesla’s self driving mode

<pre style="background-color:#ffffff;">
<span style="color:#323232;">if (goingToMalfunction) {
</span><span style="color:#323232;">  dont();
</span><span style="color:#323232;">}
</span>
  • All
  • Subscribed
  • Moderated
  • Favorites
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #