On 06/07/12 08:15, Alan Chandler wrote:
On 06/07/12 07:24, Alan Chandler wrote:
On 05/07/12 23:10, Tom H wrote:
On Wed, Jul 4, 2012 at 7:22 PM, Alan Chandler
<a...@chandlerfamily.org.uk> wrote:
I am trying to figure out how to move my current rootfs to raid1
(its just a
partition at the moment).
The plan is to make a a raid device, copy the current root fs in to
it - but
I then need to tell grub to set up this up as the root for the boot.
grub-install /dev/sdX
Reading the man page for this doesn't say how it finds out where the
root filesystem is. Thats the bit that is confusing me.
I currently have a root filesystem on /dev/sdb1. I am not sure which
disk contains the mbr - but it boots and then loads the root from there.
I have created a partially degraded mdadm raid array /dev/md0
comprising /dev/sda1 and an empty slot. My desire is to install grub
on both /dev/sda and /dev/sdb to boot up from /dev/md0. When that is
working I will retire /dev/sdb1 and add it as the second component of
/dev/md0.
The magic appears to be in grub-mkconfig (wrapped with
update-grub). But I am also confused as to whether I need to do
anything about an initramfs.
I want to achieve the mimimum of downtime on the machine I am trying
to make this work on, and am worried that if I go too far without
properly understanding what would happen I may end up with an
unbootable system.
I think the answer might be here.
http://unix.stackexchange.com/questions/5297/debian-grub2-moving-root-partition-to-new-drive
I have some other things to do right now, but I will try this out later.
It looks as though update-grub and/or grub-install use the current
root. So by chrooting into where you want to be you get them all set up.
Something went wrong - I am not sure what, but I ended up needing a
rescue disk to reset root back to its old location. I wonder if its to
do with trying to use a raid device as the root partition.
Do you need to create a special initrd for that?
--
Alan Chandler
http://www.chandlerfamily.org.uk
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4ff6d9b8.1080...@chandlerfamily.org.uk