error when copying/cloning partition

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
sadhu
Level 5
Level 5
Posts: 862
Joined: Fri Nov 22, 2013 9:48 am
Location: Sri Lanka
Contact:

error when copying/cloning partition

Post by sadhu »

I have a spare partition on my laptop into which I want to place a cloned image of LM17-64 from my desktop. The desktop and laptop are connected via LAN. Both machines are running LM18 and have their LM 17 partitions mounted using nemo.

On the laptop, I did rsync twice, because I notice that some files seem to be missing when I only rsync sadhu@: or just plain rsync -av 192....
sudo rsync -av sadhu@192.168.0.114:/media/sadhu/LM17/ /media/sadhu/newLM17
sudo rsync -av root@192.168.0.114:/media/sadhu/LM17/ /media/sadhu/newLM17

Then on the laptop I issued the blkid command to find the new UUIDs.

On the laptop I then used sudo xed /media/sadhu/newLM17/etc/fstab to update all of the UUIDs.

On the laptop I executed sudo grub-mkconfig, then update-grub.

When I reboot the laptop, LM 17 is visible in the grub menu. But when I boot to it, it times out and drops to a shell, with this error message
ALERT! /dev/disk/by-UUID/<old UUID of LM17 on desktop> does not exist.

In the shell, I execute ls sudo /dev/disk/by-UUID and all of the new, correct UUIDs appear, not the old 'bad' one from the desktop.

What do I have to do in order to boot LM17 on the laptop?

===============


I think the problem is with grub.cfg. Here's the offending portion of grub.cfg

Code: Select all

### BEGIN /etc/grub.d/30_os-prober ###
Found Linux Mint 17 Qiana (17) on /dev/sda3
menuentry 'Linux Mint 17 Qiana (17) (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-8e2c757e-a801-4a93-a03f-c8a7ae816639' {
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt3'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  8e2c757e-a801-4a93-a03f-c8a7ae816639
	else
	  search --no-floppy --fs-uuid --set=root 8e2c757e-a801-4a93-a03f-c8a7ae816639
	fi
	linux /boot/vmlinuz-3.13.0-24-generic root=UUID=62e2353c-3229-4d59-95dc-c5521bcd1459 ro quiet splash $vt_handoff
	initrd /boot/initrd.img-3.13.0-24-generic
}
submenu 'Advanced options for Linux Mint 17 Qiana (17) (on /dev/sda3)' $menuentry_id_option 'osprober-gnulinux-advanced-8e2c757e-a801-4a93-a03f-c8a7ae816639' {
	menuentry 'Linux Mint 17 Cinnamon 64-bit, 3.13.0-24-generic (/dev/sda1) (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.13.0-24-generic--8e2c757e-a801-4a93-a03f-c8a7ae816639' {
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  8e2c757e-a801-4a93-a03f-c8a7ae816639
		else
		  search --no-floppy --fs-uuid --set=root 8e2c757e-a801-4a93-a03f-c8a7ae816639
		fi
		linux /boot/vmlinuz-3.13.0-24-generic root=UUID=62e2353c-3229-4d59-95dc-c5521bcd1459 ro quiet splash $vt_handoff
		initrd /boot/initrd.img-3.13.0-24-generic
	}
	menuentry 'Linux Mint 17 Cinnamon 64-bit, 3.13.0-24-generic (/dev/sda1) -- recovery mode (on /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.13.0-24-generic-root=UUID=62e2353c-3229-4d59-95dc-c5521bcd1459 ro recovery nomodeset-8e2c757e-a801-4a93-a03f-c8a7ae816639' {
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt3'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt3 --hint-efi=hd0,gpt3 --hint-baremetal=ahci0,gpt3  8e2c757e-a801-4a93-a03f-c8a7ae816639
		else
		  search --no-floppy --fs-uuid --set=root 8e2c757e-a801-4a93-a03f-c8a7ae816639
		fi
		linux /boot/vmlinuz-3.13.0-24-generic root=UUID=62e2353c-3229-4d59-95dc-c5521bcd1459 ro recovery nomodeset
		initrd /boot/initrd.img-3.13.0-24-generic
	}
}

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

The correct UUID is 8e2c757e-a801-4a93-a03f-c8a7ae816639; however,some lines contain "UUID=62e2353c-3229-4d59-95dc-c5521bcd1459" which is the old UUID from the desktop.

I have a DOS partition at the beginning of the partition table. It was put there automatically when I installed--as I recall, it had to do with something about UEFI. Perhaps this is what it confusing grub.


Thanks,
-Sadhu
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
sabbe sattā bhavantu sukhitattā. LM 21.2-64 Cinn 5.8.4
WharfRat

Re: error when copying/cloning partition

Post by WharfRat »

Two additional things are required:

There's a file /etc/initramfs-tools/conf.d/resume that contains the UUID for resuming from suspend.

Change that then you'll have to chroot to the cloned system and rebuild the initrd.img for the kernel you're booting to with update-initramfs :wink:
Locked

Return to “Software & Applications”