Using Grub2 on Ubuntu LTS Xenial

On sda1, I dd the partition to sdb1(which already has GRUB2 on the MBR) with sudo dd if=/dev/sda1 of=/dev/sdb1 bs=1M.

I found that it also copied the UUID. So, both /dev/sda1 and /dev/sdb1 have the same UUID as verified with blkid.

root@localhost:/home/one# blkid
/dev/sda1: UUID="e5d43e2f-05d1-4c08-b981-b27d2144373e" TYPE="ext4" PARTUUID="b7bb1151-01"
/dev/sdb1: UUID="e5d43e2f-05d1-4c08-b981-b27d2144373e" TYPE="ext4" PARTUUID="b7bb1151-01"

Since grub uses UUID this is causing a issue. If I boot off of sdb1, I get to the grub menu. But when I pick the menu entry it just freezes.


menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-e5d43e2f-05d1-4c08-b981-b27d2144373e' {
    gfxmode $linux_gfx_mode
    insmod gzio
    if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
    insmod part_msdos
    insmod ext2
    set root='hd1,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  e5d43e2f-05d1-4c08-b981-b27d2144373e
      search --no-floppy --fs-uuid --set=root e5d43e2f-05d1-4c08-b981-b27d2144373e
        linux   /boot/vmlinuz-4.15.0-46-generic root=UUID=e5d43e2f-05d1-4c08-b981-b27d2144373e ro libata.force=noncq splash $vt_handoff
    initrd  /boot/initrd.img-4.15.0-46-generic
  • 2
    change it with tune2fs -U? – frostschutz May 19 at 20:59
  • It should be impossible for /dev/sda1 and /dev/sdb1 to have the same UUID. That said use a different method of cloning other than dd or Clonezilla: askubuntu.com/a/1064000/307523 – WinEunuuchs2Unix May 19 at 23:28
  • 1
    @WinEunuuchs2Unix Did you really mean impossible? Copying the UUID is expected behaviour for dd. – Philip Couling May 20 at 7:51
  • Just use /dev/sdb1 instead of the UUID to test before you use tune2fs -U or remove /dev/sda from the system. – Fabby May 20 at 8:03

Your Answer

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

Browse other questions tagged or ask your own question.