Use old raid drive as boot device without data loss

Posted by Gabriel on Server Fault See other posts from Server Fault or by Gabriel
Published on 2014-05-28T15:44:01Z Indexed on 2014/05/28 21:33 UTC
Read the original article Hit count: 226

Filed under:
|
|
|
|

There were two disks in sw-raid. There were /dev/md1 as swap, /dev/md2 as boot and a /dev/md3 with ext4.

The sw-raid was disabled by stopping and removing mdadm and then zeroing the superblock on each /dev/mdX partition with:

sudo mdadm --zero-superblock /dev/sda1
sudo mdadm --zero-superblock /dev/sda2
sudo mdadm --zero-superblock /dev/sda3

In the disk that is the first boot device, I don't know if it's relevant, the system type of each partition was set back from fd to 82 or 83 with fdisk, /etc/fstab was updated, changing /dev/mdX to /dev/sdaX, and grub was reinstalled on the boot partition (/dev/sda2) with grub-instal. But the system wont boot.

What else should I do to use this disk as the boot device without reinstall or data loss?

Current output of fdisk

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    33556480    16777216+  82  Linux swap / Solaris
/dev/sda2   *    33558528    34607104      524288+  83  Linux
/dev/sda3        34609152  3907027120  1936208984+  83  Linux

With it doesn't boot I mean that it stops in the grub console (with the grub> symbol). A ls command says:

(hd0) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1) (hd1) (hd1,msdos1)

It's weird because hd1 was formatted with ext4...

© Server Fault or respective owner

Related posts about centos

Related posts about software-raid