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

"Failed to enable the autostart on Windows boot." Caused by: C drive not found. #50

Open
DScottArch opened this issue Apr 15, 2022 · 7 comments

Comments

@DScottArch
Copy link

Unable to autostart distrod, C drive not found. Using WSL Arch.

$ sudo /opt/distrod/bin/distrod enable --start-on-windows-boot
[Distrod] Distrod has been enabled. Now your shell will start under systemd.
[Distrod] Enabling atuomatic startup of Distrod. UAC dialog will appear because scheduling
a task requires the admin privilege. Please hit enter to proceed.

[Distrod][ERROR] Failed to enable the autostart on Windows boot.

Caused by:
C drive not found.

@xu-zhipeng
Copy link

#I tried this method. It can be used
#Open a shell session for systemd outside the container
#Open powershell and execute following:
wsl -d Ubuntu -e /bin/bash
sudo /opt/distrod/bin/distrod enable --start-on-windows-boot

@Doomwhite
Copy link

Doomwhite commented Jun 10, 2022

I have the same problem in Windows 11 and Arch.

@anuppoudel54
Copy link

I also am not able to enable distrod startup on boot but my error is a bit different after UAC dialog and entering my password the task is not scheduled succesfully error.

Error
It seems the task has not been scheduled successfully. You may have typed a wrong password, or you may not have the
necessary administrative privileges. Do you want to retry?
[Y] Yes  [N] No  [?] Help (default is "Y"):
[Distrod][ERROR] Failed to enable the autostart on Windows boot.

@MRMHmdeleeuw
Copy link

MRMHmdeleeuw commented Jul 31, 2022

I had this issue with Windows 10 & Oracle Linux 8. This was caused by the distro not being run as WSL2 but instead WSL1.

 sudo /opt/distrod/bin/distrod enable --start-on-windows-boot
 [Distrod] Distrod has been enabled. Now your shell will start under systemd.
 [Distrod] Enabling atuomatic startup of Distrod. UAC dialog will appear because scheduling
 a task requires the admin privilege. Please hit enter to proceed.

 [Distrod][ERROR] Failed to enable the autostart on Windows boot.

 Caused by:
     C drive not found.

But systemctl/systemd itself in this case does not work either. Issuing the upgrade solved the issue

wsl --set-version <distro> 2

@techroy23
Copy link

techroy23 commented Aug 1, 2022

Hi I did #50 (comment) but still getting the same error

C:\Windows\system32>wsl --set-version Distrod 2
Conversion in progress, this may take a few minutes...
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
The distribution is already the requested version.

[Distrod] Enabling atuomatic startup of Distrod. UAC dialog will appear because scheduling
a task requires the admin privilege. Please hit enter to proceed.

[Distrod][ERROR] Failed to enable the autostart on Windows boot.

Caused by:
C drive not found.

@techroy23
Copy link

I got it working now.

Check list :

  • UAC is set to "(default) Notify me only when apps try to make changes to my computer".
  • You are using a local admin account with password.
  • No pending windows update.

1.) Restart your machine.
2.) Install your Distro using non-elevated terminal and complete initial setup of user account.
3.) now type sudo /opt/distrod/bin/distrod enable --start-on-windows-boot and press enter
4.) This message should show up [Distrod] Enabling atuomatic startup of Distrod. UAC dialog will appear because scheduling a task requires the admin privilege. Please hit enter to proceed.
5.) Press [ENTER] and the UAC box should appear. Press [YES]
6.) A powershell window will show please enter your Local account password then press [ENTER].
7.) This message should appear [Distrod] Distrod will now start automatically on Windows startup.

@Suida
Copy link

Suida commented Aug 18, 2022

I got it working now.

Check list :

  • UAC is set to "(default) Notify me only when apps try to make changes to my computer".
  • You are using a local admin account with password.
  • No pending windows update.

1.) Restart your machine. 2.) Install your Distro using non-elevated terminal and complete initial setup of user account. 3.) now type sudo /opt/distrod/bin/distrod enable --start-on-windows-boot and press enter 4.) This message should show up [Distrod] Enabling atuomatic startup of Distrod. UAC dialog will appear because scheduling a task requires the admin privilege. Please hit enter to proceed. 5.) Press [ENTER] and the UAC box should appear. Press [YES] 6.) A powershell window will show please enter your Local account password then press [ENTER]. 7.) This message should appear [Distrod] Distrod will now start automatically on Windows startup.

Thank you. This solution works for me on arch linux.

And I found an additional issue to take care of: The subsystem must be launched in non-elevated terminal. If not, you have to terminate that distribution (wsl -t <distro-name>) and restart it in a non-elevated terminal. Anyway, following this schema step-by-step definitely works.

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

No branches or pull requests

7 participants