2

I have multiple WSL2 distributions of Linux running side-by-side.

I also have this particular Linux distribution that only comes in the form of a bootable USB drive. I can install that distribution on bare metal by booting from that USB drive. I only tried a BIOS (not UEFI) system.

The full contents of the USB drive is this:

Folder PATH listing for volume EFI-SYSTEM
Volume serial number is D779-97A5
D:\
├───efi
│   └───boot
│           bootx64.efi
│           bootia32.efi
│           grubx64.efi
│           grubia32.efi
│           grub.cfg
│
└───syslinux
        syslinux.cfg
        default.cfg
        usb.A.cfg
        root.A.cfg
        root.B.cfg
        README
        vmlinuz.A
        vmlinuz.B

Is it possible to install this Linux distribution in WLS2 from the content of the USB drive?

ixe013
  • 990

1 Answers1

2

Perhaps. It's difficult to say without being able to examine it myself, but here's my guess based on the contents you show.

The full contents of the USB drive is

My guess is that this isn't the case. This appears to be a Syslinux bootloader, which is designed to boot from a FAT filesystem.

I think it's more likely that you are seeing only the bootloader partition of the drive that is formatted FAT (the only filesystem on the drive you can access directly in Windows). There's probably another partition that can only be read after the kernel is loaded by the bootloader, probably formatted with an ext-based filesystem that Windows can't see.

It's on that partition that you'll probably find the rootfs image payload that you could wsl --import into a new WSL distribution.

So you'll need some way of accessing the Linux filesystem on that drive. This could be done from Windows/WSL if you have Windows 11 (Update note: Can now be done on Windows 10 as well. See this answer for a different feature) using:

wsl --mount <DiskPath> --partition <PartitionNumber> --type <Filesystem>

See the Mounting a partitioned disk in the WSL --mount documentation for details.

If you can't run Windows 11, then you could probably access it through a Linux virtual machine on your system.

Once you have access to that partition, look for some type of rootfs image, perhaps in a tar.gz/tgz package. If you can find that, then you can copy it off to your Windows drive /mnt/c/... and then use wsl --import on it.

Now here's the big caveat. Most Linux images will work fine this way, but I have a suspicion based on some Googling of the filenames you provided that your installer may be Chrome/Chromium OS-based. I believe that Chrome OS, like WSL2, has its own kernel customizations. If that's the case, then I don't know how well it will run under the WSL kernel. I'd be curious (if it is Chrome OS-based) to hear whether it does or not.

NotTheDr01ds
  • 28,025