MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.9k stars 499 forks source link

Windows WSL Debian Bookworm script execution #7269

Open al-sabr opened 2 weeks ago

al-sabr commented 2 weeks ago

Details:

image

Extra details:

Joulinar commented 2 weeks ago

you can have a look into https://dietpi.com/forum/t/wsl2-support-update/16276

al-sabr commented 2 weeks ago

Here a screenshot of the new status

image

Trying the script again and it does the same error

Joulinar commented 2 weeks ago

Did you activate systemd on WSL before? Probably a reboot is needed

al-sabr commented 2 weeks ago

Here is the tutorial : https://gist.github.com/djfdyuruiry/6720faa3f9fc59bfdf6284ee1f41f950

It is working ... Am I correct to have seleted Virtual Machine setup since it is running in Windows WSL 2?

MichaIng commented 2 weeks ago

Jep, VM is correct.

al-sabr commented 2 weeks ago

Jep, VM is correct.

Here is the first error I get when trying to run the first time

image

image

Joulinar commented 2 weeks ago

Yes, Installer is working with user root only

al-sabr commented 2 weeks ago

Yes, Installer is working with user root only

How do I run it then ?

MichaIng commented 2 weeks ago

That is after reboot after installer went through, right? There was no login prompt where you could login as root?

al-sabr commented 2 weeks ago

That is after reboot after installer went through, right? There was no login prompt where you could login as root?

Yes it is the first boot after install of script finished. But it is Debian WSL2 on Windows 10

MichaIng commented 2 weeks ago

And there was no login prompt where you could login as root user? Ah I see now the scrambled output on the WSL console. Does it work to connect via SSH (the IP address at least is still visible on the console).

I'll do a test installation, when I find time.

al-sabr commented 1 week ago

And there was no login prompt where you could login as root user? Ah I see now the scrambled output on the WSL console. Does it work to connect via SSH (the IP address at least is still visible on the console).

I'll do a test installation, when I find time.

Find time : D

MichaIng commented 14 hours ago

image

I just tested it. Interestingly, on a current Windows 11 instance, WSL2 seems to setup with systemd automatically. I did:

wsl --install -d debian

Then rebooted the system, then started Debian from the start menu. It showed some "Installing ..." dialogue, which did not disappear until I closed the console and started it from the start menu again. But on that system, I only needed to install curl via APT, and could run our dietpi-installer right away. It showed some warning that the root filesystem is not located on a partition, but the naked drive, which is true:

/dev/sdc       1055762868    729944 1001329452   1% /

But one can ignore it, and it just works. Reboot, and did login automatically as root, same as in your case. As you can see, I also have no graphical issues with the console 🤔.

al-sabr commented 13 hours ago

I just tested it. Interestingly, on a current Windows 11 instance, WSL2 seems to setup with systemd automatically. I did:

Try with Windows 10 in a VM with WSL