Further explanation on problems with PARTUUID when cloning Linux say from SSD to NMVME


jimbo45

Well-known member
Pro User
VIP
Local time
8:49 PM
Posts
4,795
Location
Hafnarfjörður IS
OS
Windows XP,7,10,11 Linux Arch Linux
Hi there
the problem with the partuuid can occur for example if your original root partition is on /dev/sda on the source system but you restore your clone to /dev/sdb on your second system. System will start boot OK since the boot partition is flagged "boot, esp" but then it stops because it's looking for PARTITION UUID on /dev/sdb which it won't find since that originally came from /dev/sda on the original system.

So the boot process which probably looks at the /dev/sda partition on the new system won't find the correct partition UUID for the new root "/" on /dev/sdb. Changing fstab doesn't work in these cases when systemd is used as the boot manager. But by fixing the PARTITION UUID (not the DISK UUID) on dev/sdb will ensure the correct root ("/") partition is mounted.

I'm sure someone will come up with a much more geeky / technical answer -- but hey I'm trained as an Engineer, not a computer guru.

That's not a terribly technical explanation but it's basically what happens when trying to clone Linux systems and move them to new machines. Incidentally systemd is far better these days than relying on grub as a boot manager.

Cheers
jimbo
 

My Computer

System One

  • OS
    Windows XP,7,10,11 Linux Arch Linux
    Computer type
    PC/Desktop
    CPU
    2 X Intel i7

My Computers

System One System Two

  • OS
    Win 11 Home 24H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP 24" AiO
    CPU
    Ryzen 7 5825u
    Motherboard
    HP
    Memory
    64GB DDR4 3200
    Graphics Card(s)
    Ryzen 7 5825u
    Sound Card
    RealTek
    Monitor(s) Displays
    24" HP
    Hard Drives
    1TB WD Blue SN580 M2 SSD Partitioned.
    250GB C:/Windows .. 750GB D:/Home.
    2x 1TB USB HDD External Backup/Storage.
    Internet Speed
    900MB full fibre
    Browser
    Vivaldi .. Browser, Calendar, eMail.
    Antivirus
    AVG Internet Security
    Other Info
    Mainly Open Source Software
  • Operating System
    Windows 11 Home 24H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP 24" AiO
    CPU
    Ryzen 5 5500u
    Motherboard
    HP
    Memory
    32GB DDR4 3200
    Graphics card(s)
    AMD Radeon GPU
    Sound Card
    RealTek
    Monitor(s) Displays
    HP
    Hard Drives
    1TB WD blue SN580 M2 SSD Partitioned.
    250GB C:/Windows .. 750GB D:/Home.
    2x 1TB HDD External Backup/Storage.
    Internet Speed
    900MB Full Fibre
    Browser
    Microsoft Edge
    Antivirus
    AVG Internet Security
    Other Info
    Mainly Windows Software
    'The Wife's Computer'
is this of any help.

you can change the UUID via the CLI ..

@XxXxX

Not so simple as there's a GUUID and a PARTITION GUUID. At boot the system looks for the PARTITION GUUID not the basic GUUID. For example my root partition is on /dev/sda2. When using systemd as boot rather than grub the root is looked for by partition GUUID not the basic GUUID. If that's not correct then the system fails with "looking for partition <the partition GUUID> . The CLI doesn't give a lot of changing this directly. you need to use gdisk from a stand alone linux system unless you mess around with a lot of chroots since the partitions must be unmounted to change.

Remember I'm CLONING a system, not configuring an initial one !!!!.

This is what I have currently on the running system. To clone those to another disk the GUUIDS AND the partition GUUIDS need to be the same as on the source system although the size of the partitions can be changed - bigger or smaller if used data will fit.

Stand alone Gparted is a good tool here for copying partitions.

tune2fs also for example NO GOOD for xfs type file systems - but almost anywhere over the Internet that program is used as examples also on changing GUUIDS. !!!!

e.g current partition setup. root and home are xfs file system.

boot (/boot) on /dev/sda1
root (/) on /dev/sda2
home (/home) on /dev/sda3

Screenshot_20241222_141923.webp

cheers
jimbo
 
Last edited:

My Computer

System One

  • OS
    Windows XP,7,10,11 Linux Arch Linux
    Computer type
    PC/Desktop
    CPU
    2 X Intel i7

Latest Support Threads

Back
Top Bottom