#Move Ubuntu subsystem

1 messages · Page 1 of 1 (latest)

halcyon stag
#

I want to move Ubuntu subsystem from drive C to Drive D, along with the OpenClaw and other things in it without breaking a single part, and do it step by step, one step at a time

narrow rampartBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

dense fractalBOT
# halcyon stag I want to move Ubuntu subsystem from drive C to Drive D, along with the OpenClaw...

Yep. We can do this safely, one step at a time. For WSL, the least risky path is export Ubuntu to a tar backup, import it onto D:, verify it boots and OpenClaw still works, then only later remove the old C: copy. No deleting in the early steps.

Before we touch anything, Step 1 is just inventory.

Open PowerShell and run these, then paste the output:

wsl --version
wsl --list --verbose
wsl --status

Then inside your Ubuntu terminal, run:

openclaw --version
dense fractalBOT
halcyon stag
#

Step by step, one step at a time with paste output mode

dense fractalBOT
halcyon stag
#

PS C:\WINDOWS\system32> wsl --list --verbose NAME STATE VERSION * Ubuntu-24.04 Running 2

dense fractalBOT
halcyon stag
#


DriveLetter     : D
FileSystemLabel : SSD
SizeRemaining   : 44364877824
Size            : 484665581568```
dense fractalBOT
halcyon stag
#
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdd       1007G   12G  945G   2% /```
dense fractalBOT
halcyon stag
#
PS C:\WINDOWS\system32> wsl --list --verbose
  NAME            STATE           VERSION
* Ubuntu-24.04    Stopped         2```
dense fractalBOT
halcyon stag
#


    Directory: D:\WSL


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----         5/17/2026   5:26 PM                Backups
d-----         5/17/2026   5:26 PM                Ubuntu-24.04```
dense fractalBOT
halcyon stag
#
Export in progress, this may take a few minutes. (10999 MB)

The operation completed successfully.```
dense fractalBOT
halcyon stag
#


FullName : D:\WSL\Backups\Ubuntu-24.04-backup.tar
Length   : 11533885440```
dense fractalBOT
# halcyon stag ```PS C:\WINDOWS\system32> Get-Item D:\WSL\Backups\Ubuntu-24.04-backup.tar | Sel...

Backup looks right: about 10.7 GiB.

Step 8: import the D: copy as a temporary new distro

This does not delete or change the old C: Ubuntu. It creates a second copy named Ubuntu-24.04-D.

In PowerShell, run only this:

wsl --import Ubuntu-24.04-D D:\WSL\Ubuntu-24.04 D:\WSL\Backups\Ubuntu-24.04-backup.tar --version 2

When it finishes, paste the full output here. It may show no output if successful.

halcyon stag
#


FullName : D:\WSL\Backups\Ubuntu-24.04-backup.tar
Length   : 11533885440



PS C:\WINDOWS\system32> wsl --import Ubuntu-24.04-D D:\WSL\Ubuntu-24.04 D:\WSL\Backups\Ubuntu-24.04-backup.tar --version 2
The operation completed successfully.```
dense fractalBOT
halcyon stag
#
  NAME              STATE           VERSION
* Ubuntu-24.04      Running         2
  Ubuntu-24.04-D    Stopped         2```
dense fractalBOT
halcyon stag
#
Failed to attach disk 'D:\WSL\Ubuntu-24.04\ext4.vhdx' to WSL2: The process cannot access the file because it is being used by another process.
Error code: Wsl/Service/CreateInstance/MountDisk/HCS/ERROR_SHARING_VIOLATION```
dense fractalBOT
halcyon stag
#

PS C:\WINDOWS\system32> wsl --list --verbose
NAME STATE VERSION

  • Ubuntu-24.04 Stopped 2
    Ubuntu-24.04-D Stopped 2
dense fractalBOT
#

That looks like an auth token/JWT, not the WSL output. For safety, you should delete that message if Discord lets you, and treat the token as exposed: log out/revoke/regenerate it in whatever app issued it.

Back to the WSL move: please run the last step again and paste only this output:

wsl --list --verbose

No tokens, passwords, or browser/app auth strings.

dense fractalBOT
halcyon stag
#
Failed to attach disk 'D:\WSL\Ubuntu-24.04\ext4.vhdx' to WSL2: The process cannot access the file because it is being used by another process.
Error code: Wsl/Service/CreateInstance/MountDisk/HCS/ERROR_SHARING_VIOLATION
PS C:\WINDOWS\system32>```
dense fractalBOT
# halcyon stag ```PS C:\WINDOWS\system32> wsl -d Ubuntu-24.04-D -- sh -lc "whoami; pwd; ls /hom...

Still locked. That usually means a Windows process has the new VHDX open, or the WSL service did not fully release it.

Step 10c: restart the WSL service

Close Ubuntu, VS Code, Docker Desktop, and any File Explorer window open inside D:\WSL.

Then open PowerShell as Administrator and run only this:

Restart-Service LxssManager

Paste the full output here. If it prints nothing, just say “no output”.

halcyon stag
#

