You can't preserve a 'bootable' property by backing up a partition. The bootable properties would depend on details of the actual disk. The details would depend on the type of partition table and whether it's formatted to use boot partition or reserved sectors of the disk. A boot partition would be different from the actual OS partition. You would have to image the whole disk for that.
You can easily add a boot option to the destination drive:
Preserving the boot option shouldn't be such a problem since once you have the OS partition backed up, you can have your choice of the partition type of the new drive you will be restoring it to. If you restore it to a partition on your Ubuntu machine running sudo update-grub
will add it to your boot menu.
As far as compression, yes you can. An example of how to use it is included below.
For Linux you can check the filesystem's block size with this command:
$ sudo blockdev --getbsz /dev/sda1
You can change the blocksize with this command:
$ mkfs -t ext4 -b 4096 /dev/sda1
You'll have to discuss a Windows block size details with a site such as http://superuser.com. Changing the blocksize could corrupt the integrity of the filesystem if it can't handle the different size. dd doesn't have an option to change a filesystem's block size on the fly.
This is a good dd
commandline that may be an improvement to the one in your example:
$ sudo dd if=/dev/sda1 status=progress bs=32M | bzip2 > /path/to/W7.img
These are the parameters of the commandline:
- bs = Bytes - Read and write up to # of bytes at a time.
- status = Show a status of the progress. This is useful when the operation takes a long time, to realize it's not locked up, and still working. It can also give a perspective of how much time might be left.
- | bzip2 > = Pipe through bzip2 for compression and output to the desired compressed image file.
dd
. The following links describe more details. shorter: You can try Clonezilla and longer: I would use Clonezilla – sudodus Apr 19 '18 at 05:38