I have specific Linux installed on SSD drive. What I want to do is to copy all ext4 partition files to other drive (also ext4) and make it bootable. Copy should be as similar as possible differentiating only in partition size and physical location of the files.
I understand that I need to make /boot/ folder the same, but what about GRUB? How can I make the target drive bootable?
Copy of whole partition/disk is not applicable here - I need instruction how to make bootable a copy of ext4 filesystem.
Based on @davidgo comment I successfully made a bootable copy of Linux. The commands are:
You may want to use
lsblk
to see which is your target drive and its partition. You may want to partition it first and make ext4 filesystem:Update to
/etc/fstab
on the target partition could be needed (else system won't boot).You could use Clonezilla, and clone the partition (including the boot sector). Later on, you could expand the partition into a bigger one.
https://clonezilla.org/downloads.php
Another option could be to run a FOG Server on the network (a PXE backup server). This one would allow you to backup the disk to another system (a 3rd computer, or even a VM if you want to), then restore the backup from the 1st computer to the 2nd computer. When you create the image, make it re-sizable, this way you could restore it to a smaller disk.
https://fogproject.org/
Step1: Create Bootable USB Drive for Linux. Start PowerISO (v6.5 or newer version, down load here). ... Step 2: Configuring the BIOS. You have to now reboot and go into the BIOS configuration to boot from USB. ... Step 3: Booting and setup or run Linux from USB drive.