PS C:\WINDOWS\system32> Restart-Service LxssManager
Restart-Service : Cannot find any service with service name 'LxssManager'.
At line:1 char:1

  • Restart-Service LxssManager
  •   + CategoryInfo          : ObjectNotFound: (LxssManager:String) [Restart-Service], ServiceCommandException
      + FullyQualifiedErrorId : NoServiceFoundForGivenName,Microsoft.PowerShell.Commands.RestartServiceCommand
dense fractalBOT
# halcyon stag PS C:\WINDOWS\system32> Restart-Service LxssManager Restart-Service : Cannot fin...

Okay, this Windows install doesn’t expose LxssManager under that name. Let’s identify the WSL service name first.

Step 10d: list WSL-related services

In PowerShell as Administrator, run only this:

Get-Service | Where-Object { $_.Name -match 'wsl|lxss|hns|vmcompute' -or $_.DisplayName -match 'wsl|linux|hyper-v|host network' } | Select-Object Name,DisplayName,Status | Format-Table -AutoSize

Paste the full output here.

halcyon stag
#

PS C:\WINDOWS\system32> Get-Service | Where-Object { $.Name -match 'wsl|lxss|hns|vmcompute' -or $.DisplayName -match 'wsl|linux|hyper-v|host network' } | Select-Object Name,DisplayName,Status | Format-Table -AutoSize

Name DisplayName Status


hns Host Network Service Running
vmcompute Hyper-V Host Compute Service Running
vmicguestinterface Hyper-V Guest Service Interface Stopped
vmicheartbeat Hyper-V Heartbeat Service Stopped
vmickvpexchange Hyper-V Data Exchange Service Stopped
vmicrdv Hyper-V Remote Desktop Virtualization Service Stopped
vmicshutdown Hyper-V Guest Shutdown Service Stopped
vmictimesync Hyper-V Time Synchronization Service Stopped
vmicvmsession Hyper-V PowerShell Direct Service Stopped
vmicvss Hyper-V Volume Shadow Copy Requestor Stopped
vmms Hyper-V Virtual Machine Management Running
WSLService WSL Service Running

dense fractalBOT
halcyon stag
#

PS C:\WINDOWS\system32> Restart-Service WSLService
PS C:\WINDOWS\system32> wsl --list --verbose
NAME STATE VERSION

  • Ubuntu-24.04 Stopped 2
    Ubuntu-24.04-D Stopped 2
dense fractalBOT
halcyon stag
#

PS C:\WINDOWS\system32> wsl -d Ubuntu-24.04-D -- sh -lc "whoami; pwd; ls /home"
Failed to attach disk 'D:\WSL\Ubuntu-24.04\ext4.vhdx' to WSL2: The process cannot access the file because it is being used by another process.
Error code: Wsl/Service/CreateInstance/MountDisk/HCS/ERROR_SHARING_VIOLATION

dense fractalBOT
halcyon stag
#
  NAME              STATE           VERSION
* Ubuntu-24.04      Running         2
  Ubuntu-24.04-D    Stopped         2```
dense fractalBOT
halcyon stag
#

Because I'm using task scedudler to load it auto so openclaw can run

dense fractalBOT
# halcyon stag Because I'm using task scedudler to load it auto so openclaw can run

That explains it. Task Scheduler is starting the old Ubuntu-24.04, which can keep WSL busy while we’re trying to test the D: copy.

Step 10i: temporarily disable that scheduled task

Open Task Scheduler, find the task that starts OpenClaw/Ubuntu, right-click it, choose Disable.

Then in PowerShell, run only this:

wsl --shutdown
wsl --list --verbose

Paste the output here.

We’ll re-enable or update the task after the D: copy is verified. Don’t delete the task, just disable it for now.

halcyon stag
#
>> wsl --list --verbose
  NAME              STATE           VERSION
* Ubuntu-24.04      Stopped         2
  Ubuntu-24.04-D    Stopped         2```
dense fractalBOT
halcyon stag
#

PS C:\WINDOWS\system32> wsl -d Ubuntu-24.04-D -- sh -lc "whoami; pwd; ls /home"
wrakeeb
/mnt/c/WINDOWS/system32
linuxbrew wrakeeb

dense fractalBOT
halcyon stag
#

S C:\WINDOWS\system32> wsl -d Ubuntu-24.04-D -- bash -lc "cd ~ && pwd && openclaw --version && which openclaw"
/home/wrakeeb
bash: line 1: openclaw: command not found

dense fractalBOT
# halcyon stag S C:\WINDOWS\system32> wsl -d Ubuntu-24.04-D -- bash -lc "cd ~ && pwd && opencla...

That means the D: copy itself is booting, but the shell PATH for openclaw isn’t resolving yet. We’ll locate where it’s installed before changing anything.

Step 12: search common install locations inside the D: copy

In PowerShell, run only this:

wsl -d Ubuntu-24.04-D -- bash -lc "cd ~; echo PATH=$PATH; command -v node npm pnpm openclaw || true; ls -la ~/.npm-global/bin ~/.local/bin /home/linuxbrew/.linuxbrew/bin 2>/dev/null | grep -E 'openclaw|clawdbot|node|npm|pnpm' || true"

