F5F Stay Refreshed Software Operating Systems Yes, you can load your Linux distribution from an HDD via WSL2.

Yes, you can load your Linux distribution from an HDD via WSL2.

Yes, you can load your Linux distribution from an HDD via WSL2.

Pages (2): 1 2 Next
F
61
08-16-2016, 05:31 PM
#1
I prefer skipping the initial setup and avoiding dual-booting to save space.
F
FatherOfRonnoc
08-16-2016, 05:31 PM #1

I prefer skipping the initial setup and avoiding dual-booting to save space.

F
FraxDzn
Junior Member
11
08-16-2016, 07:32 PM
#2
You can achieve this using a virtual machine as well.
F
FraxDzn
08-16-2016, 07:32 PM #2

You can achieve this using a virtual machine as well.

S
Salty_Cactus1
Member
205
08-17-2016, 09:19 AM
#3
That would also be fine, my work is quite simple. I think VM should handle it.
S
Salty_Cactus1
08-17-2016, 09:19 AM #3

That would also be fine, my work is quite simple. I think VM should handle it.

M
mrninja
Junior Member
15
08-17-2016, 09:30 PM
#4
I don’t have tutorials available at the moment.
M
mrninja
08-17-2016, 09:30 PM #4

I don’t have tutorials available at the moment.

J
JaffaHunters
Member
140
08-19-2016, 09:38 AM
#5
With a Linux setup, you can simply connect VirtualBox to the physical hard drive and it will start up.
J
JaffaHunters
08-19-2016, 09:38 AM #5

With a Linux setup, you can simply connect VirtualBox to the physical hard drive and it will start up.

M
MaxSwets
Junior Member
45
08-19-2016, 10:22 AM
#6
But no one would think to try that? Using Win-OS inside a VM on a Linux system is widely regarded as a far more reliable option. Still, every situation is unique, so the outcome depends on the details.
M
MaxSwets
08-19-2016, 10:22 AM #6

But no one would think to try that? Using Win-OS inside a VM on a Linux system is widely regarded as a far more reliable option. Still, every situation is unique, so the outcome depends on the details.

S
SkyCrowzK
Member
189
08-23-2016, 05:53 AM
#7
You should avoid mounting or booting the host OS partition while running Windows. Also, don't try to mount a partition that runs another OS on the same drive unless you're certain about backing up data first.
S
SkyCrowzK
08-23-2016, 05:53 AM #7

You should avoid mounting or booting the host OS partition while running Windows. Also, don't try to mount a partition that runs another OS on the same drive unless you're certain about backing up data first.

P
purplecrimson
Junior Member
1
08-23-2016, 11:45 AM
#8
P
purplecrimson
08-23-2016, 11:45 AM #8

M
marmonar
Member
82
08-23-2016, 01:33 PM
#9
Actually, you can (I think). On your Linux system: $ sudo su - # cd / # tar -cpzf backup.tar.gz --exclude=/backup.tar.gz --exclude=/proc --exclude=/tmp --exclude=/mnt --exclude=/dev --exclude=/sys / Then copy the backup.tar.gz to your windows system. Now, here's the thing I am not entirely sure. I know for a fact you can import this file into a docker container and run it. I also know for a fact you can export a docker container and sideload it as a distribution into WSL2. So my assumption is you can import this directly into WSL2 as well. gunzip the file so you end up with the file backup.tar (you can also omit the z flag in the tar command above, but you will end up with a huge file to move around) Then open a CMD window and issue: wsl --import "<Your_Distro_Name>" "<Location_to_store_your_Distro>" "PATH/TO/<archive.tar>" --version 2 This _should_ work. If it doesn't, the quick solution would be to import the tar.gz into a new Docker container, en then export it from Docker so you can then import the resulting file into WSL2. Hope this helps. I have no tested this, but I have used Docker exports to create and sideload my own Slackware distribution for WSL2 that is not available otherwise.
M
marmonar
08-23-2016, 01:33 PM #9

Actually, you can (I think). On your Linux system: $ sudo su - # cd / # tar -cpzf backup.tar.gz --exclude=/backup.tar.gz --exclude=/proc --exclude=/tmp --exclude=/mnt --exclude=/dev --exclude=/sys / Then copy the backup.tar.gz to your windows system. Now, here's the thing I am not entirely sure. I know for a fact you can import this file into a docker container and run it. I also know for a fact you can export a docker container and sideload it as a distribution into WSL2. So my assumption is you can import this directly into WSL2 as well. gunzip the file so you end up with the file backup.tar (you can also omit the z flag in the tar command above, but you will end up with a huge file to move around) Then open a CMD window and issue: wsl --import "<Your_Distro_Name>" "<Location_to_store_your_Distro>" "PATH/TO/<archive.tar>" --version 2 This _should_ work. If it doesn't, the quick solution would be to import the tar.gz into a new Docker container, en then export it from Docker so you can then import the resulting file into WSL2. Hope this helps. I have no tested this, but I have used Docker exports to create and sideload my own Slackware distribution for WSL2 that is not available otherwise.

X
XylixTv
Member
193
08-25-2016, 12:45 PM
#10
I can verify the procedure now, as I found it intriguing enough to experiment with. What I did: 1) set up the Deepin Linux distribution from an ISO inside a virtual machine. I used Hyper-V, though any host could work. 2) once installed and set up, I exported the entire system as a tar archive. Because of Deepin’s specifics, I excluded /run and /media. Ensure you have sufficient space at the target location—files can grow large depending on your system. 3) executed WSL --import with the resulting archive. 4) launched WSL using a fully set-up Deepin installation, including its base setup. The whole process finished in under 30 minutes. This method offers a fast way to run Linux distributions unavailable on the MS Store, whether you need a VM in WSL or a complete running system. Just make sure the architecture matches. Avoid trying to package a Raspberry Pi install into a tar file and run it in WSL on an x86 machine.
X
XylixTv
08-25-2016, 12:45 PM #10

I can verify the procedure now, as I found it intriguing enough to experiment with. What I did: 1) set up the Deepin Linux distribution from an ISO inside a virtual machine. I used Hyper-V, though any host could work. 2) once installed and set up, I exported the entire system as a tar archive. Because of Deepin’s specifics, I excluded /run and /media. Ensure you have sufficient space at the target location—files can grow large depending on your system. 3) executed WSL --import with the resulting archive. 4) launched WSL using a fully set-up Deepin installation, including its base setup. The whole process finished in under 30 minutes. This method offers a fast way to run Linux distributions unavailable on the MS Store, whether you need a VM in WSL or a complete running system. Just make sure the architecture matches. Avoid trying to package a Raspberry Pi install into a tar file and run it in WSL on an x86 machine.

Pages (2): 1 2 Next