Moonglade

Modern Markdown blogging with AI-powered localization and search.

All Posts


Running DeepSeek R1 32B with NPU

This article introduces how to accelerate the inference of the DeepSeek large language model using OpenVINO on a laptop equipped with a Lunar Lake CPU and NPU. The author first points out that running the 32B model using only the CPU results in low performance and lacks practical value. Subsequently, the article details the complete workflow for invoking the NPU for inference via OpenVINO. The key steps include: first, downloading and installing the NPU driver, firmware, and Level Zero components from the official Intel website, and configuring user permissions to access the acceleration device; second, installing dependency libraries such as OpenVINO, ONNX, and Optimum in a Python virtual environment; and finally, verifying that OpenVINO successfully recognizes the NPU device, and then loading the 4-bit DeepSeek model quantized specifically for the OpenVINO format. Testing indicates that although NPU inference speed is significantly better than that of the CPU, the improvement in actual user experience is limited. Overall, this solution provides a feasible path for efficiently deploying large models on edge devices.

Views 6,549
Ai Deepseek Hugging face Lunarlake NPU OpenVINO

Some quick Docker tips

Common Docker Tips and Tricks The following are some useful Docker commands and techniques that can help you manage your containers and images more effectively. Each section includes explanations of when and how to use these commands. Build an Image from a Dockerfile bash docker ...

Views 605
Container Docker Linux Locale bash timezone

How exactly was AnduinOS born……

AnduinOS maintainer Anduin (a Microsoft .NET engineer) clarified that the project is a personal hobbyist work, not a commercial venture. Its core concept draws inspiration from NixOS's "build from scratch" philosophy, creating a Linux distribution with a Windows-like interaction style by modifying the Ubuntu ISO and integrating personalized configurations. This aims to solve the pain point of manual configuration after reinstalling the system while maximizing the reuse of the Ubuntu ecosystem. The author emphasized that the project's original intention was simply to satisfy personal usage habits; for instance, the app store was not preinstalled only because it was personally unnecessary, and the subsequent introduction of flatpak was based on isolation requirements. Although the project has sparked controversy due to its "low development cost," its success stems precisely from this purity. The author has refused venture capital and donations, insisting on open-source transparency to refute malicious conspiracy theories, and acknowledged the risks of single-person maintenance while promising to continue investing effort. The value of AnduinOS lies in maintaining its non-commercial authenticity, serving as an after-work pastime for an engineer rather than pursuing profit or complex features, which makes it unique and sincere in the commercialized software market.

Views 2,657
AnduinOS Introduction Operating System Development Release Story operating-system



How to use apt

This article provides a detailed introduction to common and advanced operational techniques for the APT package manager in Linux systems. It first covers basic commands, including using `apt list --installed` to view installed packages, utilizing `apt show` to retrieve package details such as version, dependencies, and maintainer information, and clearing the cache with `apt clean`. The article particularly emphasizes dependency management, noting that removing critical dependency packages (such as `git-man`) can lead to the simultaneous uninstallation of dependent software (such as `git`), so caution is required. In the advanced usage section, the article explains package pinning techniques in depth, demonstrating how to configure files under `/etc/apt/preferences.d/` to lock specific software versions or prevent the installation of specific packages (such as `snapd`). Additionally, it introduces methods for querying file lists within packages using `apt-file`, analyzing reverse dependencies with `apt-cache rdepends`, and adding PPA sources or enabling additional component repositories like `universe` via the `add-apt-repository` command. Finally, it briefly mentions reference resources for setting up a private APT mirror server, providing system administrators with a comprehensive and practical package management guide.

Views 206
Apt Package Management Dependency Queries Mirror Configuration Package Tools Repository Setup Software Installations

What could possibly be difficult about developing something you use every day, like app stores or package managers?

The article provides an in-depth analysis of the complexity behind software package management, pointing out that what appears to be a simple installation process actually involves complex dependencies, specifically directed acyclic graphs (DAGs). The author compares mainstream solutions: global package managers (such as apt) save space but face dependency conflicts characterized as NP-complete problems and destructive upgrades; divide-and-conquer strategies (such as venv, Docker) avoid conflicts through environment isolation but lead to resource redundancy; monolithic approaches bundle dependencies together, simplifying management at the cost of shared resources. Additionally, the article introduces the functional, immutable, and deterministic build advantages of Nix, as well as the clever design of NuGet, which combines centralized storage with monolithic packaging. Finally, it notes that there is currently no universal solution in the industry; typically, a divide-and-conquer approach combining monolithic packaging with container technology is adopted to balance dependency conflicts and resource efficiency, revealing the hidden technical challenges behind modern software distribution.

