Hi, few months ago I installed Zorin (17.3Core) and in that fresh new installation I zeroed Gnome and placed KDE. All go well so I wish to replicate it on another PC in my office. Of course in this few months I modified what is on the original machine to what better fit my job, so I delete some softwares, add some others by ppa, snap, flathub, the net and over all I placed few little addons like “open as admin” in the right click menu or start Dolphin as root and some more… Now I wish to replicate this fittings with all the little adjustments done but can’t remember all that I changed.. There is a way to obtain a list about changes?
the only way i know of is taking good notes.
apt logs can tell you what packages were installed and in what order, which somewhat goes to your question, but it doesn’t differentiate between stuff you added and stuff the system add via updates.
##apt keeps a history of packages installed/removed
/var/log/apt/
# view a chronological list of installed applications by sorting for created date
/usr/share/applications/
~/.local/share/applications
list installed flatpak apps with
flatpak list --app
# to review an application's config and setting files, look in these directories
~/.config/
~/.local/share/
~/.application-name
~/.var/ (for any flatpak installs)
/usr/share/applications/
As has been stated good notes on ever change like I do is the way to get that. One thing you can do is just clone your install to another disk to put into the machine you wish to use it on. As long as you are not using something like the nvidia drivers with incompatible cards it should boot once the required changes are made to three files if using EFI system, MBR I have no clue never did one of them.
UH??? Let me understand I’m a newbie in Linux world so it’s out of my knowledge…
You said that, except if in the origin machine there was some private drivers, I can just c&p the whole S.O. on other PC and I obtain a completely working copy 1:1 of my own??? Really? Am I not obliged to: get a distro; make a boot stick; install the distro, remove all the unuseful stuff, place in all the necessary software and then make all the appropriate changes, adjustments and adaptations and finally adapt the graphics GUI???
Really? This is a Total Definitive Solution!!
I have 5 PCs in office and I’m slowly changing from Windozz to Linux: If truly I can just cloning the first I will save a lot of work days!!! I chan change all in a single work day!! How I can clone the S.O.??
foxclone or clonezilla are good live USB tools you can use to make a clone of an existing disk.
the destination disk has to be as big or bigger than the target disk (for obvious reasons).
the cloned disk should be able to be connected to any system and just boot to it as long as there are no special drivers needed (like nvidia) but before you clone you can always drop down to the kernel’s free drivers which will get you up and running on any other machine so that you can tweek the nvidia drivers as needed on the 2nd machine.
the kernel does most of the work here.. unlike windows which will cough up blood if you try this.
windcows.. spill blood on the floor is easiest than just start to thinking about copy/paste a MSWin… But you made me courious… looking on how clonezilla and other similar software works I was a little scared so surfing I found a software that do it in a real simple way: https://penguins-eggs.net (free, masterpiece done and developed by a fellow citizen in Rome (IT) !!) That software answer however to what I initially asked because I want to save all the settings I did and replicate them on the other machines. Eggs do exactly it, remaster a new distro starting on what I did on mine, with (or without) personal data, addons, scripts, etcetera! Thank you, without your posts I should never discover the clone world!
You can do it either way from live running system or with a boot stick. The boot stick is the easiest method to do it with as you do not need to exclude files it is just a straight up copy with rsync. You boot machine with the stick get to the desktop and open a console/terminal window to run the required commands. Now you need to have partitioned the new drive as you wish it to be either from the command line with gdisk for a GPT partitioned drive that is required to boot an EFI system or graphically with one the many tools that do it that way. I always go command line because I have been doing this for forty plus years now from way back when all there was was a command line.
An example of gdisk partitioned drive procedure.
root@9600k:~# gdisk /dev/sdb
GPT fdisk (gdisk) version 1.0.9
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present
Creating new GPT entries in memory.
Command (? for help): n
Partition number (1-128, default 1):
First sector (34-250069646, default = 2048) or {+-}size{KMGTP}:
Last sector (2048-250069646, default = 250068991) or {+-}size{KMGTP}: 500MB
Current type is 8300 (Linux filesystem)
Hex code or GUID (L to show codes, Enter = 8300): ef00
Changed type of partition to 'EFI system partition'
Command (? for help): n
Partition number (2-128, default 2): 2
First sector (34-7814037134, default = 411648) or {+-}size{KMGTP}: 411648
Last sector (411648-7814037134, default = 7814035455) or {+-}size{KMGTP}: 40G
Current type is 8300 (Linux filesystem)
Hex code or GUID (L to show codes, Enter = 8300):
Changed type of partition to 'Linux filesystem'
Command (? for help): n
Partition number (3-128, default 3): 3
First sector (34-7814037134, default = 84297728) or {+-}size{KMGTP}: 84297728
Last sector (84297728-7814037134, default = 7814035455) or {+-}size{KMGTP}: 80G
Current type is 8300 (Linux filesystem)
Hex code or GUID (L to show codes, Enter = 8300):
Changed type of partition to 'Linux filesystem'
That shows you a 120G SSD being used with a 500M EFI partition first a 40G / partition and a 80G for home. You can adjust the sizes as you wish. That is my standard as I will use smaller drive for the boot and install then have larger where I store all my important files.
The formatting of the drive I go first partitiion EFI system which needs to be fat32, ext4 for second and third partition, the /root and /home partitions.
root@9600k:~# mkfs.vfat -F 32 /dev/sdb1
root@9600k:~# fatlabel /dev/sdb1 DRIVEEFI
root@9600k:~# mkfs.ext4 -m 0 -L DRIVEROOT /dev/sdb2
root@9600k:~# mkfs.ext4 -m 0 -L DRIVEHOME /dev/sdb3
The -m 0 reserves not space on the partitions the default without is 5% and the -L gives you partition label.
Now the actual copying/cloning from booted usb. Open terminal from desktop environment use these commands. The commands above would use the sudo in front of them as I show a root user doing it.
sudo mkdir /tmp/oldroot
sudo mkdir /tmp/newroot
sudo mkdir /tmp/oldhome
sudo mkdir /tmp/newhome
sudo mkdir /tmp/oldefi
sudo mkdir /tmp/newefi
Then mount the partitions using sudo fdisk -l to determine the actual drive letter number of the partition to be cloned.
sudo mount /dev/sda1 /tmp/oldefi
sudo mount /dev/sdb1 /tmp/newefi
sudo mount /dev/sda2 /tmp/oldroot
sudo mount /dev/sdb2 /tmp/newroot
sudo mount /dev/sda3 /tmp/oldhome
sudo mount /dev/sdb3 /tmp/newhome
Now clone.
sudo scp -r /tmp/oldefi/* /tmp/newefi/
sudo rsync -avP /tmp/oldroot/* /tmp/newroot/
sudo rsync -avP /tmp/oldhome/* /tmp/newhome/
Once the cloning is done you need to edit some files for the new UUIDs on the cloned to drive so it will boot. To get the required information use the sudo blkid command an example of its output below.
Mushkin 480GB SSD
/dev/sda1: LABEL_FATBOOT="MUSHKINEFI" LABEL="MUSHKINEFI" UUID="6465-9332" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="d2a1b57d-794c-4ed8-9c76-1c6d12108f6b"
/dev/sda2: LABEL="MushkinRoot" UUID="03fec226-03dd-40de-8728-1bf7ae86239d" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="4e0572c1-cac9-4319-bd7f-90c9806d0a26"
/dev/sda3: LABEL="MushkinHome" UUID="6db5ea58-64bd-45db-aa1c-004c6b782f04" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="319d59c2-0efe-4d3b-a37e-8c1e517ee813"
There you can see where to get them from. Now three files need to be edited on a Debian based EFI system. The first.
root@9600k:~# cat /boot/efi/EFI/debian/grub.cfg
search.fs_uuid 766dcfc3-a1e4-495f-86e2-570205723fef root
set prefix=($root)'/boot/grub'
configfile $prefix/grub.cfg
On the cloned drive this file would be /tmp/newefi/EFI/debian/grub.cfg you edit with your favourite editor to change to new UUID for the new / from the blkid command earlier. The second is the /tmp/newroot/etc/fstab where you edit all three the old EFI, / and /home to the new UUIDs for them. Lastly
Here I show example from script I have that does all of this part on live running system.
# My Mushkin 8500t intenal
sed -i "s/6977106c-69db-4634-b33f-9a03da4b46ed/03fec226-03dd-40de-8728-1bf7ae86239d/g" /root/bin/boot_mushkin_8500t_grub.cfg
So the command to do it on cloned drive would be.
sudo sed -i "s/oldrootUUID/newrootUUID/g" /tmp/newroot/boot/grub/grub.cfg
Then you can boot and when the new drive is selected from the one time EFI boot menu in the machine it should just fire up. I have done this hundreds of times and it works every time unless I forget to edit a UUID when manually, my scripts run it flawless to back and restore to my various machines and drives. Good luck if you use this method it should just work unless I have stupid typo I missed when checking it over..
I’ve never got a timeshift to recover everything cos Usually something forks. I do disk cloning but only of the initial install because var/app/cache gets too big.
(FYI /var/cache/apt$
total 106404
drwxr-xr-x 3 root root 4096 Ogos 5 13:31 ./
drwxr-xr-x 24 root root 4096 Mac 7 12:07 ../
drwxr-xr-x 3 root root 24576 Ogos 5 13:35 archives/
-rw-r–r-- 1 root root 54494739 Ogos 5 13:31 pkgcache.bin
-rw-r–r-- 1 root root 54411915 Ogos 5 13:31 srcpkgcache.bin
I never have had any of them GUI things to work they always fail on the restore step for me. My script I use or doing it manually as I show works every time on an EFI install. For the archives problem use the apt clean or apt autoclean one removes everything from the downloaded and saved archives the other leaves the packages that are installed on the system while removing the old versions in the cache. I forget which is which at the moment.
I get KDE system reply that autoclean/clean may break system. so only way is to remove the .gz files manually with “rm -r .gz”