help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help installing grub


From: Yan Seiner
Subject: Re: Help installing grub
Date: Wed, 30 May 2012 18:16:25 -0700
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707)

Jordan Uggla wrote:
On Tue, May 29, 2012 at 7:30 PM, Yan Seiner <address@hidden> wrote:
I need some help with a custom install.

I have a client that I access via a remote connection.  Their server has two
physical drives set up in a software RAID-1.  To make a long story short,
through a "perfect storm" series of events, they lost both hard drives.  I
shipped them a backup of their data and their local admin got the server
running on a single drive.

I figured I could set up the other drive as 1/2 of a RAID array, install the
data, and then reboot the server with the RAID running and complete the
mirroring operation.  I mostly followed this process:
 https://wiki.archlinux.org/index.php/Convert_a_single_drive_system_to_RAID

I am running into trouble getting a valid boot sector on the new raid drive.
 This is the first time I've dealt with GRUB 2, and I am not sure how to set
it up to boot off of /dev/md1 (the boot partition).

Here's what I have:

/dev/sdb - current boot drive with GRUB installed correctly.  This boots
just fine.
/dev/sda - new half-array drive without GRUB installed.

Q:  How do I get GRUB installed so it boots off of /dev/md1 (/dev/sda2)?

To install grub you need to use grub-install. If you were already in
the booted system, with the array already setup normally, you would
simply run "grub-install /dev/sda && grub-install /dev/sdb". It
doesn't sound like that's the case for you, but it's hard to tell and
that information is critical. How / where is /dev/md1 going to be
mounted when you run grub-install?
The system is currently booted off /dev/sdb1. sdb has a different partitioning scheme. It's my goal to reboot the system with the raid running, then repartition /dev/sdb to add the missing half of the raid array.

The relevant parts of the system setup on the disk that I want to boot from:

/etc/fstab:
/dev/md0    /        ext4    errors=remount-ro 0    0
/dev/md1    /boot        ext4    defaults    0    1

/proc/mdstat:
md1 : active (auto-read-only) raid1 sda2[1]
     248896 blocks [2/1] [_U]
md0 : active raid1 sda1[1]
     979840 blocks [2/1] [_U]

fdisk /dev/sda -l
  Device Boot      Start         End      Blocks   Id  System
/dev/sda1 1 122 979933+ fd Linux raid autodetect /dev/sda2 * 123 153 249007+ fd Linux raid autodetect



I am doing this all via ssh; I have no physical access to the server, so
some way of checking that the system will actually boot correctly would be
welcome.

This is possible via qemu (but you need to be *very* careful). I will
go into more detail on this after you've answered my above question.



--
Help us raise money for my kids' swim team!

http://www.facebook.com/RiverRoadKids4Kids




reply via email to

[Prev in Thread] Current Thread [Next in Thread]