On 23/11/2020 10:37, Michael wrote:
Have you changed the UUIDs on the new partitions?

Never used UUID in fstab. Do I just run: blkid|grep UUID
and copy it to fstab.

I warned you about UUIDs.  The block device of /dev/sda* could be pointing at
a partition either on the old, or the new disk.  In such cases it is a good
idea to find out what block devices the MoBo identifies and what the kernel.

If you're messing about with disks, partitions, etc, you NEED to have a basic understanding of UUIDs. Bear in mind that the UID bit (iirc) stands for *UNIQUE* ID.

Linux (as has been said) allocates sda, sdb etc in the order it finds partitions, which can be somewhat random. So there is no guarantee, if you specify root as sda, something could glitch (or you've stuck an eSATA drive on, or or or) and suddenly it's sdb and your system can't find root!

So what the initial boot system does is it sets up /dev/.../UUID as symlinks to the appropriate sdx. So when boot says "root = UUID", it looks at the symlink to find out whether it's sda, sdb, sdc or whatever.

Now if you use dd to copy the old disk to the new, and leave both disks connected, anything looking by sda or sdb is going to find it but you won't know which disk it's found. At BEST the same applies to anything looking by UUID. But it could be a lot worse - anything that relies on the UUID being unique (which is what is promised) could do real damage to the system if they aren't.

Read up on gdisk - I guess parted, fdisk, etc have the same - but it has the option to copy an MBR or GPT and generate new UUIDs for all the partitions. You MUST do that if you're leaving both drives in the system.

Cheers,
Wol

Reply via email to