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

Re: Rescue mode: cannot fix boot after raid1 repair



On Thu, 06 Nov 2014, Ron Leach wrote:
> I wanted to skip the part where the new disk was re-synced because
> that's going to take some 8 hours or so

Start it now; you don't have to wait for it to finish.

> On 06/11/2014 16:30, Don Armstrong wrote:
> >2) Start the raid for / in degraded mode from the rescue media shell
> 
> Not quite. The rescue mode installer gives the option to start the
> array, and I started all 6 raid arrays. (Was that the right thing to
> do?) Hadn't had a shell offered, at that point.

That's fine.
 
> >3) Mount the raid for / on /target or similar
> 
> Didn't do this, because I wanted just to load a version of grub that
> would let me boot the degraded system.

The reason you do this is because you want to use the copy of grub which
exists on your pre-existing grub configuration.

> >4) Bind mount /dev, and mount /proc and /sys on /target/ as appropriate
> 
> Didn't do this, either, to get straight to grub.

The rescue installer might do this for you; I can't remember.
 
> >5) Chroot into /target; start the other raid devices if necessary, and
> >mount them. You'll at least need /usr.
> 
> Took a shell offered by the installer, which was offered in /dev/md122 (was
> md1, previously).
> # ls
> showed all the directories that I expected to see, including /userdata, so
> the shell was running in my Lenny '/'.
> 
> mounted /dev/md123 on /usr; was able to cd into it and see several
> directories.

Cool.
 
> >6) Copy the partition table from /dev/sdb to /dev/sda
> 
> Skipped this. Also, I don't think I can do this without gdisk (which
> has a partition table clone command) and gdisk is not installed on my
> Lenny system, neither is it available in the installer rescue. Neither
> was parted. I tried fdisk, but it complained because /dev/sdb is using
> GPT.

You can use gparted from your lenny system to partition /dev/sda. (Or
install it).

> >10) Run grub-install on /dev/sda and /dev/sdb
> 
> Tried the grub-install, but it failed complaining (loosely) that the
> 'image was too large for embedding, but the embedded image was needed
> for raid or lvm systems'.
> 
> I'd mounted /boot2 to retain compatibility with the Lenny build.  I
> executed:
> 
> # mount /dev/sdb1 /boot2
> # grub-install --root-directory=/boot2 /dev/sdb
> 
> which failed, complaining that the 'image' was too big.   I tried grub-setup
> as well but that complained, too.
> 
> Didn't get any further, because the grub-install failed.

Ugh. It's possible that this is because it was partitioned badly, and
the first partition starts too early to fit the full core image.

You might need to partition /dev/sda, and install onto that instead of
/dev/sdb.

The output of grub-install -v --root-directory=/boot2 /dev/sdb; would be
useful, though.

-- 
Don Armstrong                      http://www.donarmstrong.com

"A one-question geek test. If you get the joke, you're a geek: Seen on
a California license plate on a VW Beetle: 'FEATURE'..."
 -- Joshua D. Wachs - Natural Intelligence, Inc.


Reply to: