HN user

yuuta

434 karma

Just a student interested in computer science. Use Java / C. https://blog.yuuta.moe

Posts5
Comments50
View on HN

That's a pretty good article, but I expect more in-depth information on booting modern Intel CPUs ... I am very interested in modern UEFI / BIOS firmware development and how do they bring up x86 CPUs, but unfortunately there are very little source (I guess, except for EDK2), and the majority (?) of x86 firmwares are proprietary. Booting x86 is much more complicated than writing a linker script with a vector table for your microcontroller ... so, this seems very interesting.

I have been running my homelab for 2 ~ 3 years, and I never considered rpi to be one of the servers ... It is just for toys or some "high school robots" stuff, with 0% availability and are very fragile. How many times your SD card fail / filesystem break / undervolt occurs / accidentally short-circuit? If you want to have a host running Linux 24 * 7, go with a used Thin Client on eBay (they are at least x86). If you are like me who want to build a rack at home, go with some used PowerEdge / ProLiant gears from eBay. They do way better things than your Pi (with BMC, Xeon cores, and ECC memory, possibly), and they are cheaper as well (my PowerEdge R520 servers only cost less than C$200 each). These machines have proper CPU, hard drive, and power supply. Do not use a Pi unless you are building some IoT experiments that require GPIOs.

It may be better if we have something similar to (pseudocode) for kernel APIs:

  struct uptime_t u = {
  
      .time = 0
  
  };

  ioctl(open("/proc/uptime"), GET_UPTIME, &uptime);

Indeed. Parsing files is a less robust way compared to calling some APIs or at least parsing some files with a schema (e.g. JSON or XML). For example, uptime(1) on Linux:

% strace uptime 2> /tmp/strace && grep proc /tmp/strace

17:35:24 up 3 days, 7:47, 1 user, load average: 2.29, 1.85, 1.56

openat(AT_FDCWD, "/usr/lib/libprocps.so.8", O_RDONLY|O_CLOEXEC) = 3

openat(AT_FDCWD, "/proc/self/auxv", O_RDONLY) = 3

openat(AT_FDCWD, "/proc/sys/kernel/osrelease", O_RDONLY) = 3

openat(AT_FDCWD, "/proc/self/auxv", O_RDONLY) = 3

openat(AT_FDCWD, "/proc/uptime", O_RDONLY) = 3

openat(AT_FDCWD, "/proc/loadavg", O_RDONLY) = 4

I don't see the whole point. It's like creating yet-another-ntp-implementation while other well-known implementations are known to be working good and safely on billions of devices.

It is easier to report a security issue to ntpd or chrony instead of creating a new one.

Sshfs Is Orphaned 4 years ago

Thank you. I'm using sshfs every day to remotely access my computer and servers from my laptop. Although it's slow, it works. I'm considering to switch to NFS instead.

First, setup a pair of tunnels. There are multiple tutorials doing this. You could check Arch Linux Wiki of how to. On my setup, I assigned a pair of /31 addresses to each side just for the internal communication.

Then, if you want to use IPv4 NAT, set up SNAT and DNAT. I'm taking Linux's iptables for an example: on the VPS:

iptables -t nat -A PREROUTING -d <VPS Public IP>/32 -p tcp --dport port -j DNAT --to-destination <IP of another side of the WireGuard tunnel> iptables -t nat -A POSTROUTING -o <VPS Internet facing NIC> -j MASQUERADE

The first statement sets SNAT on IPv4 TCP (UDP is also possible) on a specified port. All packets going into this machine (dst = VPS public IP) will go into the other side of your WireGuard tunnel. -d <VPS Public IP>/32 makes sure that the packets forwarding to the VPN side won't get NATed. If you need multiple ports or protocols, just duplicate this line.

The second statement sets DNAT on the VPS. It makes the packets from your VPN side goes to the outside (sorry I'm not an expert in networking principals so that's my understanding).

On your local side, you just set up the tunnel and set your machine's default gateway to your VPS's tunnel IP address. Make sure you add a static route to your VPS's public address (WireGuard Endpoint) if you are connecting WireGuard using an IPv4 endpoint or it will get routed to your tunnel and you will disconnect.

I also sometimes setup IPv6 tunnels without NAT. On the VPS I just setup a WireGuard interface with /64 and assign each peer a /128. No NAT is needed for this case.

Also:

* Windows POSIX Subsystem: WSL has similar features, but not exact what the POSIX Subsystem is.

* Windows OS / 2 Subsystem: Killed.

* Multipoint Server: Killed in server 2016.

* Hyper-V RemoteFX

* WDS boot.wim deployment: Killed in server 2022 and Windows 11, although MDT provides a much better solution.

* TFS: MS wants you to use Azure DevOps.

* Hyper-V Server: The free ESXi alternative. MS wants you to use Azure, so it is killed with the release of server 2022.

* Microsoft Security Essentials: Killed in Jan. 2020, and its signature updates will stop in 2023.

* Windows CE: Replaced by Windows IoT

* Aero: Such a beautiful effect. Killed in Windows 8.

Starting from Windows 8, Microsoft started to bully consumers. Look at all the "cloud" contents, "tips", telemetry, Microsoft Accounts and advertisements built in Windows. They are for consumer editions only (Home and Pro, and sometimes Pro Workstations I guess?)

Disabling them requires upgrading to Enterprise or Education (basically Enterprise for schools).

Starting from a later Windows 10 feature update, Home users were forced to login their Microsoft account (for MS to steal your data by having you "cloud connected", right?) during OOBE. Now, Windows 11 Pro users were in the list.

I always recommend people to use the Enterprise edition regardless of their usage, even though you have to use illegal copies. This protects you from all these "cloud" stuff and get you back to a Windows 7 like experience.

Try FreeRangeCloud in Vancouver. They offer IX VPS that allows you to connect to Unmetered Exchange, OPTiX and EVIX. HE is providing free IPv6 transits at Unmetered Exchange, so you can just email them to setup.