1. 程式人生 > 實用技巧 >windows 安裝 pi_如何在Windows中回收Raspbery Pi的SD卡的全部容量

windows 安裝 pi_如何在Windows中回收Raspbery Pi的SD卡的全部容量

windows 安裝 pi

windows 安裝 pi

If you’ve used an SD card for more advanced purposes than simply storing digital photos (e.g. running a mobile or micro OS), you’ll find it requires a little more finesse than simply formatting the card to reclaim all the space. Read on as we show you how.

如果您使用SD卡的目的不是簡單地儲存數字照片(例如,執行移動或微型作業系統),而是將其用於更高階的用途,那麼您會發現,與簡單地格式化卡以回收所有空間相比,它需要更多的技巧。 繼續閱讀,我們向您展示如何。

Dear How-To Geek,

親愛的How-To Geek,

I followed along with one of your great Raspberry Pi tutorials a few months ago. Just recently I upgraded to a bigger SD card for the Pi and pulled the old one to use for another project. When I went to reformat the card only 64MB out of the original capacity was available and even when I went into Disk Management in Windows the best I could do is dump the contents of the inaccessible (and presumably Linux-filled) partition. This left me with a tiny Windows accessible partition and a big phantom partition I can’t do anything with.

幾個月前,我跟隨了您出色的Raspberry Pi教程之一。 最近,我為Pi升級到了更大的SD卡,並把舊的SD卡用於其他專案。 當我重新格式化卡時,原始容量中只有64MB可用,即使我進入Windows中的磁碟管理,我能做的最好的事情就是轉儲無法訪問的分割槽(大概是Linux填充)的內容。 這給了我一個很小的Windows可訪問分割槽,一個大幻影分割槽,我無能為力。

I’m sure there’s a simple fix but I’m not even sure if I did a good job describing my problem (so as you an imagine I’m at a loss for what to search for in Google to get to the bottom of things!) Help!

我敢肯定有一個簡單的解決方法,但是我什至不確定我是否能很好地描述我的問題(因此,您可以想象,我對於在Google中搜索什麼內容無所適從感到茫然!) 幫幫我!

Sincerely,

真誠的

Suffering from Stunted SD Card

SD卡受阻

Don’t worry Suffering, we grabbed a card we’d previously used for a Pi project just to recreate your situation and show you how to get the full capacity of your card back. The heart of the problem is the partition changes the SD card undergoes during the initial PI setup: 64MB of the card is reserved as a Windows-accessible FAT32 partition which hosts configuration files and other small files that benefit from cross-OS FAT32-based accessibility (so you can easily pop the SD card in a modern PC and tweak those configuration files) and the rest is formatted for use by Raspbian, which is a Debian-derived version of Linux. As a result, the majority of the card becomes somewhat of a black hole to Windows.

別擔心苦難,我們拿起了以前用於Pi專案的卡,只是為了重新建立您的情況並向您展示如何取回卡的全部容量。 問題的核心是SD卡在初始PI設定過程中所經歷的分割槽更改:該卡的64MB保留為Windows可訪問的FAT32分割槽,該分割槽託管配置檔案和其他小檔案,這些檔案受益於基於跨OS FAT32的訪問性(因此,您可以輕鬆地將SD卡彈出到現代PC中並調整這些配置檔案),其餘的則經過格式化以供Raspbian使用,Raspbian是Debian衍生Linux版本。 結果,大多數卡對於Windows來說都是一個黑洞。

That said, it’s easy to repair when you have the right tool at your fingertips. First, let’s take a peek at what the SD card looks like if you attempt to reclaim the space using Disk Manager as you did:

就是說,只要觸手可及的工具,維修起來就很容易。 首先,讓我們看一下嘗試像使用磁碟管理器那樣回收空間時SD卡的外觀:

You can format the tiny 64M FAT32 partition, but the remainder of the SD card remains “Unallocated” after you dump the existing (and inaccessible) Linux partition. No amount of pushing or shoving in the Disk Manager application is going to fix this problem. Instead, we’re going to turn to the simple and effective DISKPART tool.

您可以格式化微小的64M FAT32分割槽,但是在轉儲現有(且無法訪問)Linux分割槽後,SD卡的其餘部分仍為“未分配”。 在磁碟管理器應用程式中進行大量推送或推送都不會解決此問題。 相反,我們將轉向簡單有效的DISKPART工具。

Open up the Start Menu and type “diskpart” in the run box. Press enter. You’ll be prompted by the Windows UAC to authorize admin access to the DISKPART tool.

開啟“開始”選單,然後在執行框中鍵入“ diskpart”。 按回車。 Windows UAC將提示您授權管理員對DISKPART工具的訪問。

A command-prompt-like window will open up, only the prompt will say “DISKPART”. At that prompt, type “list disk”.

會開啟類似命令提示符的視窗,只有提示符會顯示“ DISKPART”。 在該提示符下,鍵入“列表磁碟”。

In the list output on our machine you can see the computer’s hard drive (119GB) and the removable SD card (14GB). It isabsolutely critical you note the proper disk number. DISKPART commands are immediate and without any warning. If you type in the wrong disk number, you’re going to have a really bad time.

在我們機器上的列表輸出中,您可以看到計算機的硬碟驅動器(119GB)和可移動SD卡(14GB)。 注意正確的磁碟編號絕對至關重要。 DISKPART命令是立即執行的,沒有任何警告。 如果您輸入了錯誤的磁碟號,那將是非常糟糕的時間。

After identifying your SD card’s disk number, enter the following command “select disk #” where # is the disk number of your SD card.

識別SD卡的磁碟號後,輸入以下命令“ select disk#”,其中#是SD卡的磁碟號。

Whatever commands you execute after this point will only make changes to the selected disk; now would be a good time to double check you’ve selected the right disk just to be extra safe.

在此之後執行的任何命令都只會更改所選磁碟。 現在是仔細檢查您選擇正確的磁碟的最佳時機,以確保更加安全。

Next, now enter the command “clean”

接下來,現在輸入命令“ clean”

The clean command zeroes out the sectors of the disk that contain the partition data. If you wished to zero out all data on the SD card you could use “clean all” instead, but unless you have a pressing privacy/security reason for overwriting the the entire SD card with zeros, it’s unwise to waste the read/write cycles of the flash media.

clean命令將包含分割槽資料的磁碟扇區清零。 如果您希望將SD卡上的所有資料歸零,則可以使用“全部清除”,但是除非您出於緊迫的隱私/安全原因而用零覆蓋整個SD卡,否則浪費讀/寫週期是不明智的快閃記憶體介質。

After cleaning the disk, enter the following command “create partition primary”

清理磁碟後,輸入以下命令“ create partition primary”

The command, as the syntax implies, creates a new partition on the disk and sets it to primary. After creating the primary partition, the entire storage capacity of the SD card should be available to Windows. If we peek back into Disk Manager, we no longer see a tiny partition with a huge hunk of unallocated space, but a large partition ready to be formatted:

顧名思義,該命令將在磁碟上建立一個新分割槽並將其設定為主分割槽。 建立主分割槽後,SD卡的全部儲存容量應可用於Windows。 如果我們回顧磁碟管理器,我們將不再看到帶有巨大未分配空間的小分割槽,而是準備格式化的大分割槽:

That’s all there is to it! A little DISKPART wizardy and the SD card is factory fresh again.

這裡的所有都是它的! 有點DISKPART嚮導,SD卡又恢復了出廠。

翻譯自: https://www.howtogeek.com/170794/ask-htg-how-can-i-reclaim-the-full-capacity-of-an-sd-card/

windows 安裝 pi