microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.47k stars 822 forks source link

WSL Import of squashfs #4736

Open Saijin-Naib opened 4 years ago

Saijin-Naib commented 4 years ago

Is your feature request related to a problem? Please describe. Some distributions ship images in squashfs format, especially for bootable ISOs.

Describe the solution you'd like It would be great to have a native way to import this clean image into WSL using the --import command, without having to extract the squashfs to a directory, and then tar it.

Describe alternatives you've considered I have to use the unsquashfs command from WSL or a linux machine to properly decompress the squashfs image to a directory, then TAR it back up for import. 7zip under Windows fails to extract it properly.

therealkenc commented 4 years ago

Importing a rando sqashfs isn't a supported scenario AFIAK. wsl.exe --import is the thing you do after an --export. Ref #2955 (message).

That said, an ask is an ask I guess.

Saijin-Naib commented 4 years ago

Importing a rando sqashfs isn't a supported scenario AFIAK. wsl.exe --import is the thing you do after an --export. Ref #2955 (message). That said, an ask is an ask I guess.

Indeed it is.

It would make evaluating certain distros within WSL far easier when all the end-user has access to is an ISO containing boot files and a squashfs.

benhillis commented 4 years ago

Tar was chosen because it is a ubiquitous format that's been around forever. Marked as a feature request.

Saijin-Naib commented 4 years ago

User story: Used Debian from the store to unsquashfs the filesystem.squashfs to a directory, then used tar -pcf to turn it back into a TAR for import to WSL.

In WSL, I imported the TAR, upgraded the WSL instance, and then launched it. I am now running the distribution I wanted to test, but I was unable to do so without first having another installed WSL distribution for easy access to unsquashfs and TAR, since 7zip wasn't completely able to extract/repackage for me under Windows.

Artoria2e5 commented 4 years ago

Developer story: the gz limitation ties directly to what developers can use in the WSL-DistroLauncher, as the WslRegisterDistribution thing now has the same limitation. Most distributions use more modern and efficient things like xz, zstd, and squashfs for packing; if WSL could be made to use these porting to WSL would be a lot more easier.