Just some Internet guy

He/him/them 🏳️‍🌈

  • 0 Posts
  • 7 Comments
Joined 2 years ago
cake
Cake day: June 25th, 2023

help-circle

  • I think P2P has stood the test of time. Torrents scale extremely well, any large scale video would have so many peers the server wouldn’t have to participate at all. These days most torrents easily saturate my gigabit connection no problem with just a handful of peers. Torrents tends to spread like wildfire.

    The main issue would be storage space, but I think a lot of YouTubers would be perfectly okay with spending $5-10 a month to pay for the storage costs with all the benefits you get from not being tied to YouTube’s ToS and policies. It’s a drop in the bucket compared to the earnings from sponsor spots.


  • You can return multiple A/AAAA records for the root, the TLD delegates the whole thing to your nameservers and it’s free to return whatever you want. Registrars actually do let you set records on the TLD’s zone, it’s called glue records and they’re typically used to solve the nameserver chicken and egg problem where you might want to be your own nameservers. Mine’s set that way:

    ~ $ drill NS max-p.me
    ;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 32318
    ;; flags: qr rd ra ; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
    ;; QUESTION SECTION:
    ;; max-p.me.    IN      NS
    
    ;; ANSWER SECTION:
    max-p.me.       3600    IN      NS      ns2.max-p.me.
    max-p.me.       3600    IN      NS      ns1.max-p.me.
    

    The me registrar will give you the IP for those two so you can then ask my server for where max-p.me really is.

    The bigger issue is usually there’s a bunch of stuff under your root domain like MX records, TXT records, potentially subdomains. That’s a huge problem if you need to CNAME the root to a hosting provider, as the CNAME will forward the entire domain including MX and TXT records. Cloudflare sort of works around that with server side flattening of CNAMEs, but that’s not standard. But if you have a www subdomain, then it’s a complete non-issue. And really, do you want to delegate your MX records to WP Engine?

    The main reason people went without the www is the good old “it looks cooler and shorter” while ignoring all the technical challenges its brings, and that’s probably why browsers now hide the www so that website designers don’t have to do this atrocity.




  • I also wanted to put an emphasis on how working with virtual disks is very much the same as real ones. Same well known utilities to copy partitions work perfectly fine. Same cgdisk/parted and dd dance as you otherwise would.

    Technically if you install the arch-install-scripts package on your host, you can even install ArchLinux into a VM exactly as if you were in archiso with the comfort of your desktop environment and browser. Straight up pacstrap it directly into the virtual disk.

    Even crazier is, NBD (Network Block Device) is generic so it’s not even limited to disk images. You can forward a whole ass drive from another computer over WiFi and do what you need on it, even pass it to a VM boot it up.

    With enough fuckery you could even wrap the partition in a fake partition table and boot the VM off the actual partition and make it bootable by both the host and the VM at the same time.


  • What you’re trying to do is called a P2V (Physical to Virtual). You want to directly copy the partition as going through a file share via Linux will definitely strip some metadata Windows wants on those files.

    First, make a disk image that’s big enough to hold the whole partition and 1-2 GB extra for the ESP:

    qemu-img create -f qcow2 YourDiskImageName.qcow2 300G
    

    Then you can make the image behave like a real disk using qemu-nbd:

    sudo modprobe nbd
    sudo qemu-nbd -c /dev/nbd0 YourDiskImageName.qcow2
    

    At this point, the disk image behaves like any other disk at /dev/nbd0.

    From there create a partition table, you can use cgdisk or parted or even the GUI GParted will work on it.

    And finally, copy the partition over with dd:

    sudo dd if=/dev/sdb3 of=/dev/nbd0p2 bs=4M status=progress
    

    You can also copy the ESP/boot partition as well so the bootloader works.

    Finally once you’re done with the disk image, unload it:

    sudo qemu-nbd -d /dev/nbd0