0

Goal: to take image of live system, transfer to new drive (from MBR, to GPT), separate /boot from / partition, and not have to go through tedious system re-install and re-configure from fresh.

Current setup: Ubuntu 14.04 server running on an old system (Athlon 64) - on MBR 160GB /dev/sda /dev/sda1 - 77G - / /dev/sda2 - Linux Swap

GPT 3.0TB disk on /dev/sdc:
/dev/sdc1 - 2MB - grub_bios /dev/sdc2 - 700MB - /boot /dev/sdc3 - 344GB - / /dev/sdc4 - 2.0TB - /some_other_data

Did:
#: mount /dev/sdc3 /mnt/tmp; mount /dev/sdc2 /mnt/tmp2
#: cd /; sudo tar cf - --one-file-system --directory=/ --exclude=proc --exclude=sys --exclude=dev/pts --exclude=backups / | ( cd /mnt/tmp; sudo tar xvf - )

Then:
#: mv /mnt/tmp/boot /mnt/tmp2/

Modified /mnt/tmp/etc/fstab:
# <file system> <mount point> <type> <options> <dump> <pass>
#Old root -- UUID=4ed11d31-61ad-435e-908e-3443e802291a / ext4 errors=remount-ro 0 1 UUID=a1870c6a-a3b1-4d04-b65f-ee4e41b9c5b8 / ext4 errors=remount-ro 0 1 UUID=c53ef2f7-9688-4aea-9311-23c44a9ae82c /boot ext2 errors=remount-ro 0 1

Then I mounted the proc and sys filesystems under /mnt/tmp and -o bind /dev, /dev/pts and /run there as well. Then I chrooted to /mnt/tmp, and mounted /dev/sdc2 to (the new) /boot.

Next I: #: grub-install /dev/sdc; update-grub; update-initramfs -u; reboot

At boot, I select the large GPT disk to boot from, grub2 menu comes up, shows the correct install options, etc. -- UUID a1870c6a-a3b1-4d04-b65f-ee4e41b9c5b8 is set to root, part_gpt insmod'ed, ext2 insmod'ed, etc..

I continue, kernel begins to load, I see, among other things, /dev/sda is polled, some usb devices are recognized, and then it pauses... and after a brief delay I am told that it cannot find /dev/disk/by-uuid/a1870c6a-a3b1-4d04-b65f-ee4e41b9c5b8 and I am dropped to a busybox shell.

My usb keyboard does not work at this prompt, and I am stuck.

I feel like I am missing something very basic, and I would appreciate whatever help this community can provide.

Thanks

0

Well I didn't get very much input into my problem, but I uncovered a solution and will post it here for posterity. The clue came from this article

I needed to add two modules to /etc/initramfs-tools/modules
1) sata_nv which is what makes the SATA controller where the GPT drive connects, work
2) usbhid just in case I get dumped into a busybox shell again.

Then simply: #: update-initramfs -c -k <kernel version>; reboot; profit

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.