If I hadn't had a usb key with a light on it I'd never have known that you may be removing the usb before the writing is complete!
I just created a key from an iso and, as always, used dd to accomplish this. When dd 'returned the command line prompt' I thought the imaging was complete and went to pull out the key - but its led was still blinking/busy. It took another 30-45 seconds to complete the image 'burn' !
Apparently dd caches the image, then exits - while some other process actually performs the 'burn'. I wonder if some permutation of the eject command would help if appended to the dd command as in example:
sudo dd if=myisoimage of=/dev/sd? status=progress;sudo eject /dev/sd?
I used dd to create my key - it doesn't work - hint
-
- Posts: 1522
- Joined: 2014/05/21 20:16:00
- Location: Central New York, USA
I used dd to create my key - it doesn't work - hint
Last edited by lightman47 on 2020/11/11 19:09:43, edited 1 time in total.
Re: I used dd to create my key - it doesn't work !
It's not dd that is doing the caching but the operating system itself. Unless you take special steps a write completes when the IO packet has been moved into system space. The actual writing from the buffers to disk takes place as resources are available. To force writes to complete you can use the sync command which synchronises all disks. Old UNIX hands learnt to do "# sync ; sync" just to be certain. If you dismount the USB properly then it will be sync'ed and safe, if you just yank it out you may get "burnt" yourself!
-
- Posts: 1522
- Joined: 2014/05/21 20:16:00
- Location: Central New York, USA
Re: I used dd to create my key - it doesn't work !
Ahhh! I can do that!
Thank you!
Thank you!
Re: I used dd to create my key - it doesn't work - hint
or tell dd to do it: oflag=direct or conv=fdatasync, probably the first I think is better for writing to a USB stick.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
-
- Posts: 1522
- Joined: 2014/05/21 20:16:00
- Location: Central New York, USA
Re: I used dd to create my key - it doesn't work - hint
wow - am thinking of an 'alias' for dd
Thank you both
Thank you both