LoginSignup
46
46

More than 5 years have passed since last update.

Raspberry Pi用に使用したSDカードをWindowsで使えるように戻す

Posted at

OS用SDカードを作っているつもりが、OSイメージを
普段使っているmicroSDカードに焼いてしまったわけで(泣)
データはともかくSDカードを元に戻すのに結構はまったのでメモ。


SDカードの状態確認

エクスプローラで見ると、空き容量がだいぶ減ってしまっている。
実用には堪えないレベル。

Win81_000237_1.png

・コマンドプロンプトを管理者権限で起動

Win81_000238_1.png

・diskpartコマンドによる確認

C:\windows\system32>diskpart

Microsoft DiskPart バージョン 6.3.9600

Copyright (C) 1999-2013 Microsoft Corporation.
コンピューター: TAMATAB

DISKPART> list disk

  ディスク      状態           サイズ   空き   ダイナ GPT
  ###                                          ミック
  ------------  -------------  -------  -------  ---  ---
  ディスク 0    オンライン           119 GB      0 B        *
  ディスク 1    オンライン            59 GB      0 B
  ディスク 2    オンライン          7631 MB  4809 MB

DISKPART> list volume

  Volume ###  Ltr Label        Fs    Type        Size     Status     Info
  ----------  --- -----------  ----  ----------  -------  ---------  --------
  Volume 0     C   Windows      NTFS   Partition    113 GB  正常         ブート

  Volume 1         Windows RE   NTFS   Partition    320 MB  正常         非表示

  Volume 2         SYSTEM       FAT32  Partition    200 MB  正常         システ
ム
  Volume 3         Recovery im  NTFS   Partition   5389 MB  正常         非表示

  Volume 4     D   DATA         NTFS   リムーバブル        59 GB  正常

  Volume 5     E   boot         FAT    リムーバブル        56 MB  正常

list disklist volumeをとりあえず打ってみる。
このディスク 2、Volume 5 というのが Raspberry Pi 用のOSを入れたSDカードの情報。
もともと8GBのカードだが、利用できるサイズが56MBになっている。

一回ディスクを解放する

・ディスクをクリーン

DISKPART> select disk 2

ディスク 2 が選択されました。

DISKPART> clean

DiskPart はディスクを正常にクリーンな状態にしました。

・状態確認

DISKPART> list disk

  ディスク      状態           サイズ   空き   ダイナ GPT
  ###                                          ミック
  ------------  -------------  -------  -------  ---  ---
  ディスク 0    オンライン           119 GB      0 B        *
  ディスク 1    オンライン            59 GB      0 B
* ディスク 2    オンライン          7631 MB  7630 MB

DISKPART> list volume

  Volume ###  Ltr Label        Fs    Type        Size     Status     Info
  ----------  --- -----------  ----  ----------  -------  ---------  --------
  Volume 0     C   Windows      NTFS   Partition    113 GB  正常         ブート

  Volume 1         Windows RE   NTFS   Partition    320 MB  正常         非表示

  Volume 2         SYSTEM       FAT32  Partition    200 MB  正常         システ
ム
  Volume 3         Recovery im  NTFS   Partition   5389 MB  正常         非表示

  Volume 4     D   DATA         NTFS   リムーバブル        59 GB  正常

  Volume 5     E                       リムーバブル          0 B  使用不可

Volume 5 が使用不可になっている。

ちなみに、この状態はエクスプローラから見るとこんな感じ。

Win81_000239_1.png

パーティションの再作成

・パーティション作成

DISKPART> create partition primary

DiskPart は指定したパーティションの作成に成功しました。

DISKPART> list volume

  Volume ###  Ltr Label        Fs    Type        Size     Status     Info
  ----------  --- -----------  ----  ----------  -------  ---------  --------
  Volume 0     C   Windows      NTFS   Partition    113 GB  正常         ブート

  Volume 1         Windows RE   NTFS   Partition    320 MB  正常         非表示

  Volume 2         SYSTEM       FAT32  Partition    200 MB  正常         システ
ム
  Volume 3         Recovery im  NTFS   Partition   5389 MB  正常         非表示

  Volume 4     D   DATA         NTFS   リムーバブル        59 GB  正常

* Volume 5     E                RAW    リムーバブル      7630 MB  正常

Volume 5 が本来のディスクサイズを取り戻した。
あとはフォーマットすれば通常通り使用できる。

・フォーマット

DISKPART> format quick

  100% 完了しました

DiskPart は、ボリュームのフォーマットを完了しました。

DISKPART> list volume

  Volume ###  Ltr Label        Fs    Type        Size     Status     Info
  ----------  --- -----------  ----  ----------  -------  ---------  --------
  Volume 0     C   Windows      NTFS   Partition    113 GB  正常         ブート

  Volume 1         Windows RE   NTFS   Partition    320 MB  正常         非表示

  Volume 2         SYSTEM       FAT32  Partition    200 MB  正常         システ
ム
  Volume 3         Recovery im  NTFS   Partition   5389 MB  正常         非表示

  Volume 4     D   DATA         NTFS   リムーバブル        59 GB  正常

* Volume 5     E                FAT32  リムーバブル      7630 MB  正常

ファイルシステムが FAT32 になっている。
これで Windows からディスクが利用可能になる。

Win81_000240_1.png

46
46
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
46
46