Score:0

Convert MDADM RAID disk to non-raid disk

kr flag

I have an existing RAID1 disk that is my boot & root drive locally. I want to convert this disk to a non-RAID disk and allow boot & root to be mounted without mdadm. What is the best way to do this?! I am having a tough time getting this converted to allow boot. I have imaged the disk and backed it up to other disks to test and haven't been able to do it with the commands I've been able to find.

Here are the instructions I've found but I don't think that this works for a boot partition: https://superuser.com/questions/971549/how-to-convert-a-software-raid-1-partition-to-non-raid-partition

Derek Edwards avatar
kr flag
I feel that the issue might be with grub2 not being reinstalled on the partition. Any idea what needs to be done to do that? I get grub rescue when trying to boot from that drive again.
tsc_chazz avatar
vn flag
From https://serverfault.com/questions/1131134/how-to-boot-debian-from-both-drives-from-a-md-raid1-with-lvm : seems the command you want is `grub-install /dev/sda` (assuming it's `/dev/sda` you want to boot from of course)
Derek Edwards avatar
kr flag
I have done this before but the grub is no valid and I go straight to grub-rescue. I am running grub2, so does that mean I should be running grub2-install /dev/sda?
tsc_chazz avatar
vn flag
Doesn't seem to be any such command. I'll bow out for now.
Derek Edwards avatar
kr flag
So, it looks like the big bit that I need to figure out is how to fix the partition table. People just say use testdisk, but I'm not sure the steps to actually fix the partition table. Is it simply just run it? I have no idea
Derek Edwards avatar
kr flag
It looks like i have an old grub installation, that may be what is causing the issue? The error I get everytime I try and run grub-install is `grub-install: error: cannot find EFI directory` When I go into my /boot partition there is no EFI directory, it seems that everything is installed under grub2 (grub.cfg, etc is all there).
Score:0
kr flag

In the end I have installed RHEL8_7 on a completely different hard drive. This let me at least boot into the OS. I then did the following:

  • copied everything from my /root/ partition of my other drive.
  • edited the /etc/fstab with the new entries for the UUID
  • booted and made sure that there were no issues
  • yum reinstall kernel-XXXX so I have the exact kernel I was running previously on the new HDD.
  • Set kernel to default
  • Reboot and verify all is working (I had modules that were not loading due to them being installed on a different kernel).
  • Add in all other fstab entries required
  • Expand the filesystem...
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.