2

Using gparted from a liveusb I copied ubuntu system to a new disk. I gave it a new UUID and edited the grub.cfg and fstab on the clone to change all references to the old UUID (and /dev/sdZ) to the new one.

The old hard drive has windows on it and I'm quite happy leaving it as the boot disk and keeping the old ubuntu system bootable as well. But how can I get grub to recognize the cloned system on the new disk and boot it preferentially?

5
  • Can you access the cloned system from the old ubuntu instalattion? Does the entry you added to your grub.cfg apper in the boot menu? Dec 3, 2012 at 20:33
  • Yes, I can mount it and access it just fine, everything appears in order. I haven't added an entry to my current grub.cfg, I only edited the clone one. How can I (should I?) add an entry to my current config for the clone? I guess I can just copy it, but the big "DO NOT EDIT THIS FILE" makes me pause.
    – Eloff
    Dec 3, 2012 at 20:59
  • If there is a bootable Linux OS with Grub2 on the new system, you can just run sudo update-grub, and the cloned one should get picked up. If not, for example, if the cloned OS is the only one available, reinstall Grub from the Live cd/usb. PS: You might also need to fix the UUID in /etc/fstab. Dec 3, 2012 at 22:12
  • I decided to manually edit the grub.cfg file, and manged to boot it using the grub on the original disk. The system was very messed up though (and the original system was somewhat messed up.) Graphics driver issues at shutdown, startup, dropping into a busybox initramfs shell during startup, etc. I eventually abandoned the idea as too much work. I could buy a new computer with the time I spent. That's been my whole experience with Ubuntu for the last year. If I didn't need it for work I would never use it again.
    – Eloff
    Dec 5, 2012 at 0:53
  • Why do you need all of this? Two partitions with ubuntu and 1 with windows. Dec 5, 2012 at 21:18

2 Answers 2

1

You also need to update the uuid in /boot/grub/grub.cfg, and configure your bios to boot from the new drive.

0

I recently migrated Ubuntu studio 15.04 to a new SSD using rsync and after it finished the cloning operation grub didn't work. I decided that I I needed to run, from a live USB stick, "Boot Repair" as described in this answer. See also the Ubuntu Help page on the topic.

2
  • 1
    It is best if you outline the steps found in the link you referenced into your actual answer - this helps people find the information easily, even after the link becomes dead (or it's information changed).
    – hazrpg
    Mar 3, 2016 at 1:20
  • Links are not considered answers as far as i'm concerned. {edit} your question to answer the question.
    – DnrDevil
    Mar 8, 2016 at 23:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .