I want to clone my system disk to a usb-stick, but it's slightly too small

    • OMV 0.4
    • I want to clone my system disk to a usb-stick, but it's slightly too small

      Using OMV4 and I want to clone my system disk to a usb-stick so I can boot from it if need be. I'm using OMV-Extras/Kernel's boot to Clonezilla, but my 32GB stick is slightly smaller than my 32GB mSATA drive.

      ```
      NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
      loop1 7:1 0 212.5M 1 loop /usr/lib/live/mount/rootfs/filesystem.squashfs
      sda 8:0 0 29.8G 0 disk
      ├─sda1 8:1 0 512M 0 part
      ├─sda2 8:2 0 21.5G 0 part
      └─sda3 8:3 0 7.8G 0 part
      sdb 8:16 0 953.9G 0 disk
      └─md127 9:127 0 953.8G 0 raid1
      sdc 8:32 0 953.9G 0 disk
      └─md127 9:127 0 953.8G 0 raid1
      sdd 8:48 1 29.3G 0 disk

      ```

      Any suggestions? I did see there are some options for shrinking, but that doesn't work and I get all kinds of messages I don't understand with the following.

      ```
      sudo /usr/sbin/ocs-onthefly -k1 -icds -g auto -e1 auto -e2 -r -j2 -sfsck -pa choose -f sda -t sdd
      ```
    • What I suggest is to use dd.

      This will fail at the very end due to slight lack of space on the destination drive, but it is almost a 100% certainty that what is being cloned at that point in the process is empty unused disk space. I have done this a few times and it always worked.
      --
      Google is your friend and Bob's your uncle!

      OMV 4.x - ASRock Rack C2550D4I - 16GB ECC - Silverstone DS380
    • I was able to boot into GParted Live, and shrink the partitions, and then this command seemed to work: `sudo /usr/sbin/ocs-onthefly -k1 -icds -g auto -e1 auto -e2 -r -j2 -sfsck -pa choose -f sda -t sdd`. However, I'm not able to boot off the of the disk. I don't know if this is a UEFI problem, but when I select it in my BIOS, the screen blinks and returns to the BIOS setup....
      Images
      • IMG_20191107_191812_1.jpg

        86.76 kB, 800×600, viewed 12 times
    • ╰─➤ lsblk
      NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
      sda 8:0 0 29.8G 0 disk
      ├─sda1 8:1 0 512M 0 part
      ├─sda2 8:2 0 20.5G 0 part /
      └─sda3 8:3 0 7.8G 0 part [SWAP]
      sdb 8:16 0 953.9G 0 disk
      └─md0 9:0 0 953.8G 0 raid1 /srv/dev-disk-by-label-tb
      sdc 8:32 0 953.9G 0 disk
      └─md0 9:0 0 953.8G 0 raid1 /srv/dev-disk-by-label-tb
      sdd 8:48 1 29.3G 0 disk
      ├─sdd1 8:49 1 512M 0 part /boot/efi
      ├─sdd2 8:50 1 20.1G 0 part
      └─sdd3 8:51 1 8.7G 0 part