2

I have a multiboot linux system and am trying to clone my existing linux partition to an unused partition on a separate drive and have both available to boot from the Grub menu.

It appears to work, showing the original drive as the default first option and the clone lower down in the list. The problem is that selecting the clone from the menu ends up booting from the original partition instead, every time. I can tell the difference by looking at fstab and drive sizes. And yes I've changed the clone's UUID (see below).

It appears that grub starts booting from the clone (the startup screen is graphical when booting from the original, text when booting from the clone, though no idea why it would differ), but by the time I get to the login screen, the original drive is the one mounted.

Here's what I've done:

  • Cloned partition using CloneZilla
  • Changed UUID of clone w/ tune2fs and edited UUID in its etc/fstab
  • Booted to original drive
  • Ran update-grub
  • Chrooted to clone and ran update-initramfs

What am I forgetting? I've done this in the past and got it work! However, in the past I didn't start with CloneZilla, I may have used dd but can't be sure.

I'm running Linux Mint 18, kernel 4.4.0-141-generic.

Here's blkid (edited and commented):

/dev/sda1: UUID="4e9c..." TYPE="ext4" (original) 
/dev/sda5: UUID="bb86..." TYPE="swap" 
/dev/sdb1: UUID="69cc..." TYPE="ext4" (/home)
/dev/sdc1: UUID="3CF6..." TYPE="ntfs" (windows)
/dev/sdc5: UUID="d8e2..." TYPE="ext4" (clone)
/dev/sdc6: UUID="fc7d..." TYPE="swap" 

Here's fstab on clone (edited):

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
UUID=d8e2.... /               ext4    errors=remount-ro 0 1
UUID=fc7d.... none            swap    sw 0 0

Grub menu looks something like this (from memory):

Linux Mint 18 Sarah
something about custom options
Memtest
Windows 7
Linux Mint 18 Sarah (on /dev/sdc5)
again w/ custom options
3
  • 1
    When in Grub, see Linux entries (pretend you want to edit them) and confirm they use different root=UUID= values. Do they? Commented Jan 6, 2019 at 2:19
  • You're onto something - the clone config has the original UUID in the "linux ... root=UUID=" line, though other places in the config (search commands) have the clone UUID. Any idea why that would happen?
    – Kruthers
    Commented Jan 6, 2019 at 3:12
  • @Kamil - That clue helped me figure it out, thanks. Will post the solution.
    – Kruthers
    Commented Jan 6, 2019 at 3:39

1 Answer 1

0

It turns out I needed to run update-initramfs on the original partion before running update-grub.

It's possible that update-initramfs was completely unnecessary on the clone partition, or that it needed to be run on both, I'm not sure. But in any case everything is working now.

You must log in to answer this question.

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