Recovering MBR partitioned USB Drive

I created a bootable RHEL-7 USB using Win32 Disk Imager. After installing the OS I had to revert back the USB to its normal FAT32 stick. Here’s the catch: since all the OS files are written at block level, the USB doesn’t get recognized by the file system and hence not mounted on it. How to format my USB if isn’t visible on the file system?!

I usually use YUMI or LILI to create bootable Linux USB sticks. They create the bootable USB at file level keeping the file system (FAT32 or NTFS) intact. I can even see the OS files written inside the USB after being made them bootable. Both YUMI and LILI were not able to create the right image from the RHEL-7 iso. A guy in the CentOS posted that imaging the OS from Win32 disk imager worked out well for him. So I made the RHEL-7 USB using Win32 disk imager and boy it worked like charm!

Win32 disk imager had created 3 partitions on my USB drive. Only one 6 MB partition was recognizable as Anaconda. ( In case you don’t know, Anaconda is the OS installer program used in RHEL, CentOS, Fedora and other RedHat-derived distributions.) And the other two large partitions were not at all visible. The USB has 16 GBs of storage space; now only 6MB Anaconda volume is visible when I inserted it into the USB port. I had to format the complete USB and the Windows disk manager was showing only the Anaconda partition and the rest as unallocated space. I was unable to format the partitions individually as they were in MBR (Master Boot Record) format.

Thanks to this Q&A at server fault. I’m able to wipe out the USB at the block level using diskpart to get the complete 16 GB as one volume in disk manager. I ran the commands on the administrator command line,

list disk
select disk disk_no


Now in the disk manager I can create a volume and format the USB.


About Deepak Devanand

Seeker of knowledge
This entry was posted in Fix it, Uncategorized and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s