dd ssd to usb

  • Currently OMV is on 256 Gb SSD. I reduced the partition size to 27 Gb and want to dd it to 32 gb USB Flash.

    Code
     dd if=/dev/sda of=/dev/sdg bs=1M

    Didn't work because not enough space. What is the right command please?

    OMV 6 on ASRock J4125B ITX w/2X8 GB G-Skill|32 GB Sandisk USB|50 TB HDD Space|Be quiet! Pure Power 400W

    Fractal Define R5 Titanium

  • The mistake you are making is that /dev/sda and /dev/sdg refer to entire disks, not any particular partition. The result is a copy of 256Gb onto a device that is only 32Gb..........not enough room.


    Then, if you "correct" your procedure to use partitions, ie /dev/sda1 copied to /dev/sdg1 enough room will exist. However, this does not copy the MBR so the disk copy will not boot.


    Often times what you tried will in fact actually work even though it threw an insufficient space error. In a case like this, it failed when copying empty space that doesn't matter. Try booting the failed copy if you haven't.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • OK. I tried to mount the usb in OMV but it doesn't appear.There is not even a file system anymore

    OMV 6 on ASRock J4125B ITX w/2X8 GB G-Skill|32 GB Sandisk USB|50 TB HDD Space|Be quiet! Pure Power 400W

    Fractal Define R5 Titanium

    Einmal editiert, zuletzt von Jbloc ()

  • OK. I tried to mount the usb in OMV but it doesn't appear.There is not even a file system anymore

    What may have happened is that when the copy operation failed due to insufficient space, disks were not sync'd and the data didn't actually get copied to the destination disk, it was left in memory instead. Always run a sync command after a dd, even if it succeeded.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 7.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 32GB ECC RAM.

  • can you write the sync command for me please. I am still learning. Thanks.


    ok just sync. i got it.

    OMV 6 on ASRock J4125B ITX w/2X8 GB G-Skill|32 GB Sandisk USB|50 TB HDD Space|Be quiet! Pure Power 400W

    Fractal Define R5 Titanium

  • I tried dd again.

    Code
    root@nasomv:~# dd if=/dev/sda of=/dev/sdg bs=1M status=progress
    30761025536 bytes (31 GB, 29 GiB) copied, 1160 s, 26.5 MB/s
    dd: error writing '/dev/sdg': No space left on device
    29341+0 records in
    29340+0 records out
    30765219840 bytes (31 GB, 29 GiB) copied, 1250.12 s, 24.6 MB/s


    then

    Code
    sync /dev/sdg

    But same result. No file system

    OMV 6 on ASRock J4125B ITX w/2X8 GB G-Skill|32 GB Sandisk USB|50 TB HDD Space|Be quiet! Pure Power 400W

    Fractal Define R5 Titanium

    • Offizieller Beitrag

    Use clonezilla. Or create the partition table on the destination usb and just dd the partitions. The latter is harder to get right.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • OK. I used just sync first and then sync /dev/sdg.


    dd is the command of choice but leaves me with an empty flashdrive. How do i proceed with moving OMV?

    OMV 6 on ASRock J4125B ITX w/2X8 GB G-Skill|32 GB Sandisk USB|50 TB HDD Space|Be quiet! Pure Power 400W

    Fractal Define R5 Titanium

    • Offizieller Beitrag

    Why do you not want to use clonezilla? This is what it is made for.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Why do you not want to use clonezilla? This is what it is made for.

    I am at beginner level and I like to learn some commands. It seemed simpler to use putty and ssh. no reboot needed. But I can try clonezilla

    OMV 6 on ASRock J4125B ITX w/2X8 GB G-Skill|32 GB Sandisk USB|50 TB HDD Space|Be quiet! Pure Power 400W

    Fractal Define R5 Titanium

  • Did you make sure that all partitions are moved to the left in gparted

    You mean to the left of the unallocated space on the ssd. No I didn't make sure. But I take a look before I try clonezilla

    OMV 6 on ASRock J4125B ITX w/2X8 GB G-Skill|32 GB Sandisk USB|50 TB HDD Space|Be quiet! Pure Power 400W

    Fractal Define R5 Titanium

    • Offizieller Beitrag

    I am at beginner level and I like to learn some commands

    Using dd to clone a larger disk to a smaller disk is not something for beginner level.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • When I am sure it can't much harm I just do it. I like to find out things by myself(with research). Doing things with command is so much faster and more fun.

    OMV 6 on ASRock J4125B ITX w/2X8 GB G-Skill|32 GB Sandisk USB|50 TB HDD Space|Be quiet! Pure Power 400W

    Fractal Define R5 Titanium

    • Offizieller Beitrag

    Doing things with command is so much faster and more fun.

    While I can do this and have done this many times, clonezilla is faster and easier. clonezilla won't use dd either. It will use partclone. dd is slow since it copies every bit even if empty.

    omv 7.0.5-1 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.1.4 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.4


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    Einmal editiert, zuletzt von ryecoaaron ()

  • clonezilla terminated without cloning because disk size 32 Gb flash drive too small for 256GB SSD. I shrinked the system partition to 27 GB and moved everything to the left.


    Followed this guide

    Clonezilla Live Doc

    OMV 6 on ASRock J4125B ITX w/2X8 GB G-Skill|32 GB Sandisk USB|50 TB HDD Space|Be quiet! Pure Power 400W

    Fractal Define R5 Titanium

    2 Mal editiert, zuletzt von Jbloc ()

    • Offizieller Beitrag

    clonezilla terminated without cloning because disk size 32 Gb flash drive too small for 256GB SSD

    Have you tested if it starts? Even if the final part of the disk was not copied, it could still boot. The part that has not been copied is assumed to be empty.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!