Paste the full output here.

halcyon stag
#

PS C:\WINDOWS\system32> wsl -d Ubuntu-24.04-D -- bash -lc "cd ~; echo PATH=$PATH; command -v node npm pnpm openclaw || true; ls -la ~/.npm-global/bin ~/.local/bin /home/linuxbrew/.linuxbrew/bin 2>/dev/null | grep -E 'openclaw|clawdbot|node|npm|pnpm' || true"
PATH=
/usr/bin/node
/usr/bin/npm
/home/wrakeeb/.npm-global/bin:
lrwxrwxrwx 1 wrakeeb wrakeeb 41 May 17 13:01 openclaw -> ../lib/node_modules/openclaw/openclaw.mjs

dense fractalBOT
halcyon stag
#

wsl -d Ubuntu-24.04-D -- /home/wrakeeb/.npm-global/bin/openclaw --version

dense fractalBOT
halcyon stag
#
OpenClaw 2026.5.4 (325df3e)
PS C:\WINDOWS\system32>```
dense fractalBOT
halcyon stag
dense fractalBOT
# halcyon stag

Good: the D: copy has OpenClaw, config, sessions, channels, and the systemd user service installed.

The only problem shown is: Gateway service says running, but gateway port is unreachable. We’ll inspect that before changing anything.

Step 15: check gateway service details

In PowerShell, run only this:

wsl -d Ubuntu-24.04-D -- /home/wrakeeb/.npm-global/bin/openclaw gateway status

Paste the full output here.

halcyon stag
#

🦞 OpenClaw 2026.5.4 (325df3e) — Your personal assistant, minus the passive-aggressive calendar reminders.

│
â—‡
Service: systemd user (enabled)
File logs: /tmp/openclaw/openclaw-2026-05-17.log
Command: /usr/bin/node /home/wrakeeb/.npm-global/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/.config/systemd/user/openclaw-gateway.service
Service env: OPENCLAW_GATEWAY_PORT=18789

Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json

Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.

Runtime: running (pid 287, state active, sub running, last exit 0, reason 0)
Warm-up: launch agents can take a few seconds. Try again shortly.
Connectivity probe: failed
Probe target: ws://127.0.0.1:18789
  connect ECONNREFUSED 127.0.0.1:18789
Capability: unknown

Gateway port 18789 is not listening (service appears running).
Logs: journalctl --user -u openclaw-gateway.service -n 200 --no-pager
Restart log: ~/.openclaw/logs/gateway-restart.log

Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting```
dense fractalBOT
halcyon stag
dense fractalBOT
# halcyon stag

The log is useful: OpenClaw is starting successfully, then it receives SIGTERM and shuts down. That usually means WSL is being stopped/going idle while we’re checking it, not that OpenClaw itself failed.

Step 17: keep the D: distro alive long enough, then check again

In PowerShell, run only this:

wsl -d Ubuntu-24.04-D -- bash -lc "sleep 35; /home/wrakeeb/.npm-global/bin/openclaw gateway status"

Paste the full output here.

halcyon stag
#

PS C:\WINDOWS\system32> wsl -d Ubuntu-24.04-D -- bash -lc "sleep 35; /home/wrakeeb/.npm-global/bin/openclaw gateway status"

🦞 OpenClaw 2026.5.4 (325df3e) — Type the command with confidence—nature will provide the stack trace if needed.

│
â—‡
Service: systemd user (enabled)
File logs: /tmp/openclaw/openclaw-2026-05-17.log
Command: /usr/bin/node /home/wrakeeb/.npm-global/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/.config/systemd/user/openclaw-gateway.service
Service env: OPENCLAW_GATEWAY_PORT=18789

Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json

Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.

Runtime: running (pid 283, state active, sub running, last exit 0, reason 0)
Connectivity probe: ok
Capability: admin-capable

Listening: 127.0.0.1:18789
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting

dense fractalBOT
# halcyon stag PS C:\WINDOWS\system32> wsl -d Ubuntu-24.04-D -- bash -lc "sleep 35; /home/wrake...

Good. The D: copy is healthy now: gateway is listening and the probe is OK.

Next we need to update your autostart task so it starts Ubuntu-24.04-D instead of the old C: distro.

Step 18: find the Task Scheduler task

In PowerShell, run only this:

Get-ScheduledTask | Where-Object { $_.TaskName -match 'openclaw|ubuntu|wsl|claw' -or $_.TaskPath -match 'openclaw|ubuntu|wsl|claw' } | Select-Object TaskName,TaskPath,State | Format-Table -AutoSize

Paste the full output here.

halcyon stag
#

