Taylorbyte.com

Documentation Wiki

migrate-linux-root-grub

http://www.taylorbyte.com/docs/wiki/migrate-linux-root-grub

Create a new GPT partition

gdisk /dev/sdb
mkfs.ext4 /dev/sdb2

Setup grub inside the new root filesystem

mkdir /mnt/newroot
mount /dev/sdb2 /mnt/newroot
rsync -ax / /mnt/newroot
chroot /mnt/newroot
#The following line is because arch is gay and mkinitcpio is "smart" and knows not to put all the file systems in initrd.
mkinitcpio -p linux
grub-install /dev/sdb
grub-mkconfig -o /boot/grub/grub.cfg
exit
reboot

Setup fstab

Find out the UUID of your new root by looking at ls -l /dev/disk/by-uuid. Then edit /etc/fstab and change the line for root.