Answer the question
In order to leave comments, you need to log in
How to clone a system with all users and settings to a smaller disk?
Worth Debian, 2 users. Terabyte disk. All two now occupy 120 gb and will not occupy more than 200.
I want to change the HDD from 1tb to 200gb. While saving the entire folder structure, user settings, etc.
The disk is divided into:
/ -50gb ext4
/home -800gb ext4
swap - 16gb
I would like to reduce the root to 25. Well, the home folder, according to the size of the new disk.
Answer the question
In order to leave comments, you need to log in
1) backup
2) gparted - reduce the partitions (fs will decrease automatically), shift the partitions so that everything is nearby and at the beginning of the disk.
3) dd to the desired disk
If you like it when APASNA - backup can not be done. I warned.
Using gparted, reduce the partitions and the disk itself to the desired capacity (slightly less than the second disk)
Insert the second disk
Clone from the first to the second using r-drive image, booting from a cd or flash drive with it
Disconnect the first disk, you may get swearing at the boot partition, then do fscheck at the first start
On virtual machines, I constantly practice this option, it’s convenient for me
How would I do
Option 1:
1. Set TimeShift and backup the entire system via rsync to external media. It is possible without TimeShift via console rsync if you know how to use
it 2. We will make a backup of the home directory via Deja Dup
3. Boot through any live distribution, make the necessary disk layout via gparted or similar, install TimeShift and Deja Dup in the same live distribution.
4. Restoring backups that were previously made
5. Installing the GRUB bootloader. Look like that's it.
Option 2:
1. Stupidly copy the entire system partition to an external drive, by simple copying. We will do the same for the home directory. For example, just create the System and Home folders on an external drive and drop the files into the corresponding folders.
2. Boot through any live distribution, make the necessary disk partitioning using gparted or an equivalent
3. After partitioning, copy the files back to the desired partitions
4. Install the GRUB bootloader
clonezilla in a text interface allows you to do what you want, not only with linux but also with windows.
If anything, it uses the standard partclone utility. Prepare the partitions yourself using fdisk / gparted / kde partitionmanager
You also need to re-install / update grub so that it registers a bootloader for legacy mode or the efi menu
grub-install /dev/sda --root-directory=/mnt
where sda is the new disk and / mnt is where the new copy of the system root is mounted (the new copy must be mounted there /boot and /boot/EFI).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question