USB/dd issues - can't remove loop0

I’m trying to create a Live PuppyLinux USB stick. Have a load of sticks which keep throwing wobblers when I use dd. Usually says that the operation has been completed in 3 seconds which I know isn’t possible.

Looking in KDE PartitionManager I can see that its reporting a partition labelled “/dev/loop0” Mount point is /run/media/chris/CDROM. Looking in that directory I can see 6 instances labelled CDROM1,2,3 etc. Each instance “allegedly” contains a copy of the Puppy ISO i have been trying to copy to USB.

I have tried removing each of the instances using

sudo rm -rf /run/media/chris/CDROM

Output is rm: cannot remove '/run/media/chris/CDROM': Is a directory

If using dd:

just insert the stick,
do not mount it (though it may not be important if that happens automatically …),
check the device name which it got assigned
(lsblk or lsusb should tell you that)
then run your dd command so that it writes to that device

No loop mount is needed.

Perhaps share the command that you used to write the iso (not it’s contents!) to the USB device?

No matter what is on the USB device - it will be overwritten when using dd

I have used dd a lot. Not recently, but a lot. My go to is
sudo dd if=/path/to/ISO of=/dev/sdc bs=4M

I know that it generally takes more than 3 seconds to write even a small ISO ( like Puppy) to USB

Perhaps a sync is needed after the dd write operation?

You could try using cat or cp or … works just as well.

USB flash installation medium - ArchWiki

I’d make sure the device isn’t mounted - or unmount it if it get’s mounted automatically.
I don’t use KDE and don’t know it’s settings or how to possibly change that if wanted.

@Nachlese
Using the Arch wiki helped. Solved using the following code

sudo dd bs=4M if=/home/chris/Downloads/precise-light-5.7.2-mk2.4.iso of=/dev/sdc conv=fsync oflag=direct status=progress

Will make a note of that for next time!

Rebooted the PC and the loop0 issue had gone as well!!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.