How to "clone" a working MX-Linux system
- a_freed_man
- Posts: 160
- Joined: Tue Nov 03, 2020 11:25 am
How to "clone" a working MX-Linux system
I'm working with a different BeeLink system now, trying to install the snapshot I took from a BeeLink N100. I created the bootable USB from the snapshot, but not sure if that is the correct way install it on new system to achieve a "clone". I used lvm & custom partitioning and I don't want to manually do all that again.
Is there a way to install the snapshot ISO so it restores everything as it was on the system the snapshot was created on, partitioning, home folder contents etc?
When I boot from the Live USB LUM created from the snapshot ISO and run the installer link on the desktop, it prompts for partitioning. Is there a way to clone a system without prompts from an MX-Linux snapshot?
Is there a way to install the snapshot ISO so it restores everything as it was on the system the snapshot was created on, partitioning, home folder contents etc?
When I boot from the Live USB LUM created from the snapshot ISO and run the installer link on the desktop, it prompts for partitioning. Is there a way to clone a system without prompts from an MX-Linux snapshot?
Re: How to "clone" a working MX-Linux system
Shortly:
You can install it and it will pick the correct drivers etc. according to the new hardware. (Even when they're very different, say Intel graphics on one, AMD on the other ... )
It doesn't save how partitioning was on the original system.
You can install it and it will pick the correct drivers etc. according to the new hardware. (Even when they're very different, say Intel graphics on one, AMD on the other ... )
It doesn't save how partitioning was on the original system.
-
- Posts: 730
- Joined: Tue Sep 22, 2020 7:36 pm
Re: How to "clone" a working MX-Linux system
I use 2 methods:
1) Clonezilla live usb - Turn off swap and any fs checks on the source drive. Hook up the target drive (must be the same size or larger) via usb. Boot using clonezilla, disk clone source drive to target drive. Takes about 2/2.5 hours.
2) MX Live usb - Turn off swap on source drive. Hook up the target drive (must be the same size or larger) via usb. Boot using MX live usb, use built in dd utility:
sudo dd - dd has to be run as root
if=/dev/sda (source) - tells dd the input file to copy from (in this case the whole drive)
of=/dev/sdb (target) - tells dd the output file to copy to (in this case the whole drive)
conv=noerror,sync - tells dd to continue even if errors are encountered and to sync any data left at the end. This way you ensure nothing is left if you unmount
bs=1M - tells dd what size chunks (block size) to copy data in. 1M (1 Mbyte) makes it a little bit faster for me.
status=progress - tells dd to print it's progress to the screen
Takes about 4 hours.
I noticed Clonezilla was a much faster, maybe because it copies in bs=4096 (4Mb). Everything has it's pros and cons.
https://wiki.archlinux.org/title/Dd
https://www.youtube.com/watch?v=BisJBC93sjQ
1) Clonezilla live usb - Turn off swap and any fs checks on the source drive. Hook up the target drive (must be the same size or larger) via usb. Boot using clonezilla, disk clone source drive to target drive. Takes about 2/2.5 hours.
2) MX Live usb - Turn off swap on source drive. Hook up the target drive (must be the same size or larger) via usb. Boot using MX live usb, use built in dd utility:
Code: Select all
sudo dd if=/dev/sda of=/dev/sda bs=1M conv=noerror,sync status=progress
if=/dev/sda (source) - tells dd the input file to copy from (in this case the whole drive)
of=/dev/sdb (target) - tells dd the output file to copy to (in this case the whole drive)
conv=noerror,sync - tells dd to continue even if errors are encountered and to sync any data left at the end. This way you ensure nothing is left if you unmount
bs=1M - tells dd what size chunks (block size) to copy data in. 1M (1 Mbyte) makes it a little bit faster for me.
status=progress - tells dd to print it's progress to the screen
Takes about 4 hours.
I noticed Clonezilla was a much faster, maybe because it copies in bs=4096 (4Mb). Everything has it's pros and cons.
https://wiki.archlinux.org/title/Dd
https://www.youtube.com/watch?v=BisJBC93sjQ
Re: How to "clone" a working MX-Linux system
@a_freed_man If you check the Preserving accounts (for personal backup), then you should have as close as you can get *without a true clone* and as Charlie mentioned it will change drivers if needed, and you would need to make sure of the partition etc on the new install.
But, this is by far the best method to move to a new machine. ( A true clone is the other - but the machine needs to be either the same in a few areas. )
But, this is by far the best method to move to a new machine. ( A true clone is the other - but the machine needs to be either the same in a few areas. )
*QSI = Quick System Info from menu (Copy for Forum)
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!
*MXPI = MX Package Installer
*Please check the solved checkbox on the post that solved it.
*Linux -This is the way!
- a_freed_man
- Posts: 160
- Joined: Tue Nov 03, 2020 11:25 am
Re: How to "clone" a working MX-Linux system
Ok, guys thanks. No true clone then. I was hoping for options so the ISO would recreate the existing system.
I know it is problematic to make copies of a working (i.e. changing filesystem) system without some way to "lock" activity (MS Windoze can do this, enabling tools like Macrium Reflect to make a 100% image of a running system).
I will have to redo the partitioning & install the iso I made from the snapshot to recreate the setup. I did create the snapshot with "Preserving accounts" tho.
I know it is problematic to make copies of a working (i.e. changing filesystem) system without some way to "lock" activity (MS Windoze can do this, enabling tools like Macrium Reflect to make a 100% image of a running system).
I will have to redo the partitioning & install the iso I made from the snapshot to recreate the setup. I did create the snapshot with "Preserving accounts" tho.
Re: How to "clone" a working MX-Linux system
If you were able to connect 2 drives on 1 machine, then it would be as simple as a "copy-paste", just like you do in a file manager:
On GParted:
The target drive needs to be "unallocated":
Right-click on source drive's partition: "copy",
then change device (you can use the top menu or the top-right drop-down menu)
and right-click on the unallocated space: "paste".
Do that for all partitions , even the labels, uuids will be the same :)
- a_freed_man
- Posts: 160
- Joined: Tue Nov 03, 2020 11:25 am
Re: How to "clone" a working MX-Linux system
Thx @charlie brown for that tip, I didn't realize gparted could do that. It's undoubtedly using dd behind the GUI to do the copy, but slightly easier than using dd on the cmd line.
However I only have the snapshot ISO to work with right now. I don't currently have access to the N100 machine. I may use that technique in the future tho.
However I only have the snapshot ISO to work with right now. I don't currently have access to the N100 machine. I may use that technique in the future tho.
Re: How to "clone" a working MX-Linux system
@ a_freed_man
For backup and cloning the system I'm using Macrium Reflect Free 8.0.
It is a program for Windows so you have to install it once on a Windows-PC in order to create a bootable recovery medium (CD oder thumbdrive).
With the recovery medium you can
- boot any PC
- make a backup of the whole system
- restore a backup to another system (1:1 Clone)
- of course you can do this with single partitions too
I do this regularly on our T530-laptops and it works fine.
I tested some programs (i.e. foxclone) but found Macrium Reflect to be the best choice with highest speed.
For backup and cloning the system I'm using Macrium Reflect Free 8.0.
It is a program for Windows so you have to install it once on a Windows-PC in order to create a bootable recovery medium (CD oder thumbdrive).
With the recovery medium you can
- boot any PC
- make a backup of the whole system
- restore a backup to another system (1:1 Clone)
- of course you can do this with single partitions too
I do this regularly on our T530-laptops and it works fine.
I tested some programs (i.e. foxclone) but found Macrium Reflect to be the best choice with highest speed.
Re: How to "clone" a working MX-Linux system
Clonezilla, "dd", never used with MX ... for what? I don't understand the whole thread, or deepL doesn't translate some subtleties.
Clone= install working system on another computer (with different hardware), with the personal settings? Or byte exact transfer, which certainly doesn't work well with different hardware.
MX-snapshot => mx live usb => "new" installation with suitable (if different hardware) drivers, but all programs and program settings of the working system.
In my case, these were regularly my own PC, a desktop with Ryzen 9 3900x and an acer laptop with intel core i5 and short-term installations on hardware from colleagues, there was everything from Core i7 from 2012 to relatively current core i7 from 2018 with different graphics cards. It doesn't matter whether the partition sizes are similar or different, because I only install root and /home without pictures/videos/music, so 50gb is enough. the space eaters are on other hard disks. One of them is an external one, with which I can transfer the (mass) data to the target computer. At least the part that I need there.
This is also the basis of my backup system, the "mass" data is updated by luckybackuo (or grsync, it doesn't matter, both are just GUIs for rsync)
but it's not fully automatic, a few changes in the system always remain, in my case for example fstab and rc.local
Clone= install working system on another computer (with different hardware), with the personal settings? Or byte exact transfer, which certainly doesn't work well with different hardware.
MX-snapshot => mx live usb => "new" installation with suitable (if different hardware) drivers, but all programs and program settings of the working system.
In my case, these were regularly my own PC, a desktop with Ryzen 9 3900x and an acer laptop with intel core i5 and short-term installations on hardware from colleagues, there was everything from Core i7 from 2012 to relatively current core i7 from 2018 with different graphics cards. It doesn't matter whether the partition sizes are similar or different, because I only install root and /home without pictures/videos/music, so 50gb is enough. the space eaters are on other hard disks. One of them is an external one, with which I can transfer the (mass) data to the target computer. At least the part that I need there.
This is also the basis of my backup system, the "mass" data is updated by luckybackuo (or grsync, it doesn't matter, both are just GUIs for rsync)
but it's not fully automatic, a few changes in the system always remain, in my case for example fstab and rc.local
my working horse Desktop AMD Ryzen 9 3900x, 32GB Ram // SSD ... enough
mx-fluxbox, what else?
In nature there are neither rewards nor punishments.
There are consequences.
my wallpaper gallery
mx-fluxbox, what else?
In nature there are neither rewards nor punishments.
There are consequences.
my wallpaper gallery
- DukeComposed
- Posts: 1505
- Joined: Thu Mar 16, 2023 1:57 pm
Re: How to "clone" a working MX-Linux system
I have to second Clonezilla. Clonezilla is an OS-agnostic imaging utility and has a pretty wide array of options it can support, but it can just as easily be used in beginner mode and copy a disk's contents into an image, partition table and all, and then recreate that image on different hardware.BitterTruth wrote: Tue Oct 03, 2023 3:46 pm 1) Clonezilla live usb - Turn off swap and any fs checks on the source drive. Hook up the target drive (must be the same size or larger) via usb. Boot using clonezilla, disk clone source drive to target drive. Takes about 2/2.5 hours.
Having an MX snapshot ISO can be very handy, but if the OP doesn't even want to consider repartitioning a new machine, Clonezilla seems to be the best one-stop-shop option. It can do exactly what's being asked here.