LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-13-2014, 03:02 PM   #1
duffrecords
LQ Newbie
 
Registered: Nov 2009
Location: Los Angeles, CA
Posts: 29

Rep: Reputation: 0
unable to repair GRUB2 bootloader due to busy /dev/md127


One of the drives in my RAID 10 array failed during a power outage, putting the array into a degraded state. Unfortunately, it was the first drive in the array, which contained the bootloader. I was able to use an Ubuntu Server install CD to boot the server into rescue mode. When the rescue procedure prompted me to select a root device, I pressed Ctrl-Alt-F2 and switched to a shell instead. I was able to partition the replacement drive, add it to the array, and rebuild the array, according to this guide:

http://stackful-dev.com/raid-101-rec...rives-die.html

So far, so good. However, when I try to repair the bootloader, I cannot mount the array (/dev/md127) because it says "device or resource busy." I've also tried to stop the array but I see the same error message. If I try to reboot the server without the Ubuntu CD, it goes to a GRUB prompt and can't find the root device. What else can I try to repair the bootloader?

Here are the details for my server:
Ubuntu Server 12.04
RAID 10
/dev/sda hd0 (sda is the replaced drive)
/dev/sdb hd1
/dev/sdc hd2
/dev/sdd hd3
/dev/sde hd4
/dev/sdf hd5

* Please note the partitions in this array are GPT because the drives are 3 TB each. I read that you can't simply use dd to copy the MBR because of the unique IDs of the drives. Each drive has a BIOS boot partition and a data partition:
Code:
Number  Start   End           Size          File system  Name      Flags
 1      1049kB  2097kB        1049kB                     biosgrub  bios_grub
 2      2097kB  3000592499kB  3000590402kB               raid      raid

Last edited by duffrecords; 03-13-2014 at 03:09 PM.
 
Old 03-13-2014, 06:05 PM   #2
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
Is this an efi system? What is the ouput of
Code:
set
at the grub prompt? You can use
Code:
ls
at the grub prompt to search for your grub.cfg file. then something similar to this
Code:
configfile (hd?,?)/path to grub.cfg
to get menu. I'm assuming your not getting a grub-rescue prompt.

Last edited by colorpurple21859; 03-13-2014 at 06:06 PM.
 
Old 03-14-2014, 12:20 AM   #3
duffrecords
LQ Newbie
 
Registered: Nov 2009
Location: Los Angeles, CA
Posts: 29

Original Poster
Rep: Reputation: 0
grub> set
color_highlight=black/white
color_normal=white/black
pager=
prefix=(vg_raid10-root)/boot/grub
root=vg_raid10-root
 
Old 03-14-2014, 12:26 AM   #4
duffrecords
LQ Newbie
 
Registered: Nov 2009
Location: Los Angeles, CA
Posts: 29

Original Poster
Rep: Reputation: 0
I ran
Code:
configfile (vg_raid10-root)/boot/grub
and it booted! May I buy you a beer, sir?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
grub2 can't see my win 7 partition and yast2 bootloader can't reinstall grub2 jjrojaspy SUSE / openSUSE 5 07-07-2013 10:38 PM
Install on raid setup and /dev/md127 polch Slackware - Installation 0 10-02-2012 04:30 AM
[SOLVED] How to start Grub2-bootloader from extlinux-bootloader? floppy_stuttgart Linux - Newbie 13 11-13-2011 06:43 PM
[SOLVED] Attempts to work around a mdadm bug/ mdadm cannot get exclusive access to /dev/md127 Sereph Linux - Newbie 1 08-16-2011 03:21 AM
when i use 'mdadm -S /dev/md127', it produce kernel event with no stop wwyyxx26 Linux - Kernel 1 05-01-2011 05:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration