Cloning Manjaro From Dual-Boot Laptop to Dual-boot External SSD

My current setup:

  • external 1TB m.2nvme SSD is dual booting Fedora (ext4 /boot (1GB) and ext4 /root (283GB) and Windows10.
  • laptop is dual booting Manjaro fat32 /boot (1GB); ext4 (45GB) /root and ext4 /home (80GB) and Windows10.

Intention:
I would like to migrate (clone) Manjaro to replace Fedora on the external SSD and be able to use Manjaro independently on laptop as well as external SSD and syncing (backing up) both regularly.

Both my laptop and external drive are dual-boot setups for Linux and Windows.

Any help to walk me through this syncing/cloning would be much appreciated.

1 Like

Cloning produces a bitwise copy of a drive. Copying tends to be much better for this kind of thing.

Will the external drive always be present?
Do you intend to use the external drive with any other computers?

1 Like

Yes to both. When I am on my laptop, the external drive is what I access my data partition on whether using Linux or Windows.

When I am without the laptop elsewhere, my dual-booting 1TB m.2nvme SSD is a convenient way to work on other computers via USB.

What would be a straightforward way to have both be synced as I can work on either independently?


Update:

I have used “dd” to clone over to my external SSD for both /root and /home.

Can you help with updating my boot loader on my dual-boot external SSD?

1 Like

Sorry about the delay, I was busy.

Why do people always clone even when advised not to. :confused:

I would’ve said you had 2 options.

  1. Do a fresh install. Get a list of the installed software and use that to install the software on the new installation and copy over any config you need. This one is easier, but the users need to have the same UID/GID ie create them in the same order.

  2. Re-create the partitions on the external drive. Copy the contents over using rsync, edit fstab and install grub. This one requires more knowledge.

If you have encryption then that complicates things.

If you want to boot the external drive on other computers you’ll need an efi partition and grub on the external drive.

What did you do exactly?

lsblk -fo +SIZE
cat /etc/fstab
1 Like

I had written a whole paragraph - almost a wiki - to say the same and back it up/explain it.
Then decided against posting - to not interfere.

It would be so much more effective, safe, and useful
to just use the available space, create matching partitions in it
and just copy the stuff and then adjust /etc/fstab and /etc/default/grub and re-install grub …

3 Likes

Feel free to interfere whenever you like. :slight_smile:

I’ll have to write it again.
Not a problem, as it is rather simple.

But is the OP even interested?

I’m NOT interested in trying to help to make his “dd” approach work out in the end. :sunglasses:

1 Like

I’ll try if it makes sense, but I suspect it may be unworkable. Either way we’ll need to wait for more information.

Unfortunately I’m not so good at extracting the information. :frowning:

dd has certain issues inherent in the process

… the size of source and target is the same
… if target is actually bigger - space is wasted - it needs to be adapted later on
not always easy, especially with folks who are not familiar with what actually needs to happen

and then the UUID’s need to be adapted - in multiple places

/etc/fstab
and
/etc/default/grub
…

… the partitions and filesystems sizes need to be adjusted
to make use of the (bigger) available space …

… lots of avoidable problems if a simple copy method was used right from the start …

the boot loader needs to be reinstalled in any case …

1 Like

No worries, dmt. Glad that you are helping this novice out, much appreciated :slightly_smiling_face:

I had to do something and “dd” was what I started playing around with. I don’t mind exploring options and the work, lol had been at it for hours this morning till 7am before hitting the sack. Has had errors booting and it was quite a mix-up. At least I am learning through troubleshooting errors, lol.

After “dd-ing”, I encountered error “Fail to start remount root and kernel system”.

Despite “warnings” not to fiddle with fstab and grub.cfg, I have gone into those on both the SSD and laptop respectively to read and modified according to what little I had assumed I knew :thinking:.

However, trying to load from the laptop itself now posts the error:

'grub_debug_malloc' not found. 
Entering rescue mode 
grub rescue>

Booting from the SSD still gets me in but Incidentally, the grub installation process led to booting Manjaro that resides on my laptop instead of from the external SSD.

As per your request:

lsblk -fo +SIZE                                                                                                           
cat /etc/fstab
NAME   FSTYPE   FSVER LABEL           UUID                                 FSAVAIL FSUSE% MOUNTPOINTS                                   SIZE
loop0  squashfs 4.0                                                              0   100% /var/lib/snapd/snap/authy/5                  61.3M
loop1  squashfs 4.0                                                              0   100% /var/lib/snapd/snap/authy/12                  104M
loop2  squashfs 4.0                                                              0   100% /var/lib/snapd/snap/core18/2074              55.4M
loop3  squashfs 4.0                                                              0   100% /var/lib/snapd/snap/gnome-3-28-1804/161     164.8M
loop4  squashfs 4.0                                                              0   100% /var/lib/snapd/snap/gnome-3-38-2004/39      243.9M
loop5  squashfs 4.0                                                              0   100% /var/lib/snapd/snap/gtk-common-themes/1535   91.7M
loop6  squashfs 4.0                                                              0   100% /var/lib/snapd/snap/joplin/26                74.5M
loop7  squashfs 4.0                                                              0   100% /var/lib/snapd/snap/joplin-james-carroll/64 158.2M
loop8  squashfs 4.0                                                              0   100% /var/lib/snapd/snap/joplin-james-carroll/81 132.4M
loop9  squashfs 4.0                                                              0   100% /var/lib/snapd/snap/snapd/17950              49.8M
loop10 squashfs 4.0                                                              0   100% /var/lib/snapd/snap/snapd/17883              49.6M
loop11 squashfs 4.0                                                              0   100% /var/lib/snapd/snap/gnome-3-28-1804/145     162.9M
loop12 squashfs 4.0                                                              0   100% /var/lib/snapd/snap/gtk-common-themes/1515   65.1M
loop13 squashfs 4.0                                                              0   100% /var/lib/snapd/snap/core20/1026              61.7M
loop14 squashfs 4.0                                                              0   100% /var/lib/snapd/snap/bare/5                      4K
loop15 squashfs 4.0                                                              0   100% /var/lib/snapd/snap/core18/2667              55.6M
loop16 squashfs 4.0                                                              0   100% /var/lib/snapd/snap/core20/1778              63.3M
loop17 squashfs 4.0                                                              0   100% /var/lib/snapd/snap/joplin/150               76.2M
loop18 squashfs 4.0                                                              0   100% /var/lib/snapd/snap/gnome-3-38-2004/119     346.3M
sda                                                                                                                                   465.8G
|-sda1 ntfs           System Reserved A21695C616959C3B                                                                                  500M
|-sda2 ntfs           Win10       584CB97B4CB9548A                       43.7G    67% /run/media/Win10                     132G
|-sda3 vfat     FAT32 BOOT            4A8E-D802                             957.5M     6% /boot                                           1G
|-sda4                                                                                                                                    1K
|-sda5 ext4     1.0   root            49b4eb11-5a43-42d8-92bc-ece68525db2c   14.9G    61% /                                              45G
|-sda6 ext4     1.0   home            3566ea8f-6bb3-47de-a08f-78df0cb2e7e2   69.3G     6% /home                                          80G
|-sda7 swap     1     linux_swap      f9967c15-c88f-4607-9214-99af95500157                [SWAP]                                          8G
`-sda8 ntfs           Data00      18821DF5821DD7D8                        4.1G    98% /run/media/Data00                  199.3G
sdb                                                                                                                                     1.8T
|-sdb1 ntfs           Data1         01D1D34EB326A860                      117.6G    56% /run/media/Data1                       270G
|-sdb2 ntfs           Lib           7CEACAA5EACA5AD2                      190.4G    29% /run/media/Lib                         270G
|-sdb3                                                                                                                                    1K
|-sdb5 ntfs           Datab           01D1D34EB9197C20                      100.9G    63% /run/media/Datab                         270G
|-sdb6 ntfs           Docu            01D1D34EBCD6D240                        139G    49% /run/media/Docu                          270G
|-sdb7 ntfs           Media           01D1D34EC025D630                      174.7G    35% /run/media/Media                         270G
|-sdb8 ntfs           MWare1         01D1D34EC388B040                      123.9G    52% /run/media/Ware1                     256.5G
`-sdb9 ntfs           MWare2         01D1D34EC7EC5880                      156.8G    39% /run/media/MWare2                     256.5G
sdc                                                                                                                                   931.5G
|-sdc1                                                                                                                                    1K
|-sdc2 ntfs           mspace     0303D6EF16A2E3E4                      203.5G    69% /run/media/mspace                 661.4G
|-sdc5 ext4     1.0   Boot            b461b79c-cc9e-4669-a03d-42b3d3c9f3f8  648.1M    27% /run/media/Boot                            1G
|-sdc6 ext4     1.0   root            49b4eb11-5a43-42d8-92bc-ece68525db2c   14.9G    61% /                                              45G
|-sdc7 ext4     1.0   home            3566ea8f-6bb3-47de-a08f-78df0cb2e7e2   69.2G     6% /run/media/boon/home                           80G
|-sdc8 swap     1     linux_swap      91ac958d-a31d-481c-9a12-51bc65eeffc6                                                                8G
`-sdc9 ntfs           SSD_ex         077E432D368712CF                      135.9G     0% /run/media/SSD_ex                       136G
/dev/sda5                                   /       defaults   0                   0 0
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=4A8E-D802                              /boot   vfat       noatime             0 2 
UUID=49b4eb11-5a43-42d8-92bc-ece68525db2c   /       ext4       noatime             0 1 
UUID=3566ea8f-6bb3-47de-a08f-78df0cb2e7e2   /home   ext4       noatime             0 2 
UUID=f9967c15-c88f-4607-9214-99af95500157   swap    swap       noatime             0 0 
tmpfs                                       /tmp    tmpfs      noatime,mode=1777   0 0

*Correction: External SSD is not dual-boot. Only Manjaro.

I have changed the UUIDs on the external SSD for /root /home and Swap partition. Still figuring out the boot loading issues.

1 Like

Yes, feel free to interfere. It can’t get any worse with my level of ignorance :blush:

I’m not up to this.
Here is again a list of what needs to be done.

tasks:

  • change the UUID of the partitions that you dd’ed TO (the new ones)
    I don’t know how to do that. It’s easy and also easy to find out, but I never had to do it so I just don’t know how.

  • have /etc/default/grub and /etc/fstab reflect these new UUID’s
    I’m not up to figuring out which is which from a distance in order to help you but it’s easy for you to keep track.
    lsblk -f can help - you can also know from the contents which is which
    just access/mount and look …

  • grow the filesystems to match the free space on the disk - because at the moment, there is probably more space on disk than is occupied by the new systems partitions
    gparted can do that

When all that is done, reinstall the boot loader (chroot into the system to do that).

Have fun with your learning experience!

The copy method (no dd):

create the needed partitions at the size that you want
You have the blueprint of the layout before you.
If you struggle with that:
install a fresh system
then you have the structure
and you can just copy from one to the other
still have to adjust /etc/default/grub and /etc/fstab

cp -a
or
rsync -a

Or just use the new system and only transfer your user data (contents of your $HOME directory).

That is what I would do.

Cheers!

1 Like

@munjaro, the others have already explained in enough depth how you can “duplicate” your system onto another drive…

But keep in mind that when you boot on a different computer (hardware) you will encounter more problems due to different drivers needed…
If this method you want would have been easy and simple, all operating system vendors/distro’s would provide just a simple image that everyone can use on all hardware without any needed changes :slight_smile:
The closest solution like that is the LiveISO approach, which is used to freshly install your OS :wink:

Thanks

Trying to keep current states and solve the boot loading issue at the moment.

Hope to get it right if anyone can help.

Cheers

I have no more help to offer than I already did. :man_shrugging:

SOLVED! I think at least 99% solved.

I will post the results here so that it is on record for future reference should someone else encounters similar and hopefully it will be helpful.

First, I would like to thank you dmt for your time and attention with my cloning process; Nachlese for your added input; and Trimoon for your reminders :slight_smile:


I will described in summary (no great details) the results after my “dd” cloning operation (even though not recommended by fellow forum member, dmt) plus trying to fix lots of errors with booting and ending up installing over the cloned partition /root on the external SSD as well.

Disclaimer: For those who are looking to do similar, you may want to try copying over your desired portions/features or other methods instead of using “dd” since the latter method hadn’t shown me to be working as smoothly as I had intended but it certainly gave me, as a Linux novice the opportunity to learn from “real time” (yes, many many hours of it) lessons.

  1. “dd” cloned from laptop (dual-booting Manjaro linux and Windows10) two partitions /root and /home over to the external SSD (single-booting Fedora linux). Straight-forward success.

However, boot-loader issues presented lots of conflicts that I did not initially understand because it involved device UUIDs also cloned over to the external SSD, thus confusing the whole thing from working and booting properly.

  1. Went against “warnings” to not edit those config files, I went ahead and mucked around on both systems with fstab files, xorg.conf files and grub.cfg files and saw more errors but I did learn a lot more through trying to fix those errors. Precious lessons :slight_smile:

Some successes which led to more understanding of how somethings work under the “hood”.

Important step.
Had realised that the cloning process brought over same UUIDs to the external SSD, so regenerated new UUIDs for the devices /root and /home.

  1. Despite fiddling around with all those config files and still experiencing a lot of errors, the most straight-forward and simple thing that helped in the end was to have found the answer to the booting issues at GRUB/Restore the GRUB Bootloader - Manjaro.

Launched into the Manjaro “live USB” environment to execute the above process for the laptop as well as the external SSD. That fixed the loading of Manjaro on the laptop but not for the external SSD as the boot loader on the external SSD still pointed to the /root on the laptop.

I decided to reinstall Manjaro on the external SSD to see if it would sort out the connection to the laptop.

  1. Fresh-install Manjaro onto the external SSD (1TB).

Using Gparted as partition manager, I resized the /root (45GB) and /home (80GB). Retained the /boot (1GB) partition and created a /swap (8GB) partition.

From the “live USB”, I installed over the existing /root partition on the external SSD. It went smoothly.

Surprise.
Somehow, instead of installing a fresh Manjaro onto the external SSD /root, I found out that all of the cloned features from the laptop including internet, bluetooth, etc. settings also got retained in the new installation. I did not know how but glad that perhaps the Manjaro installation process had taken into consideration the existing OS and only “updated” the Manjaro rather than completely “overwritten” it. This part I have not understood yet.

  1. Finally, both the boot loaders on the laptop and the external SSD are working independently and correctly targetting the respective /root partitions EXCEPT that somehow the external SSD still maintained the entry for Windows10 which did not exist on the external SSD.

I went inside the grub.cfg file to remove the entry for Windows10 and now it all works well, both the external SSD installation and the existing laptop system.

  • The one issue that still isn’t resolved is on the laptop initial loading process where it is still flashing the error:
    Failed to start. Remount root and kernel systems

The system still loads and work normally but I am still finding out how to remove that error message.

That’s all for now.

Cheers and thanks again for your help.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.