0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

WSL2へのHDDのマウント

Posted at

概要

WSL2を使ってHDDの読み込みをする際の備忘録。Linux形式(ext4)へのフォーマットは別途紹介予定。

環境

  • OS: Windows 11
  • WSL2 (Ubuntu 22.04)

Windows側での操作

  • Windows PowerShellを管理者として実行し、以下でDevice IDを調べる。

    $ GET-CimInstance -query "SELECT * from Win32_DiskDrive"
    

     

  • Device IDをwslにmountする。

    $ wsl --mount <DeviceID> --bare
    

    例えば、が \.\PHYSICALDRIVE2 の場合、

    $ wsl --mount \\.\PHYSICALDRIVE2 --bare
    

    とする。

WSLでの操作

  • UUIDの調査

    $ sudo blkid
    

     

  • fstabへの書き込み

    UUID="<UUID>" <マウントポイント> <フォーマット> defaults 0 0
    

    ※WSLを立ち上げる際にfstabを読み込むので、自動でマウントされるはずだが、自動で読み込めないときがある。その際には、再度、以下でfstabを読み込む。

    $ sudo mount -a
    

     

参考URL
https://qiita.com/resnant/items/b208d4f95cda3433ddd9

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?