Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows WSL Debian Bookworm script execution #7269

Open
al-sabr opened this issue Nov 2, 2024 · 15 comments
Open

Windows WSL Debian Bookworm script execution #7269

al-sabr opened this issue Nov 2, 2024 · 15 comments

Comments

@al-sabr
Copy link

al-sabr commented Nov 2, 2024

Details:

  • Date | 2024-11-02 09:20:10
  • Program name | DietPi-Installer
  • Command | systemctl disable --now dietpi-cloudshell.service
  • Exit code | 1
  • DietPi version | v9.8.0 (MichaIng/master)
  • Distro version | bookworm (ID=7,RASPBIAN=0)
  • Kernel version | Linux Bismillah-Ar-Rahman-Ar-Rahim 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 GNU/Linux
  • Architecture | amd64
  • Hardware model | (ID=)
  • Power supply | (EG: RAVPower 5V 1A)
  • SD card | (EG: SanDisk Ultra 16 GB)

Steps to reproduce:

  1. Installed Debian WSL on Windows 10
  2. Tried that script https://dietpi.com/docs/hardware/#make-your-own-distribution

Expected behaviour:

  • Normal script running and cleaning the OS for a DietPi initial setup.

Actual behaviour:

  • Error screenshot

image

Extra details:

  • ...

Additional logs:

System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
@Joulinar
Copy link
Collaborator

Joulinar commented Nov 2, 2024

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

@al-sabr
Copy link
Author

al-sabr commented Nov 2, 2024

Here a screenshot of the new status

image

Trying the script again and it does the same error

@Joulinar
Copy link
Collaborator

Joulinar commented Nov 2, 2024

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

@al-sabr
Copy link
Author

al-sabr commented Nov 2, 2024

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
Copy link
Owner

MichaIng commented Nov 2, 2024

Jep, VM is correct.

@al-sabr
Copy link
Author

al-sabr commented Nov 2, 2024

Jep, VM is correct.

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

image

image

@Joulinar
Copy link
Collaborator

Joulinar commented Nov 2, 2024

Yes, Installer is working with user root only

@al-sabr
Copy link
Author

al-sabr commented Nov 2, 2024

Yes, Installer is working with user root only

How do I run it then ?

@MichaIng
Copy link
Owner

MichaIng commented Nov 2, 2024

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

@al-sabr
Copy link
Author

al-sabr commented Nov 2, 2024

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
Copy link
Owner

MichaIng commented Nov 3, 2024

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
Copy link
Author

al-sabr commented Nov 14, 2024

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
Copy link
Owner

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
Copy link
Author

al-sabr commented Nov 22, 2024

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

@MichaIng
Copy link
Owner

Sorry for the late reply. I currently do not have the time to dig out my Windows 10 laptop.

Can you try to switch the default user like that:

debian config --default-user root

This can be run from the cmd in the Windows host. Maybe it indirectly solves the weird output already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants