Wednesday, 2 May 2018

Handling disk partitions in Windows and Linux

I started working in the Quantum Architectures Group just a couple of days ago. And well believe it or not I had my fare share of struggles when it came to partitioning an SD card.

So, let's simply document this process here. First, I'll put the simple stuff. Suppose I have a partitioned flash drive/pen drive/SD card. For some reason you want to clean up this whole partitioned space and start afresh. Follow the steps below (for Windows):
1. Open Disk Management (WindowsKey + X > Disk Management)
2. Check for your disk. It should show your (partitioned) pen drive.
In my case, the primary FAT format partition (200Mb) was corrupt, another free Ext2 formatted partition was healthy, and one 14Gb partition was unformatted (so, it would not show up in the explorer when you plug it in).
3. Now delete the partitions until all your partitions show up as unallocated space.
Again, in may case the FAT partition was corrupt so, I could not format it. So, next steps follows.
4. Open Command Prompt with Admin privileges. Type >diskpart and hit enter. Now follow the following picture to create a completely new single partitioned space.


Next, I wanted to create partition for a bootable linux system for an SoC. Windows partions are straightforward from DiskManagement. Let's switch to Linux and use the fdisk tool to create our partition. Now there are many tutorials to do this so, I won't go in detail about this. But I would mention a few things that I did wrong which did not let me create my partitions properly. And it involves using the 'Disks' application in the Ubuntu menu.


No comments:

Post a Comment