does anybody have a suggestion for how to move the root partition to a new drive and set up grub2 to boot on that drive? I seem to have no luck instructing grub-mkconfig what it is I want to do (e.g. chroot'int into my new root just confuses all the scripts).
Background I am running Debian Squeeze on a headless low-power NAS. My current setup is / on sda0 and /boot on sde0 (a CF card): I needed the separate /boot because sd[a-d] need to do a delayed spin-up. Now I've found an old 2.5" IDE disk to use as / including /boot to allow me to spin all the big disks down.
What I've tried Basically I went
mount -o rw /dev/sdf5 /mnt/newroot cp -ax / /mnt/newroot cp -ax /boot /mnt/newroot/boot Then I tried
chroot /mnt/newroot update-grub But that failed with grub asking if root was mounted. Then I did a half-hearted attempt at setting up /mnt/newroot/grub/grub.cfg to find the kernel image on sdf5, followed by a grub-install --root-directory=/mnt/newroot /dev/sdf. But this just landed me a grub rescue prompt when I tried booting from sdf.
My backup plan is to just reinstall, so a bonus question (no checkmarks for this one): What do I have to do to get my lvm2 and mdadm config across? Is it all stored in the filesystems (and will it be automatically discovered), or do I need to take of it myself?