Views 364
Application Nix Store apt nuget package manager

Is It Still Necessary to Learn Assembly in 2024?

This article provides an in-depth exploration of the chronological order and intrinsic relationship between the emergence of operating systems and applications. The core argument is that both postdate the appearance of the Application Binary Interface (ABI) and are fundamentally reliant on abstraction. The article first uses a C language example to demonstrate the process of loading machine code via `mmap` and executing it directly, revealing the underlying mechanism by which early computers could run programs without an operating system. Subsequently, it explains the importance of achieving software decoupling and extensibility by defining abstract interfaces (such as plugin systems), in line with the Dependency Inversion Principle, and highlights that good interface design is key to system flexibility. It further proposes that the ABI serves as a bridge between operating systems and applications, defining the specifications for program interaction, resource management, and execution; understanding the ABI is, therefore, understanding the core functionality of an operating system. Using the example of HarmonyOS maintaining compatibility with the Linux ABI, the article illustrates that the two are closely linked through standard interfaces, rather than having a simple sequential dependency. Finally, it emphasizes that mastering undergraduate-level foundational knowledge, such as assembly language and operating systems, is crucial for understanding the low-level mechanisms of computer operation and breaking free from "black box" thinking. This knowledge is not merely a coding technique but serves as the cornerstone for tackling complex system challenges and designing efficient, secure architectures.

Views 826
Abstraction Assembly Language Deadlock Detection Embedded Systems Function Pointers Memory Management

Open-ended question: Which is more secure, Windows or Linux?

This article provides an in-depth comparison of the security strategies of Windows and Linux in typical end-user scenarios. By default, Windows employs technologies such as BitLocker full-disk encryption, TPM hardware trust, Secure Boot, VBS (Virtualization-Based Security), and Windows Hello biometric authentication. These features create a closed-loop defense mechanism spanning from hardware to software, significantly reducing the risks of physical intrusion and malware attacks. For ordinary users, this results in an exceptionally high level of security. In contrast, while Linux offers mechanisms such as LUKS2 encryption, Secure Boot, and sudo permission control, and its open-source nature allows for deep customization to minimize the attack surface, its security features are often not enabled by default. Furthermore, leveraging these features heavily relies on the user’s technical proficiency for manual configuration and maintenance, posing a higher operational barrier and potential risks. The article points out that security is not an absolute concept but a relative one, based on specific use cases, potential threats, and the user’s technical capabilities. For ordinary users seeking out-of-the-box convenience and high security, Windows offers a clear advantage. Conversely, for developers or server environments that require professional expertise, high flexibility for customization, and code transparency, Linux provides a higher security ceiling and greater flexibility. Therefore, which system is more secure depends on the user’s specific needs and usage patterns.

Views 620
BitLocker Operating Systems Security Use Cases User Experience VBS

Is It Still Difficult to Release a Linux Distribution in 2024?

The article explores the paradox between the low barrier to entry and the high maintenance costs of developing a custom Linux operating system. While tools like Arch or Debian allow individuals to quickly assemble a usable operating system within a day by combining a kernel, package manager, and graphical interface, truly releasing and maintaining a stable and reliable distribution is extremely difficult. The core challenge lies in package version management: rolling updates easily introduce breaking changes that can cause system crashes, and users cannot handle snapshots or debugging on their own like developers can. Therefore, commercial distributions such as Ubuntu or RedHat must rely on large engineering teams to ensure system compatibility and stability by locking in long-term support versions, curating security patches, writing migration scripts, and promoting industry standards such as OCI. The article points out that building a custom system is "easy to start, but extremely difficult to master." Its essence is not just technical implementation, but a continuous investment in ecosystem standards, quality management, and long-term support. This explains why companies like RedHat can derive significant value by setting standards and driving open-source abstractions.

Views 318
Container Technology Dependency Management Linux Distribution OCI Standard Package Management Red Hat