TaskName           TaskPath    State
--------           --------    -----
OpenClaw AutoStart \        Disabled```
dense fractalBOT
halcyon stag
#
OpenClaw AutoStart \        Disabled


PS C:\WINDOWS\system32> (Get-ScheduledTask -TaskName "OpenClaw AutoStart").Actions | Format-List *


Id                    :
Arguments             : "C:\Users\rakib\start-openclaw-hidden.vbs"
Execute               : wscript
WorkingDirectory      :
PSComputerName        :
CimClass              : Root/Microsoft/Windows/TaskScheduler:MSFT_TaskExecAction
CimInstanceProperties : {Id, Arguments, Execute, WorkingDirectory}
CimSystemProperties   : Microsoft.Management.Infrastructure.CimSystemProperties```
dense fractalBOT
halcyon stag
#
WshShell.Run "wsl.exe bash -c ""~/start-openclaw.sh""", 0, False```
dense fractalBOT
halcyon stag
#

PS C:\WINDOWS\system32> wsl -d Ubuntu-24.04-D -- bash -lc "cat ~/start-openclaw.sh"
Failed to attach disk 'D:\WSL\Ubuntu-24.04\ext4.vhdx' to WSL2: The process cannot access the file because it is being used by another process.
Error code: Wsl/Service/CreateInstance/MountDisk/HCS/ERROR_SHARING_VIOLATION

dense fractalBOT
halcyon stag
#

What are we exactly doing right now? How long left of all these?

dense fractalBOT
# halcyon stag What are we exactly doing right now? How long left of all these?

We’ve already done the big risky part:

  • Exported your old Ubuntu-24.04 from C: into a backup tar on D:
  • Imported it as a new distro: Ubuntu-24.04-D
  • Confirmed the D: copy boots
  • Confirmed OpenClaw exists there
  • Confirmed OpenClaw gateway can run correctly there

What we’re doing now is the final wiring: your Windows Task Scheduler autostart still points at the default WSL distro, so it can accidentally start the old C: copy. We’re updating/validating that startup path so it launches Ubuntu-24.04-D instead.

Roughly left:

  1. Update the VBS autostart script to use wsl.exe -d Ubuntu-24.04-D ...
  2. Re-enable the scheduled task
  3. Reboot/test once
  4. Set Ubuntu-24.04-D as default if you want
  5. Keep the old C: distro and backup for a while; only delete later after you’re fully confident
dense fractalBOT
halcyon stag
#
  NAME              STATE           VERSION
* Ubuntu-24.04      Stopped         2
  Ubuntu-24.04-D    Stopped         2```
dense fractalBOT
# halcyon stag ```PS C:\WINDOWS\system32> wsl --list --verbose NAME STATE ...

Good, both are stopped.

Step 22: back up the Windows autostart script

In PowerShell, run only this:

Copy-Item "C:\Users\rakib\start-openclaw-hidden.vbs" "C:\Users\rakib\start-openclaw-hidden.vbs.bak"

Then run:

Get-Item "C:\Users\rakib\start-openclaw-hidden.vbs.bak" | Select-Object FullName,Length | Format-List

Paste the output of the second command here.

halcyon stag
#
PS C:\WINDOWS\system32> Get-Item "C:\Users\rakib\start-openclaw-hidden.vbs.bak" | Select-Object FullName,Length | Format-List

FullName : C:\Users\rakib\start-openclaw-hidden.vbs.bak
Length   : 110```
dense fractalBOT
dense fractalBOT
halcyon stag
#

PS C:\WINDOWS\system32> @'

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "wsl.exe -d Ubuntu-24.04-D bash -lc ""~/start-openclaw.sh""", 0, False
'@ | Set-Content -Encoding ASCII "C:\Users\rakib\start-openclaw-hidden.vbs"
PS C:\WINDOWS\system32> Get-Content "C:\Users\rakib\start-openclaw-hidden.vbs"
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run "wsl.exe -d Ubuntu-24.04-D bash -lc ""~/start-openclaw.sh""", 0, False

dense fractalBOT
halcyon stag
#
Failed to attach disk 'D:\WSL\Ubuntu-24.04\ext4.vhdx' to WSL2: The process cannot access the file because it is being used by another process.
Error code: Wsl/Service/CreateInstance/MountDisk/HCS/ERROR_SHARING_VIOLATION
dense fractalBOT
halcyon stag
#

The operation completed successfully.
NAME STATE VERSION

  • Ubuntu-24.04 Stopped 2
    Ubuntu-24.04-D Stopped 2
    PS C:\WINDOWS\system32>
dense fractalBOT
halcyon stag
#
Failed to attach disk 'D:\WSL\Ubuntu-24.04\ext4.vhdx' to WSL2: The process cannot access the file because it is being used by another process.
Error code: Wsl/Service/CreateInstance/MountDisk/HCS/ERROR_SHARING_VIOLATION```
dense fractalBOT
halcyon stag
#

PS C:\WINDOWS\system32> Restart-Service WSLService
PS C:\WINDOWS\system32> wsl --list --verbose
NAME STATE VERSION

  • Ubuntu-24.04 Stopped 2
    Ubuntu-24.04-D Stopped 2
dense fractalBOT
# halcyon stag PS C:\WINDOWS\system32> Restart-Service WSLService PS C:\WINDOWS\system32> wsl -...

