Computer

Amazingly, installing Windows loads Alpine Linux

Amazingly, installing Windows loads Alpine Linux

Look at the image we republish below: don’t you find something strange? In addition to the various editions of Windows 10the installation procedure of the Microsoft operating system offers the possibility of install Alpine Linux, a lightweight and safe deployment, designed primarily for efficiency, safety and simplicity. How is it possible?

Alpine Linux, installation from Windows 10 setup

Let’s say straight away that, obviously, the one represented in the figure is not and cannot be the one installation procedure Microsoft official. An independent developer wanted to modify it, more as an exercise in style than for actual practical value, in order to allow not only the installation of the classic editions of Windows but also of a distro of the penguin.

Loading Alpine Linux through the Windows installation: some important clarifications

The author of the “feat”, or the addition of a reference to Alpine Linux in theWindows installation, points out that the installer is extremely fragile. The procedure used is rather specific and depends on the particular condition of the hard disk, such as the presence of an empty NTFS partition before the intervention of the Windows setup. Any variation in the arrangement of the partitions could compromise the functioning of the installation.

As we mention later, the process of image generation in format WIMFurthermore, it does not preserve UNIX file permissions. This means that although Linux boots fine, you will need to manually fix the permissions of all files after installation.

Also changes applied to the bootloader GRUB they may be unstable: it is not guaranteed that they will “survive” a software update. In other words, it cannot be ruled out that problems may arise with starting the Linux distribution at a later time.

The researcher points out that using NTFS as the filesystem for managing the Linux root directory can lead to some inconveniences. For example, the possible setting of a dirty bit it can actually make the system impossible to use, at least until that bit is removed. The dirty bit it’s a flaga status indicator, used in the case of NTFS to indicate that the file system may have been mounted incorrectly or that there may be inconsistent data on the disk.

Alpine Linux can be installed from the Windows setup: but it is a complex and creative procedure

To make sure you can install a Linux distro frominstaller di Windows 10, the researcher chose a distribution like Alpine Linux that allows loading onto manually mounted NTFS partitions, without asking any further questions. It is a behavior that some distros have in common, such as also Arch Linux.

As explained in the article How to install Linux from a Windows installer, It’s Sood notes that he used the following partitioning scheme:

  • The first partition is an EFI partition of approximately 100 MB, formatted in FAT32 and mounted on /boot.
  • The second partition is 16 MB and is used only to adapt the structure of the partitioning scheme.
  • The third partition is the root file system, which takes up the rest of the disk and is formatted in NTFS, mounted at / with the ntfs3, acl, and windows_names options.

The researcher inserted the Linux distribution image as a WIM (Windows Image) as an integral part of the Windows ISO. This operation can be done using the Microsoft DISM tool (Deployment Image Service and Management).

The strategy adopted is to install a copy of thepre-installation environment di Windows (WinPE) in the rootfs of Linux, within the same WIM image. Next, you make WinPE make Linux bootable and allow you to boot from that operating system.

Booting Linux from WinPE: The solution used

WinPE, shortened version of Windows PE and acronym for Windows Preinstallation Environment, is a lightweight environment provided by Microsoft. It is mainly used for preparing and installing Windows on new computers, but can also be used for diagnosing and restoring the operating system already installed on the machine.

In another article we saw how you can create Windows PE support to start the system in any situation, even when the installed copy of Windows doesn’t want to load.

To make Linux bootable from WinPE, the researcher simply inserted the files present in the EFI partition diLinux (/boot) inside the WinPE EFI partition. Additionally, the WinPE installation had to be modified to remove the default Windows boot and allow booting from Linux.

Obviously, the procedure that we have summarized so far is divided into a series of truly “creative” technical steps. If one wanted to try the “recipe” proposed by Sood, it must still be understood as absolutely experimental, because it is complex, fragile and unconventional.

Opening image credit: Copilot Designer.

Leave a Reply

Your email address will not be published. Required fields are marked *