0

I have a Ventoy USB which I copy ISOs to and, when I copy it using my file manager (I use GNOME, so Nautilus) it tells me 100% but it is not, because the image gets corrupted.

Same thing goes for terminal using cp -v and rsync -v: it goes really quick and tells me that the files are copied over but, if I remove the USB stick, the image is yet again corrupted. To "solve" this I've started ejecting the USB stick in the file manager, where I've noticed that it says 'Writing to USB: Do not remove media' (or, something along those lines... can't recall exactly what it says) and it will automatically expel the USB.

Is there some alternative way to get the exact time it has been completely copied over? Either an external application or other flags/commands I can pass in the terminal?

Thanks.

1 Answer 1

1

This problem is occurring because although the command has returned complete, the information has not all been written out to disk (ie its still cached.

After running the cp command or rsync command (or really any time you want to eject a disk from the command line), you should force it to finish writing its contents to disk - you can use the simple command

sync

When this returns to the command line you can safely remove the disk.

1
  • Smooth! Thanks a lot!
    – telometto
    May 2, 2022 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.