Good. Let’s skip the script inspection for now; we already verified the VBS edit and OpenClaw works in D:. The remaining meaningful test is the scheduled task.

Step 25: enable the scheduled task

In PowerShell, run only this:

Enable-ScheduledTask -TaskName "OpenClaw AutoStart"

Then run:

Get-ScheduledTask -TaskName "OpenClaw AutoStart" | Select-Object TaskName,State | Format-List

Paste the output of the second command here.

halcyon stag
#

TaskPath                                       TaskName                          State
--------                                       --------                          -----
\                                              OpenClaw AutoStart                Ready


PS C:\WINDOWS\system32> Get-ScheduledTask -TaskName "OpenClaw AutoStart" | Select-Object TaskName,State | Format-List


TaskName : OpenClaw AutoStart
State    : Ready```
dense fractalBOT
halcyon stag
#
PS C:\WINDOWS\system32> wsl --list --verbose
  NAME              STATE           VERSION
* Ubuntu-24.04      Stopped         2
  Ubuntu-24.04-D    Stopped         2
PS C:\WINDOWS\system32> Enable-ScheduledTask -TaskName "OpenClaw AutoStart"

TaskPath                                       TaskName                          State
--------                                       --------                          -----
\                                              OpenClaw AutoStart                Ready


PS C:\WINDOWS\system32> Get-ScheduledTask -TaskName "OpenClaw AutoStart" | Select-Object TaskName,State | Format-List


TaskName : OpenClaw AutoStart
State    : Ready



PS C:\WINDOWS\system32>```
dense fractalBOT
halcyon stag
#

PS C:\WINDOWS\system32> Start-ScheduledTask -TaskName "OpenClaw AutoStart"
PS C:\WINDOWS\system32> wsl --list --verbose
NAME STATE VERSION

  • Ubuntu-24.04 Stopped 2
    Ubuntu-24.04-D Stopped 2
dense fractalBOT
halcyon stag
#


LastRunTime           : 5/17/2026 6:58:50 PM
LastTaskResult        : 0
NextRunTime           :
NumberOfMissedRuns    : 0
TaskName              : OpenClaw AutoStart
TaskPath              :
PSComputerName        :
CimClass              : Root/Microsoft/Windows/TaskScheduler:MSFT_TaskDynamicInfo
CimInstanceProperties : {LastRunTime, LastTaskResult, NextRunTime, NumberOfMissedRuns...}
CimSystemProperties   : Microsoft.Management.Infrastructure.CimSystemProperties```
dense fractalBOT
halcyon stag
#
Failed to attach disk 'D:\WSL\Ubuntu-24.04\ext4.vhdx' to WSL2: The process cannot access the file because it is being used by another process.
Error code: Wsl/Service/CreateInstance/MountDisk/HCS/ERROR_SHARING_VIOLATION
PS C:\WINDOWS\system32>```
dense fractalBOT
halcyon stag
#

no output

dense fractalBOT
# halcyon stag no output

No launcher process is visible, so this is probably the WSL service/kernel holding the VHDX lock internally. At this point the clean fix is a reboot, and we already updated the autostart script before this happened.

Step 30: reboot and test autostart

Restart Windows normally.

After logging back in, wait about 60 seconds, then open PowerShell and run only this:

wsl --list --verbose

Paste the output here. If the autostart worked, we should see Ubuntu-24.04-D running, not the old Ubuntu-24.04.

halcyon stag
#

the fuck are we doing right now? Is this all for task sceduler?

dense fractalBOT
# halcyon stag the fuck are we doing right now? Is this all for task sceduler?

Yeah, fair frustration. The move itself is already done. The only thing we’re fighting now is Task Scheduler/autostart.

Current state:

  • Your Ubuntu data was exported safely.
  • The new WSL distro on D: exists as Ubuntu-24.04-D.
  • OpenClaw runs in it.
  • The gateway was verified working in it.
  • The old C: distro still exists untouched as a fallback.
  • The Task Scheduler script was changed to target Ubuntu-24.04-D.

What’s left is only: does autostart work after reboot? If you don’t care about Task Scheduler right now, we can stop here and you can start the D: copy manually with:

wsl -d Ubuntu-24.04-D
dense fractalBOT
halcyon stag
#

Ahhh. What now?

dense fractalBOT
# halcyon stag Ahhh. What now?

Now I’d do the smallest final check and then stop.

Step 31: final reboot test

Restart Windows normally. After login, wait 60 seconds, then run:

wsl --list --verbose

Paste that output.

What we’re looking for:

  • Best case: Ubuntu-24.04-D is Running. Autostart works.
  • Still okay: both are Stopped. The move is still done; autostart just needs separate cleanup later.
  • Bad case: old Ubuntu-24.04 is Running. Then something else is still launching the old copy.
dense fractalBOT
halcyon stag
#

so, what to do now?

dense fractalBOT
# halcyon stag so, what to do now?

Do this now:

  1. Restart Windows normally.
  2. Log back in.
  3. Wait 60 seconds.
  4. Open PowerShell and run:
wsl --list --verbose

Paste that output here.

