data1701d (He/Him)

“Life forms. You precious little lifeforms. You tiny little lifeforms. Where are you?”

- Lt. Cmdr Data, Star Trek: Generations

  • 1 Post
  • 98 Comments
Joined 2 years ago
cake
Cake day: March 7th, 2024

help-circle



  • I also recommend dd on a live USB, but with some advice.

    First off - and I’m really surprised nobody’s warned you - be EXTREMELY CAREFUL with dd; it is a very powerful tool, but with great potential for data loss. Check your command over and over again to make sure it’s doing what you want before running it, and make sure you have a backup beforehand; it will happily mow over any disk you tell it. Also, do it when you’re fully awake, not at 1 AM or something.

    I would call myself an experienced dd user, and even I messed up once recently; I was trying to create a bootable USB when I was really tired. Instead, I overwrote a drive. Luckily, it wasn’t my root drive, and I had a full backup of its contents, so I was able to reformat the drive and restore from backup.

    Also, don’t run a bare minumum dd command like dd if=/dev/whateverdevice1 of=/dev/whateverdevice2; it’s going to be an absolute pain in the rear.

    dd bs=1M oflag=sync status=progress if=/dev/whateverdevice1 of=/dev/whateverdevice2

    • bs=1M: The size of block it tries to copy at a time. Play with this a bit, as different drives have different optimal block sizes.
    • oflag=sync: Basically, most operating systems don’t actually write data to the drive right away, but store it in a buffer in RAM to be written later. This is usually fine, but sometimes, you want to be certain that data has actually been written to a drive; this flag turns off that buffering so that when dd is done, the data will for sure actually be on the drive. In lieu of this, you could also just run the sync command afterwards, which forces it to write the current buffer to disk, but I prefer the dd way. It should also do it automatically during shutdown, but I have had cases where a system hangs during shutdown and I’m not certain if syncing is done or not.
    • status=progress: Gives the command a progress bar. It’s just really darn convenient and allows you to see how much time is left, how fast the drive is going, etcetera. I don’t know how anyone uses dd without this. Otherwise, it just shows nothing, and you’re left anxiously wondering when it will be done.
    • if is input drive, of is output drive. I prefer lsblk for looking at the list of drivers.

    You’ll usually need to run dd with sudo.

    Once you do a successful copy, you’ll need to extend your BTRFS partition using GParted or similar. If you have a partition after your main one, like swap, you’ll need to delete the swap partition before extending, then recreate the swap partition and update fstab accordingly.



  • Also, depending on the time of year, some E series models can drop to pretty low prices on clearance. E series used to suck, but they’ve upped the build quality and they’re pretty good budget Thinkpads now. Most things should be swappable (check Hardware Maintenance Manual to be sure), so back in 2024, I was able to snap an E16 gen 1 with 8 GB RAM 256 GB and upgrade it to 24 GB RAM, 2 TB storage for not too expensive.

    The really nifty thing about the E16s is they have dual NVME drive slots; I just kept the OEM 256 GB drive in it and eventually threw a Windows 11 LTSC install on it, as I unfortunately have to use Windows to do a few assignments, which luckily only come up every couple weeks, usually.



  • I think I have a bit more nuanced feelings on the MIT license. If I actually write something useful, GPL all the way, baby!

    However, I don’t necessarily think the MIT license is the embodiment of evil; I find GPL a bit overkill for hobby projects. I’m not talking things that have the potential to become critical pieces of infrastructure like a kernel or something; I’m more talking about emoji pickers or hacky little Python scripts that would be pretty useless to a Fortune 500. In the minute chance someone actually cares about my silly little toy to fork it, I see very little point in encumbering it with the full heft of a copyleft license and stopping them from doing whatever the heck they want.









  • That’s precisely why secure boot and TPMs exist - the TPM can store the keys to decrypt the drives and won’t give them unless the signed shim executable can be verified; the shim executable then checks the kernel images, options, and DKMS drivers’ signatures as well. If the boot partition has been tampered with, the drive won’t decrypt except by manual override.

    The big problem is Microsoft controls the main secure boot certificate authority, rather than a standards body. This means that either a bad actor stealing the key or Microsoft itself could use a signed malicious binary used to exploit systems.

    Still, it’s at least useful against petty theft.

    TPM sniffing attacks seem possible, but it looks like the kernel uses parameter and session encryption by default to mitigate that: https://docs.kernel.org/security/tpm/tpm-security.html