Sometimes a hardware RAID controller or fakeraid (BIOS) can leave metadata that makes it impossible to install Windows or Linux, or it installs correctly, but causes a kernel panic or a 0xb7 blue screen error on the first boot. The only method I could find to delete the metadata *quickly* is to zero out the last 512KB of data on the disk using the following command:
dd if=/dev/zero of=$YOUR_DEV bs=512 seek=$(( $(blockdev --getsz $YOUR_DEV) - 1024 )) count=1024
Replace $YOUR_DEV with the physical device, such as /dev/sda
You could just zero the whole disk, but that could take hours. This command executes in less than a second.
I just want to say thank you. I had an EXT4 HD that I previously stored my old OS on before switching to manjaro/arch. I though I had incorrectly set up automounting, but then I figured out that the disk used to be used in RAID. Nothing else worked, but this command successfully cleared the RAID data, restoring the drive to a state where I could extract the files.
Wow. I had been fighting this problem for about 6 hours when I found your blog. Thanks! Your instructions fixed it straight away!… Great post!
It should be noted that you are not actually wiping out all of LSI’s metadata. You are wiping out the areas that Linux and Windows are looking to access. So some of LSI’s metadata is still there and could be accessible via an LSI RAID card.
Removing the 1st 512 bytes (MBR/partition table) is usually enough for LSI to see drives as ‘unconfigured’.
Thanks! This was one of the few resources I found after searching for quite some time on how to clear out stubborn raid meta data. Some sources say it’s at the front of the disk, others say at the end but they just give you an arbitrary seek value. This solution is perfect because it uses your actual drive size offset for the seek value.
Thanks!
You’re welcome!
Thanks!
I boot with Linux Live CD and execute your command to get rid of metadata warning.
Yup! Ya fixed my wagon. Thanks!
I wanted to say Thank you too. You just saved me! I also just posted a link back to your post on my blog. I really appreciate your help!
http://www.mytechdocs.com/removing-raid-me…sks-when-reusing/
Thank you. I’ ve just fixes the problem with an ssd and I’ ve installed linux whitout any problem.
How about this serverfault.com/a/845076/176452 and mdadm –zero-superblock ?
I think this would only apply to a Linux “md” software RAID, not an actual hardware RAID controller.
Thanks a lot! – I had 4 discs which has previously been installed in a Dell PowerEdge server with a Perc 5i controller, and needed to move them to another server without Raid-controller and configure them for Linux softraid. I spent hours, trying to get the discs to show up, but your trick did it!
Tanks again for this great tip.
Thank Sir – worked a treat !
I just say thank you, you saved my day