That single check tells us whether the updated Task Scheduler autostart is using the D: copy. After that, we either call it done or fix only the autostart. The actual WSL move is already done.

halcyon stag
#

After restart:

PS C:\WINDOWS\system32> wsl --list --verbose
NAME STATE VERSION

  • Ubuntu-24.04 Stopped 2
    Ubuntu-24.04-D Running 2
dense fractalBOT
# halcyon stag After restart: PS C:\WINDOWS\system32> wsl --list --verbose NAME ...

Excellent. That’s the result we wanted:

  • Old C: distro: Ubuntu-24.04 = stopped
  • New D: distro: Ubuntu-24.04-D = running
  • Task Scheduler/autostart is now using the D: copy

One small cleanup remains: the * still marks the old C: distro as the default. Let’s switch the default so plain wsl opens the D: copy.

Final Step: set D: copy as default

In PowerShell, run:

wsl --set-default Ubuntu-24.04-D
wsl --list --verbose
dense fractalBOT
halcyon stag
#

PS C:\WINDOWS\system32> wsl --set-default Ubuntu-24.04-D

wsl --list --verbose
The operation completed successfully.
NAME STATE VERSION

  • Ubuntu-24.04-D Running 2
    Ubuntu-24.04 Stopped 2
dense fractalBOT
# halcyon stag PS C:\WINDOWS\system32> wsl --set-default Ubuntu-24.04-D >> wsl --list --verbose...

Done. That is the clean final state:

  • Ubuntu-24.04-D is now the default WSL distro
  • It is running from D:
  • The old Ubuntu-24.04 on C: is stopped
  • Task Scheduler autostart is pointing at the D: distro

For now, do not delete/unregister the old Ubuntu-24.04 and don’t delete D:\WSL\Backups\Ubuntu-24.04-backup.tar. Keep both for a few days as rollback.

When you’re fully confident later, the old distro can be removed with wsl --unregister Ubuntu-24.04, but don’t run that today.

Glad we got through the messy lock stuff. If this solved it, please right-click the solution message → Apps → ✅ Mark Solution so Answer Overflow indexes it for future users.

halcyon stag
#

How can we confirm that the OpenClaw and ubuntu now running on D drive?

dense fractalBOT
dense fractalBOT
# halcyon stag How can we confirm that the OpenClaw and ubuntu now running on D drive?
  • Ubuntu-24.04-D has BasePath under D:\WSL\Ubuntu-24.04
  • old Ubuntu-24.04 has a different path, likely under C:

Then confirm OpenClaw is the one running inside the D distro:

wsl --list --verbose
wsl -d Ubuntu-24.04-D -- /home/wrakeeb/.npm-global/bin/openclaw gateway status

If that shows Ubuntu-24.04-D Running and gateway probe OK/listening, then Ubuntu + OpenClaw are running from the D: distro.

halcyon stag
#
>> wsl -d Ubuntu-24.04-D -- /home/wrakeeb/.npm-global/bin/openclaw gateway status
  NAME              STATE           VERSION
* Ubuntu-24.04-D    Running         2
  Ubuntu-24.04      Stopped         2

🦞 OpenClaw 2026.5.4 (325df3e) — I speak fluent bash, mild sarcasm, and aggressive tab-completion energy.

│
â—‡
Service: systemd user (enabled)
File logs: /tmp/openclaw/openclaw-2026-05-17.log
Command: /usr/bin/node /home/wrakeeb/.npm-global/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/.config/systemd/user/openclaw-gateway.service
Service env: OPENCLAW_GATEWAY_PORT=18789

Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json

Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.

Runtime: running (pid 496, state active, sub running, last exit 0, reason 0)
Connectivity probe: ok
Capability: admin-capable

Listening: 127.0.0.1:18789
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting```
dense fractalBOT
# halcyon stag ```PS C:\WINDOWS\system32> wsl --list --verbose >> wsl -d Ubuntu-24.04-D -- /hom...

That confirms OpenClaw is running in Ubuntu-24.04-D and the gateway is healthy:

  • Ubuntu-24.04-D is the default and Running
  • old Ubuntu-24.04 is Stopped
  • OpenClaw gateway probe is ok
  • gateway is listening on 127.0.0.1:18789

One last optional proof of the actual disk path is the registry BasePath check I sent before. If Ubuntu-24.04-D shows D:\WSL\Ubuntu-24.04, that proves the distro storage is on D:.

You’re done operationally. Keep the old distro and backup tar for a few days before deleting anything.

halcyon stag
#

Alright. Now how can i open the disk of Ubuntu?

dense fractalBOT
# halcyon stag Alright. Now how can i open the disk of Ubuntu?

There are two different “disks” here:

To open your Ubuntu files normally
In File Explorer, type this in the address bar:

\\wsl.localhost\Ubuntu-24.04-D\home\wrakeeb

Or from PowerShell:

explorer.exe "\\wsl.localhost\Ubuntu-24.04-D\home\wrakeeb"

That opens your Ubuntu home folder safely.

dense fractalBOT
# halcyon stag Alright. Now how can i open the disk of Ubuntu?

