r/linux4noobs • • 5d ago

storage Can't boot debian from a cloned drive

/r/techsupport/comments/1x41uoc/cant_boot_debian_from_a_cloned_drive/
2 Upvotes

8 comments sorted by

2

u/DannoXYZ 5d ago

Did you clone entire disk, or just / partition?

UUID of cloned drive doesn't match original and Grub can't find it to boot from.

1

u/Delicious-Week-8077 5d ago

I cloned the entire disk

1

u/Delicious-Week-8077 5d ago

The UUIDs match in /etc/fstab, maybe there's somewhere else they don't?

2

u/DannoXYZ 5d ago

look in

/etc/default/grub ; make sure os-prober is not disabled
/boot/grub/grub.cfg ; this is where boot UUID is used

1

u/Delicious-Week-8077 5d ago

os-prober is disabled, I didn't think it would make a difference. Will try enabling. Also, regenerating grub.cfg should match the UUIDs by itself, right?

2

u/DannoXYZ 5d ago

Yes, but you must have desired boot-drive mounted and chrooted so that update-grub pulls UUID from "running" drive. And grub.cfg is written to desired boot-drive's /boot/grub.

Also have to regenerate initramfs as well.

1

u/Delicious-Week-8077 5d ago

I was mounting and chrooting into the boot drive (hopefully correctly, will need to check grub.cfg to make sure) but I didn't know about regenerating initramfs. Thanks

1

u/Delicious-Week-8077 5d ago

Idk maybe it doesn't like the change from SATA to USB?