Results 1 to 7 of 7

Thread: UUID of the Ubuntu root partition changed

  1. #1
    Join Date
    Nov 2008
    Beans
    230

    UUID of the Ubuntu root partition changed

    For some reasons I backed up my Ubuntu partition, reformated it and then copied the files back. Now the UUID of the partition has changed and Ubuntu won't boot. How can I fix this?

  2. #2
    Join Date
    Aug 2011
    Location
    52.5° N 6.4° E
    Beans
    6,806
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: UUID of the Ubuntu root partition changed

    Boot from a live disk, mount the hard drive and modify your /etc/fstab (on the hard drive, not on the live disk) to match the new UUID.

  3. #3
    Join Date
    Nov 2008
    Beans
    230

    Re: UUID of the Ubuntu root partition changed

    I followed this to change the uuid in grub and fstab. Now it boots but gets stuck on the splash screen.

    http://askubuntu.com/questions/17144...nother-machine

  4. #4
    Join Date
    Jun 2010
    Location
    London, England
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: UUID of the Ubuntu root partition changed

    The reformat has changed the UUID. You could try going to recovery mode and select the Grub option. It updates grub and puts you back at the recovery screen. You have a UUID in grub.cfg that does not match the UUID of the partition.

    Do you still have that backup? Why not re-install and then just copy over the /home folders & files. Or better still use the Do Something Else option to install into that partition but do not mark the partition for format. That will leave the /home folder & files alone. Either way you should get a UUID into the grub.cfg and elsewhere that matches the UUID assigned by the installer.

    Regards.
    It is a machine. It is more stupid than we are. It will not stop us from doing stupid things.
    Ubuntu user #33,200. Linux user #530,530


  5. #5
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: UUID of the Ubuntu root partition changed

    You normally have to reinstall grub as it is looking for that UUID from the MBR & core.img files. Just changing in grub.cfg often is not enough.

    You can use Boot-Repair to reinstall grub or your install liveDVD or flash drive.
    Post the link to the BootInfo report that this creates. Is part of Boot-Repair:
    https://help.ubuntu.com/community/Boot-Info
    Boot Repair -Also handles LVM, GPT, separate /boot and UEFI dual boot.:
    https://help.ubuntu.com/community/Boot-Repair
    You can repair many boot issues with this or 'Create BootInfo' report (Other Options) & post the link it creates, so we can see your exact configuration and diagnose advanced problems.
    LighterWeight (Lubuntu based) Boot-RepairCD
    http://sourceforge.net/projects/boot-repair-cd/files/
    Full Ubuntu 13.04 liveDVD or USB Install with Boot-Repair included (for newer computers)
    https://help.ubuntu.com/community/LinuxSecureRemix

    How to restore the Ubuntu/XP/Vista/7 bootloader
    https://help.ubuntu.com/community/Re...ta/7Bootloader
    https://help.ubuntu.com/community/Gr..._Broken_System
    Reinstall grub2 - Short version & full chroot version
    https://help.ubuntu.com/community/Grub2#Reinstalling GRUB2
    Grub2 info quick & full chroot version - method 3 - CHROOT:
    https://help.ubuntu.com/community/Grub2
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  6. #6
    Join Date
    Nov 2009
    Location
    de9fdc5c1ade9d205ac5e2622
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: UUID of the Ubuntu root partition changed

    Quote Originally Posted by oldfred View Post
    You normally have to reinstall grub as it is looking for that UUID from the MBR & core.img files. Just changing in grub.cfg often is not enough.

    You can use Boot-Repair to reinstall grub or your install liveDVD or flash drive.
    Post the link to the BootInfo report that this creates. Is part of Boot-Repair:
    https://help.ubuntu.com/community/Boot-Info
    Boot Repair -Also handles LVM, GPT, separate /boot and UEFI dual boot.:
    https://help.ubuntu.com/community/Boot-Repair
    You can repair many boot issues with this or 'Create BootInfo' report (Other Options) & post the link it creates, so we can see your exact configuration and diagnose advanced problems.
    LighterWeight (Lubuntu based) Boot-RepairCD
    http://sourceforge.net/projects/boot-repair-cd/files/
    Full Ubuntu 13.04 liveDVD or USB Install with Boot-Repair included (for newer computers)
    https://help.ubuntu.com/community/LinuxSecureRemix

    How to restore the Ubuntu/XP/Vista/7 bootloader
    https://help.ubuntu.com/community/Re...ta/7Bootloader
    https://help.ubuntu.com/community/Gr..._Broken_System
    Reinstall grub2 - Short version & full chroot version
    https://help.ubuntu.com/community/Grub2#Reinstalling GRUB2
    Grub2 info quick & full chroot version - method 3 - CHROOT:
    https://help.ubuntu.com/community/Grub2
    I would like to respectfully disagree, with the following caveat: I am not a person with any formal training in computer science nor a hardcore amatuer, and the following experience may be unique and/or no longer valid.

    That said, I used to run linux (Ubuntu 9.04 and up to, but not including, 12.04; and debian version I cannot remember) from a usb hard drive. For an unknown reason, the UUID would change in grub (which was on the usb drive). I found that if I interrupted the "auto" choice of grub and manually edit the boot UUID to the UUID I wanted (I had memorized it, it was that often) and would then boot. At that point I would successfully boot and manually editted grub and saved it.

    As I said above, take that anecdote with the caveat in mind.

    AlphaA
    "Si Dieu n'existait pas, il faudrait l'inventer" -Voltaire

  7. #7
    Join Date
    Feb 2007
    Location
    Romania
    Beans
    Hidden!

    Re: UUID of the Ubuntu root partition changed

    Quote Originally Posted by TheHimself View Post
    I followed this to change the uuid in grub and fstab. Now it boots but gets stuck on the splash screen.

    http://askubuntu.com/questions/17144...nother-machine
    Do you get any error messages? Try to press Esc and see if something shows up.

    Can you boot into recovery mode? If so, then try to run `dmesg' and see if it prints something relevant to the boot issue.


    BTW. Next time you restore your backup on a newly formatted partition, instead of reinstalling grub and editing fstab you could simply change back the UUID of the partition to the old one. Assuming it's an ext2/3/4 file system:
    Code:
    sudo tune2fs -U OLDUUID /dev/sdXY
    Where OLDUUID is the original UUID and /dec/sdXY is the device name of the partition (i.e., /dev/sda1).

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •