help-grub
[Top][All Lists]
Advanced

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

Re: Question on using grub2 in an lv and moving pv's between disks and t


From: Jordan Uggla
Subject: Re: Question on using grub2 in an lv and moving pv's between disks and then pulling original disk
Date: Thu, 23 Feb 2012 15:27:17 -0800

On Thu, Feb 23, 2012 at 1:21 PM, David Jablonski <address@hidden> wrote:
>
> Am I missing something with regards to doing the grub2-install on
> /dev/sdb while grub2 is initially installed on /dev/sda.  Basically I
> would like to have grub2 installed on both /dev/sda and /dev/sdb so I
> can freely move the pv extents between the disks.  Obviously if I try to
> boot off the drive that I've moved the pv extents off of it won't boot
> but that is what I have to manage.

What you're probably missing is that grub-install always has two
important arguments, one is the device where grub's boot sector should
go, and the other option is the --boot-directory= option which
specifies where grub-install should copy its modules to, and configure
the core.img to read from at boot. If you don't specify a
--boot-directory= option then it defaults to "/boot/".  That means
that if you run just "grub-install /dev/sdb", while booted into a
system where /boot/ is for example on sda1, you'll end up with a grub
installation whose boot sector and core.img are on /dev/sdb, but which
will look for its modules and grub.cfg on sda1. If you want to be sure
that the grub installation depends only on files from /dev/sdb then
you need to either chroot into the sytem on sdb before running the
command (as you did from the rescue CD) or mount the partition
containing /boot/ somewhere and specify a --boot-directory= option.
For instance "mount /dev/sdb1 /mnt/ && grub-install
--boot-directory=/mnt/boot/ /dev/sdb".

>
> Thank you for your reply.  Any more suggestions are appreciated and if
> I'm missing something simple you can just point me in the right
> direction.  Thank you.

You're welcome.

-- 
Jordan Uggla (Jordan_U on irc.freenode.net)



reply via email to

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