Public bug reported:
Distributor ID: Ubuntu Description: Ubuntu 12.04 LTS Release: 12.04 Codename: precise Kernel: 3.2.0-23-generic-pae Bit width: 32 bits An example explains best what happens. Backgroud: ========= A disk was replaced with a bigger one. Partition copied from original disk to new one using Gparted. UUID replaced on new disk and fstab updated. Boot flag set on for the new disk. New disk will be "sda" and old one "sdb" i.e. both disks available at the same time. Grub installation: ============= sudo blkid /dev/sda1: UUID="9a2e67e5-0583-4901-a523-61a8c75f4296" TYPE="ext4" /dev/sda5: UUID="16e86b9b-0f88-4dcf-89f8-d3413f9b79a9" TYPE="ext4" /dev/sda6: UUID="24d4a0ec-c204-42e3-8bb8-cafc99b7d619" TYPE="swap" /dev/sdb1: UUID="06a2d171-44f3-4898-8bba-cd639070d2c3" TYPE="ext4" /dev/sdb5: UUID="168b97ba-49e7-4923-afe6-f7c72539978e" TYPE="swap" sudo mount /dev/sda1 /mnt sudo grub-install --boot-directory=/mnt/boot /dev/sda Result: ===== Boot from "sda" fails since grub still using UUID of old disk "sdb1" although new disk "sda1" was specified above. Work around (failed, too) ==================== Grub allows you to specify UUID instead of /dev/.... sudo grub-install --boot- directory=UUID=9a2e67e5-0583-4901-a523-61a8c75f4296 /dev/sda Unfortunately that failed, too. Boot resulted in a prompt: grub> ** Affects: grub2 (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1020045 Title: "grub-install" inserts wrong UUID when 2 disks To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1020045/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs