1 |
antlists wrote: |
2 |
> On 23/11/2020 10:37, Michael wrote: |
3 |
>>>> Have you changed the UUIDs on the new partitions? |
4 |
> |
5 |
>>> Never used UUID in fstab. Do I just run: blkid|grep UUID |
6 |
>>> and copy it to fstab. |
7 |
> |
8 |
>> I warned you about UUIDs. The block device of /dev/sda* could be |
9 |
>> pointing at |
10 |
>> a partition either on the old, or the new disk. In such cases it is |
11 |
>> a good |
12 |
>> idea to find out what block devices the MoBo identifies and what the |
13 |
>> kernel. |
14 |
> |
15 |
> If you're messing about with disks, partitions, etc, you NEED to have |
16 |
> a basic understanding of UUIDs. Bear in mind that the UID bit (iirc) |
17 |
> stands for *UNIQUE* ID. |
18 |
> |
19 |
> Linux (as has been said) allocates sda, sdb etc in the order it finds |
20 |
> partitions, which can be somewhat random. So there is no guarantee, if |
21 |
> you specify root as sda, something could glitch (or you've stuck an |
22 |
> eSATA drive on, or or or) and suddenly it's sdb and your system can't |
23 |
> find root! |
24 |
> |
25 |
> So what the initial boot system does is it sets up /dev/.../UUID as |
26 |
> symlinks to the appropriate sdx. So when boot says "root = UUID", it |
27 |
> looks at the symlink to find out whether it's sda, sdb, sdc or whatever. |
28 |
> |
29 |
> Now if you use dd to copy the old disk to the new, and leave both |
30 |
> disks connected, anything looking by sda or sdb is going to find it |
31 |
> but you won't know which disk it's found. At BEST the same applies to |
32 |
> anything looking by UUID. But it could be a lot worse - anything that |
33 |
> relies on the UUID being unique (which is what is promised) could do |
34 |
> real damage to the system if they aren't. |
35 |
> |
36 |
> Read up on gdisk - I guess parted, fdisk, etc have the same - but it |
37 |
> has the option to copy an MBR or GPT and generate new UUIDs for all |
38 |
> the partitions. You MUST do that if you're leaving both drives in the |
39 |
> system. |
40 |
> |
41 |
> Cheers, |
42 |
> Wol |
43 |
> |
44 |
> |
45 |
|
46 |
|
47 |
This is true. Even I switched to UUID wherever possible or labels. |
48 |
Even external things I use UUID on when possible. I've been bit by this |
49 |
once before and it was a hair pulling experience that I wouldn't want to |
50 |
repeat or wish on one either. |
51 |
|
52 |
If UUID is something you don't want to spend time learning right now, |
53 |
try using labels at least. Just make sure YOU use unique labels for |
54 |
each one. Hint. home-old, home-new works pretty well at times. At |
55 |
least you know it is home and which is old and which is new. Notes may |
56 |
help too. ;-) |
57 |
|
58 |
Hope that helps. |
59 |
|
60 |
Dale |
61 |
|
62 |
:-) :-) |