Results 1 to 5 of 5

Thread: Cloned copy of Partition with new UUID wil not boot

  1. #1
    Join Date
    Oct 2012
    Location
    Eugene, Or
    Beans
    378
    Distro
    Ubuntu 18.04 Bionic Beaver

    Question Cloned copy of Partition with new UUID wil not boot

    Cloned my Partition /dev/sda2 to another Drive Via Gparted (copy/paste). Changed the UUID. Ran sudo update-grub to update & grub reinstall also it. Drive also has a Fresh Install of Ubuntu 14.04 on it. The new fresh Install was installed 1st then i cloned my other partition to the same Drive. Thanks for any help in Advance. Thanks
    The Answer Please if at all Possible

  2. #2
    Join Date
    Feb 2009
    Location
    Dallas, TX
    Beans
    7,790
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Cloned copy of Partition with new UUID wil not boot

    Hi Redalien0304.

    You may need to update '/etc/fstab' on the cloned partition to reflect the change on UUID.

    Hope it helps. Let us know how it goes.
    Regards.

  3. #3
    Join Date
    Oct 2012
    Location
    Eugene, Or
    Beans
    378
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: Cloned copy of Partition with new UUID wil not boot

    here is copy of my fstab
    # /etc/fstab: static file system information.#
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    # / was on /dev/sda2 during installation
    UUID=ccb76466-f5e3-4c37-8baf-0776e0790cbd / ext4 errors=remount-ro 0 1
    also a copy of my grub.cfg
    ## DO NOT EDIT THIS FILE
    #
    # It is automatically generated by grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #


    ### BEGIN /etc/grub.d/00_header ###
    if [ -s $prefix/grubenv ]; then
    set have_grubenv=true
    load_env
    fi
    if [ "${next_entry}" ] ; then
    set default="${next_entry}"
    set next_entry=
    save_env next_entry
    set boot_once=true
    else
    set default="0"
    fi


    if [ x"${feature_menuentry_id}" = xy ]; then
    menuentry_id_option="--id"
    else
    menuentry_id_option=""
    fi


    export menuentry_id_option


    if [ "${prev_saved_entry}" ]; then
    set saved_entry="${prev_saved_entry}"
    save_env saved_entry
    set prev_saved_entry=
    save_env prev_saved_entry
    set boot_once=true
    fi


    function savedefault {
    if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
    fi
    }
    function recordfail {
    set recordfail=1
    if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
    }
    function load_video {
    if [ x$feature_all_video_module = xy ]; then
    insmod all_video
    else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
    fi
    }


    if [ x$feature_default_font_path = xy ] ; then
    font=unicode
    else
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 ccb76466-f5e3-4c37-8baf-0776e0790cbd
    else
    search --no-floppy --fs-uuid --set=root ccb76466-f5e3-4c37-8baf-0776e0790cbd
    fi
    font="/usr/share/grub/unicode.pf2"
    fi


    if loadfont $font ; then
    set gfxmode=auto
    load_video
    insmod gfxterm
    set locale_dir=$prefix/locale
    set lang=en_US
    insmod gettext
    fi
    terminal_output gfxterm
    if [ "${recordfail}" = 1 ] ; then
    set timeout=-1
    else
    if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=10
    # Fallback normal timeout code in case the timeout_style feature is
    # unavailable.
    else
    set timeout=10
    fi
    fi
    ### END /etc/grub.d/00_header ###


    ### BEGIN /etc/grub.d/05_debian_theme ###
    set menu_color_normal=white/black
    set menu_color_highlight=black/light-gray
    if background_color 44,0,30; then
    clear
    fi
    ### END /etc/grub.d/05_debian_theme ###


    ### BEGIN /etc/grub.d/10_linux ###
    function gfxmode {
    set gfxpayload="${1}"
    if [ "${1}" = "keep" ]; then
    set vt_handoff=vt.handoff=7
    else
    set vt_handoff=
    fi
    }
    if [ "${recordfail}" != 1 ]; then
    if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
    if [ ${match} = 0 ]; then
    set linux_gfx_mode=keep
    else
    set linux_gfx_mode=text
    fi
    else
    set linux_gfx_mode=text
    fi
    else
    set linux_gfx_mode=keep
    fi
    else
    set linux_gfx_mode=text
    fi
    export linux_gfx_mode
    menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-ccb76466-f5e3-4c37-8baf-0776e0790cbd' {
    recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 ccb76466-f5e3-4c37-8baf-0776e0790cbd
    else
    search --no-floppy --fs-uuid --set=root ccb76466-f5e3-4c37-8baf-0776e0790cbd
    fi
    linux /boot/vmlinuz-3.13.0-37-generic root=UUID=ccb76466-f5e3-4c37-8baf-0776e0790cbd ro quiet splash $vt_handoff
    initrd /boot/initrd.img-3.13.0-37-generic
    }
    submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-ccb76466-f5e3-4c37-8baf-0776e0790cbd' {
    menuentry 'Ubuntu, with Linux 3.13.0-37-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-37-generic-advanced-ccb76466-f5e3-4c37-8baf-0776e0790cbd' {
    recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 ccb76466-f5e3-4c37-8baf-0776e0790cbd
    else
    search --no-floppy --fs-uuid --set=root ccb76466-f5e3-4c37-8baf-0776e0790cbd
    fi
    echo 'Loading Linux 3.13.0-37-generic ...'
    linux /boot/vmlinuz-3.13.0-37-generic root=UUID=ccb76466-f5e3-4c37-8baf-0776e0790cbd ro quiet splash $vt_handoff
    echo 'Loading initial ramdisk ...'
    initrd /boot/initrd.img-3.13.0-37-generic
    }
    menuentry 'Ubuntu, with Linux 3.13.0-37-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-37-generic-recovery-ccb76466-f5e3-4c37-8baf-0776e0790cbd' {
    recordfail
    load_video
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 ccb76466-f5e3-4c37-8baf-0776e0790cbd
    else
    search --no-floppy --fs-uuid --set=root ccb76466-f5e3-4c37-8baf-0776e0790cbd
    fi
    echo 'Loading Linux 3.13.0-37-generic ...'
    linux /boot/vmlinuz-3.13.0-37-generic root=UUID=ccb76466-f5e3-4c37-8baf-0776e0790cbd ro recovery nomodeset
    echo 'Loading initial ramdisk ...'
    initrd /boot/initrd.img-3.13.0-37-generic
    }
    menuentry 'Ubuntu, with Linux 3.13.0-24-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-24-generic-advanced-ccb76466-f5e3-4c37-8baf-0776e0790cbd' {
    recordfail
    load_video
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 ccb76466-f5e3-4c37-8baf-0776e0790cbd
    else
    search --no-floppy --fs-uuid --set=root ccb76466-f5e3-4c37-8baf-0776e0790cbd
    fi
    echo 'Loading Linux 3.13.0-24-generic ...'
    linux /boot/vmlinuz-3.13.0-24-generic root=UUID=ccb76466-f5e3-4c37-8baf-0776e0790cbd ro quiet splash $vt_handoff
    echo 'Loading initial ramdisk ...'
    initrd /boot/initrd.img-3.13.0-24-generic
    }
    menuentry 'Ubuntu, with Linux 3.13.0-24-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.13.0-24-generic-recovery-ccb76466-f5e3-4c37-8baf-0776e0790cbd' {
    recordfail
    load_video
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 ccb76466-f5e3-4c37-8baf-0776e0790cbd
    else
    search --no-floppy --fs-uuid --set=root ccb76466-f5e3-4c37-8baf-0776e0790cbd
    fi
    echo 'Loading Linux 3.13.0-24-generic ...'
    linux /boot/vmlinuz-3.13.0-24-generic root=UUID=ccb76466-f5e3-4c37-8baf-0776e0790cbd ro recovery nomodeset
    echo 'Loading initial ramdisk ...'
    initrd /boot/initrd.img-3.13.0-24-generic
    }
    }


    ### END /etc/grub.d/10_linux ###


    ### BEGIN /etc/grub.d/20_linux_xen ###


    ### END /etc/grub.d/20_linux_xen ###


    ### BEGIN /etc/grub.d/20_memtest86+ ###
    menuentry 'Memory test (memtest86+)' {
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 ccb76466-f5e3-4c37-8baf-0776e0790cbd
    else
    search --no-floppy --fs-uuid --set=root ccb76466-f5e3-4c37-8baf-0776e0790cbd
    fi
    knetbsd /boot/memtest86+.elf
    }
    menuentry 'Memory test (memtest86+, serial console 115200)' {
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos2'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 ccb76466-f5e3-4c37-8baf-0776e0790cbd
    else
    search --no-floppy --fs-uuid --set=root ccb76466-f5e3-4c37-8baf-0776e0790cbd
    fi
    linux16 /boot/memtest86+.bin console=ttyS0,115200n8
    }
    ### END /etc/grub.d/20_memtest86+ ###


    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry 'Ubuntu 14.04.1 LTS (14.04) (on /dev/sda1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-46714020-616f-4905-9743-97e201126d28' {
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 46714020-616f-4905-9743-97e201126d28
    else
    search --no-floppy --fs-uuid --set=root 46714020-616f-4905-9743-97e201126d28
    fi
    linux /boot/vmlinuz-3.13.0-37-generic root=UUID=bae1c6ff-1e59-4e01-9750-5dc19e7b434f ro quiet splash $vt_handoff
    initrd /boot/initrd.img-3.13.0-37-generic
    }
    submenu 'Advanced options for Ubuntu 14.04.1 LTS (14.04) (on /dev/sda1)' $menuentry_id_option 'osprober-gnulinux-advanced-46714020-616f-4905-9743-97e201126d28' {
    menuentry 'Ubuntu 14.04 Trusty (on /dev/sda1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.13.0-37-generic--46714020-616f-4905-9743-97e201126d28' {
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 46714020-616f-4905-9743-97e201126d28
    else
    search --no-floppy --fs-uuid --set=root 46714020-616f-4905-9743-97e201126d28
    fi
    linux /boot/vmlinuz-3.13.0-37-generic root=UUID=bae1c6ff-1e59-4e01-9750-5dc19e7b434f ro quiet splash $vt_handoff
    initrd /boot/initrd.img-3.13.0-37-generic
    }
    menuentry 'Ubuntu, with Linux 3.13.0-37-generic (on /dev/sda1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.13.0-37-generic--46714020-616f-4905-9743-97e201126d28' {
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 46714020-616f-4905-9743-97e201126d28
    else
    search --no-floppy --fs-uuid --set=root 46714020-616f-4905-9743-97e201126d28
    fi
    linux /boot/vmlinuz-3.13.0-37-generic root=UUID=bae1c6ff-1e59-4e01-9750-5dc19e7b434f ro quiet splash $vt_handoff
    initrd /boot/initrd.img-3.13.0-37-generic
    }
    menuentry 'Ubuntu, with Linux 3.13.0-37-generic (recovery mode) (on /dev/sda1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.13.0-37-generic-root=UUID=bae1c6ff-1e59-4e01-9750-5dc19e7b434f ro recovery nomodeset-46714020-616f-4905-9743-97e201126d28' {
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
    search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 46714020-616f-4905-9743-97e201126d28
    else
    search --no-floppy --fs-uuid --set=root 46714020-616f-4905-9743-97e201126d28
    fi
    linux /boot/vmlinuz-3.13.0-37-generic root=UUID=bae1c6ff-1e59-4e01-9750-5dc19e7b434f ro recovery nomodeset
    initrd /boot/initrd.img-3.13.0-37-generic
    }
    }


    set timeout_style=menu
    if [ "${timeout}" = 0 ]; then
    set timeout=10
    fi
    ### END /etc/grub.d/30_os-prober ###


    ### BEGIN /etc/grub.d/30_uefi-firmware ###
    ### END /etc/grub.d/30_uefi-firmware ###


    ### BEGIN /etc/grub.d/40_custom ###
    # This file provides an easy way to add custom menu entries. Simply type the
    # menu entries you want to add after this comment. Be careful not to change
    # the 'exec tail' line above.
    ### END /etc/grub.d/40_custom ###


    ### BEGIN /etc/grub.d/41_custom ###
    if [ -f ${config_directory}/custom.cfg ]; then
    source ${config_directory}/custom.cfg
    elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
    source $prefix/custom.cfg;
    fi
    ### END /etc/grub.d/41_custom ###
    The Answer Please if at all Possible

  4. #4
    Join Date
    Aug 2012
    Beans
    Hidden!

    Re: Cloned copy of Partition with new UUID wil not boot

    Use 'blkid' to print the universally unique identifier for a
    # device;
    Use the next command to check all the drives UUIDs, for use in /etc/fstab,

    Code:
    sudo blkid -c /dev/null
    this will give all UUIDs in use by partitions / drives etc. The "-c /dev/null" forces blkid to poll the hardware for the UUID so as not take it from an OS cached file

    If you have more than one drive the command fdisk may help you identify installs and device numbering etc

    Code:
    sudo fdisk -l
    that is a lower case "L" in this code.


    Using the blkid command you can get the UUID for the partition you are booting and update the fstab file as root. This should allow you to boot that install.

    Be aware when copy/pasting UUIDs from the blkid command output not to include any leading or following puntuation marks (eg. " ) into the fstab file ... can cause confusion if it still won't boot with the new UUID.

    Running the next command can check your fstab file before you do a reboot. If it returns NO output your fstab file is OK, any problems (edit: with mounting) will be reported to you with this command.

    Code:
    sudo mount -a
    Last edited by coldcritter64; October 22nd, 2014 at 09:00 PM. Reason: put in correct punct mark + "with mounting" clarification

  5. #5
    Join Date
    Oct 2012
    Location
    Eugene, Or
    Beans
    378
    Distro
    Ubuntu 18.04 Bionic Beaver

    Exclamation Re: Cloned copy of Partition with new UUID wil not boot

    This how i made Copy/Pasting a Partition Easier for me. Systembackup can make a Bootable CD/USB Easily.
    Make a Bootable USB with "Live System Create" with Systemback. Write to USB. Boot with USB just created. Copy/Paste a Partition with Gparted on a Live Usb. Change UUID. In Terminal Paste these Commands.
    sudo mount /dev/sda1 /mntsudo mount --bind /dev /mnt/dev
    sudo mount --bind /dev/pts /mnt/dev/pts
    sudo mount --bind /proc /mnt/proc
    sudo mount --bind /sys /mnt/sys


    sudo chroot /mnt
    grub-install /dev/sda
    grub-install --recheck /dev/sda
    update-grub


    exit && sudo umount /mnt/dev && sudo umount /mnt/dev/pts && sudo umount /mnt/proc && sudo umount /mnt/sys && sudo umount /mnt

    This is what worked for me, making a Custom USB with Systemback, Basically a copy of my Ubuntu 14.04 System on a USB without my Downloads, Docs & Info. You can also use a Ubuntu Live CD/USB.
    http://sourceforge.net/projects/systemback/
    http://www.linuxquestions.org/questi...lp-4175499295/
    Post #5
    Last edited by Redalien0304; November 3rd, 2014 at 05:30 PM.
    The Answer Please if at all Possible

Tags for this Thread

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
  •