To see where the actual WSL disk file lives
It should be here:

D:\WSL\Ubuntu-24.04\ext4.vhdx

Don’t open/edit ext4.vhdx directly while WSL is running. Treat that as the virtual disk container. Use \\wsl.localhost\Ubuntu-24.04-D\... for normal file access.

halcyon stag
#

Alright. Im not that expericed so I don't know what happened. But everything is fine right? Anything need to check?

dense fractalBOT
# halcyon stag Alright. Im not that expericed so I don't know what happened. But everything is ...

Yes, based on the checks you pasted, everything important is fine.

What happened in plain English:

  • We copied your Ubuntu WSL system from C: to D:
  • The new copy is named Ubuntu-24.04-D
  • We made it the default Ubuntu
  • OpenClaw is running inside that D: copy
  • The OpenClaw gateway check passed: Connectivity probe: ok
  • The old C: copy is still there but stopped, so you have a backup/rollback

Nothing else urgent to check right now.

For peace of mind, these are the only two checks I’d run tomorrow after a normal restart:

dense fractalBOT
halcyon stag
#

now do I need to run anything?

dense fractalBOT
# halcyon stag now do I need to run anything?

No, nothing else right now.

You can stop here.

Only run these tomorrow after a normal restart, just to confirm everything stayed good:

wsl --list --verbose
wsl -d Ubuntu-24.04-D -- /home/wrakeeb/.npm-global/bin/openclaw gateway status

For now: don’t delete the old Ubuntu-24.04 distro or the backup tar. That’s your rollback.

halcyon stag
#

can I run it now?

dense fractalBOT
# halcyon stag can I run it now?

Yes, you can run it now if you want. It’s just a check, it won’t change anything.

Run:

wsl --list --verbose
wsl -d Ubuntu-24.04-D -- /home/wrakeeb/.npm-global/bin/openclaw gateway status

Expected good result:

  • Ubuntu-24.04-D is Running
  • Ubuntu-24.04 is Stopped
  • gateway status says Connectivity probe: ok
halcyon stag
#
PS C:\WINDOWS\system32> wsl --list --verbose
>> wsl -d Ubuntu-24.04-D -- /home/wrakeeb/.npm-global/bin/openclaw gateway status
  NAME              STATE           VERSION
* Ubuntu-24.04-D    Running         2
  Ubuntu-24.04      Stopped         2

🦞 OpenClaw 2026.5.4 (325df3e) — I don't sleep, I just enter low-power mode and dream of clean diffs.

│
â—‡
Service: systemd user (enabled)
File logs: /tmp/openclaw/openclaw-2026-05-17.log
Command: /usr/bin/node /home/wrakeeb/.npm-global/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/.config/systemd/user/openclaw-gateway.service
Service env: OPENCLAW_GATEWAY_PORT=18789

Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json

Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.

Runtime: running (pid 496, state active, sub running, last exit 0, reason 0)
Connectivity probe: ok
Capability: admin-capable

Listening: 127.0.0.1:18789
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
dense fractalBOT
halcyon stag
#

THe old distro is in C drive still?

dense fractalBOT
# halcyon stag THe old distro is in C drive still?

Most likely yes. The old Ubuntu-24.04 is still registered and stopped, and because it was your original install, it’s probably still stored on C:.

To confirm exactly, run this in PowerShell:

Get-ChildItem HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss |
  ForEach-Object {
    $p = Get-ItemProperty $_.PsPath
    [PSCustomObject]@{
      Name = $p.DistributionName
      BasePath = $p.BasePath
    }
  } | Format-Table -AutoSize

Look at BasePath:

dense fractalBOT
halcyon stag
#
>>   ForEach-Object {
>>     $p = Get-ItemProperty $_.PsPath
>>     [PSCustomObject]@{
>>       Name = $p.DistributionName
>>       BasePath = $p.BasePath
>>     }
>>   } | Format-Table -AutoSize

Name           BasePath
----           --------
Ubuntu-24.04   C:\Users\rakib\AppData\Local\wsl\{622de361-176f-4359-acdd-a4edd2f2173e}
Ubuntu-24.04-D D:\WSL\Ubuntu-24.04
dense fractalBOT
# halcyon stag ```PS C:\WINDOWS\system32> Get-ChildItem HKCU:\Software\Microsoft\Windows\Curren...

Confirmed:

  • old Ubuntu-24.04 is still on C:
    C:\Users\rakib\AppData\Local\wsl\{622de361-176f-4359-acdd-a4edd2f2173e}
  • new Ubuntu-24.04-D is on D:
    D:\WSL\Ubuntu-24.04

So yes, the old distro is still taking C: space. Keep it for a few days as rollback. Later, when you’re 100% sure everything works, the command to remove the old C: distro is:

wsl --unregister Ubuntu-24.04

But don’t run that today.

halcyon stag
#

Itll delete if I run this?

dense fractalBOT
# halcyon stag Itll delete if I run this?

Yes. wsl --unregister Ubuntu-24.04 deletes that old C: distro and its Linux filesystem. It is not a normal “remove from list” command; it removes the distro data.

So don’t run it unless:

  • Ubuntu-24.04-D has worked for a few days
  • OpenClaw still starts after reboot
  • you no longer need anything from the old C: copy
  • you still have the backup tar at D:\WSL\Backups\Ubuntu-24.04-backup.tar

Right now I recommend: do not run it today.

halcyon stag
#

Alright thank you.

Summurize the chats and make a compact list with all the important details and solutions. Make a minimal list

dense fractalBOT
# halcyon stag Alright thank you. Summurize the chats and make a compact list with all the im...

Summary:

  • Goal: move WSL Ubuntu + OpenClaw from C: to D: without breaking setup.
  • Original distro: Ubuntu-24.04
  • New D: distro: Ubuntu-24.04-D
  • Backup created: D:\WSL\Backups\Ubuntu-24.04-backup.tar
  • New distro location: D:\WSL\Ubuntu-24.04
  • Old distro location: C:\Users\rakib\AppData\Local\wsl\{622de361-176f-4359-acdd-a4edd2f2173e}
  • Final WSL state: Ubuntu-24.04-D is default + running; old Ubuntu-24.04 is stopped.
  • OpenClaw verified in D: distro: OpenClaw 2026.5.4 (325df3e)
  • OpenClaw gateway verified: Connectivity probe: ok, listening on 127.0.0.1:18789
  • Task Scheduler script updated: C:\Users\rakib\start-openclaw-hidden.vbs now launches Ubuntu-24.04-D
  • Safe file access path: \\wsl.localhost\Ubuntu-24.04-D\home\wrakeeb
  • Do not edit/open directly while running: D:\WSL\Ubuntu-24.04\ext4.vhdx
  • Important: do not run wsl --unregister Ubuntu-24.04 yet; it deletes the old C: distro.
  • Keep old Ubuntu-24.04 and backup tar for a few days as rollback.
halcyon stag
#

More details would be helpful

dense fractalBOT
# halcyon stag More details would be helpful

Detailed summary:

What we moved

  • Original WSL distro was Ubuntu-24.04.
  • It was stored on C: at:
    C:\Users\rakib\AppData\Local\wsl\{622de361-176f-4359-acdd-a4edd2f2173e}
  • We exported it to:
    D:\WSL\Backups\Ubuntu-24.04-backup.tar
  • We imported that backup as a new distro:
    Ubuntu-24.04-D
  • New distro storage is:
    D:\WSL\Ubuntu-24.04

Final state

  • Ubuntu-24.04-D is now the default WSL distro.
  • Ubuntu-24.04-D is running.
  • Old Ubuntu-24.04 is stopped and still available as rollback.
dense fractalBOT
# halcyon stag More details would be helpful
  • OpenClaw is running inside Ubuntu-24.04-D.

OpenClaw verification

  • Version checked:
    OpenClaw 2026.5.4 (325df3e)
  • Gateway status checked successfully.
  • Good result shown:
    Connectivity probe: ok
  • Gateway is listening on:
    127.0.0.1:18789
  • Dashboard URL:
    http://127.0.0.1:18789/

Autostart / Task Scheduler

  • Task name:
    OpenClaw AutoStart
  • It runs:
dense fractalBOT
# halcyon stag More details would be helpful

C:\Users\rakib\start-openclaw-hidden.vbs

  • We backed it up as:
    C:\Users\rakib\start-openclaw-hidden.vbs.bak
  • We changed the VBS so it launches:
    wsl.exe -d Ubuntu-24.04-D bash -lc "~/start-openclaw.sh"
  • After reboot, Task Scheduler successfully started Ubuntu-24.04-D.

Important problem encountered

  • WSL sometimes locked:
    D:\WSL\Ubuntu-24.04\ext4.vhdx
  • Error was:
    ERROR_SHARING_VIOLATION
  • Fix/workaround:
    restart WSL service or reboot Windows.
  • Final reboot test passed.

How to open Ubuntu files

dense fractalBOT
# halcyon stag More details would be helpful
  • Safe File Explorer path:
    \\wsl.localhost\Ubuntu-24.04-D\home\wrakeeb
  • Actual virtual disk file:
    D:\WSL\Ubuntu-24.04\ext4.vhdx
  • Do not open/edit ext4.vhdx directly while WSL is running.

What not to do yet

  • Do not run:
    wsl --unregister Ubuntu-24.04
  • That deletes the old C: distro’s filesystem.
  • Keep old Ubuntu-24.04 and D:\WSL\Backups\Ubuntu-24.04-backup.tar for a few days.

Future cleanup, only after everything works for a few days

  • Remove old C: distro:
    wsl --unregister Ubuntu-24.04
  • Only do this after confirming Ubuntu-24.04-D and OpenClaw still work after multiple restarts.
halcyon stag
#

Ty

dense fractalBOT
# halcyon stag Ty

Anytime. Glad we got it moved safely.

If this thread solved it, please right-click the solution message → Apps → ✅ Mark Solution. That helps Answer Overflow index the steps for future users.