Changes

Jump to: navigation, search

Linux Mint: Disk image

546 bytes added, 10:11, 27 January 2020
Instructions for disk image preparation:
1. * Obtain Linux workstation PC. Any recent Linux distribution is ok 2. * Open the terminal and print current partitions
<pre>
$ cat /proc/partitions
</pre>
3. * Attach the disk you are going to clone to the workstation PC and print with some suitable adapter (for example M.2 SATA SSD to USB 3.0 adapter)* Print detected partitions again:
<pre>
$ cat /proc/partitions
...
8 80 30932992 sdf8 81 2929664 sdf18 82 97280 sdf28 83 97280 sdf38 84 488448 488448 sdf4
</pre>
* In the example above attached disk named /dev/sdf and it has 4 partitions: /dev/sdf1, /dev/sdf2, /dev/sdf3, /dev/sdf4* We will use the name /dev/sdf in this guide, it can be different in your case4. <br>* Open the terminal and save disk layout using fdisk tooland blkid tools:
<pre>
$ echo -e "O\nfdisk.layout\nq\n" | sudo fdisk /dev/sdf
 
# review fdisk.layout file
$ cat fdisk.layout
label: dos
/dev/sdf3 : start= 6055936, size= 194560, type=4
/dev/sdf4 : start= 6250496, size= 976896, type=83
</pre>
5. Open the terminal and save disk layout using blkid tool:<pre>$ sudo blkid /dev/sdf* -s UUID -s TYPE > blkid.layout # review blkid.layout file
$ cat blkid.layout
/dev/sdf1: UUID="34b4205b-d2b9-4e50-9ea1-c559fdab97d3" TYPE="ext4"
</pre>
6. * Ensure disk partitions are unmounted (on some systems they can be mounted automatically)<pre>$ sudo umount /dev/sdf*</pre> * Save filesystem from each disk partition using partclone tool and compress using lz4 tool.partclone Partclone tool supports: NTFS,EXT2ext2/3/4,FAT ntfs, fat and many other filesystem types, you can clone disks with Linux or Windows installations
Install required cloning software: "liblz4-tool" and "partclone"
<pre>
# for distributions based on Ubuntu/Debian$ sudo apt update$ sudo apt install liblz4-tool partclone
</pre>
In the example aboveaccording to blkid.layout: - /dev/sdf1 and /dev/sdf3 have "ext4" filesystem - /dev/sdf2 has "vfat" filesystem - /dev/sdf3 has no filesystem
According to the example need to save 3 partitions:
<pre>
$ sudo partclone.ext4 -c -s /dev/sdf1 | lz4 > part1.ext4.partclone.lzlz4$ sudo partclone.vfat -c -s /dev/sdf2 | lz4 > part2.vfat.partclone.lzlz4$ sudo partclone.ext4 -c -s /dev/sdf4 | lz4 > part4.ext4.partclone.lzlz4
</pre>
* Calculate md5 for files you've prepared7<pre>$ md5sum *. layout part*.partclone.lz4 > md5</pre>* Send us the fdisk.layout, blkid.layout and all , part*.partclone.lz lz4 filesand the md5 file
425
edits