One should ALWAYS do a sync after a dd. I learned this the hard way...
On 6/22/25 10:34 PM, Jeffrey Walton wrote:
On Sun, Jun 22, 2025 at 10:01 PM Tim via users
<users@lists.fedoraproject.org> wrote:
Is it no-longer possible to use dd to write an install ISO to a
flashdrive, or is there something wrong with the ISO (which passes the
checksum tests)?
If I do this command:
[root@rocky fedora42]# dd if=Fedora-Server-dvd-x86_64-42-1.1.iso of=/dev/sdb
status=progress
2923241984 bytes (2.9 GB) copied, 1204.794829 s, 2.4 MB/s
5714688+0 records in
5714688+0 records out
2925920256 bytes (2.9 GB) copied, 1212.03 s, 2.4 MB/s
Marvel at the blistering write speed!! But ignore that for this
problem. I see this in the system log after it finishes:
Jun 23 11:14:23 rocky kernel: GPT:Primary header thinks Alt. header is not at
the end of the disk.
Jun 23 11:14:23 rocky kernel: GPT:5714027 != 30310399
Jun 23 11:14:23 rocky kernel: GPT:Alternate GPT header not at the end of the
disk.
Jun 23 11:14:23 rocky kernel: GPT:5714027 != 30310399
Jun 23 11:14:23 rocky kernel: GPT: Use GNU Parted to correct GPT errors.
Jun 23 11:14:23 rocky kernel: sdb: sdb1 sdb2
And if I unplug it then replug it:
Jun 23 11:22:59 rocky kernel: usb 1-11: USB disconnect, device number 8
Jun 23 11:23:08 rocky kernel: usb 1-11: new high-speed USB device number 27
using xhci_hcd
Jun 23 11:23:08 rocky kernel: usb 1-11: New USB device found, idVendor=18a5,
idProduct=0304, bcdDevice= 1.12
Jun 23 11:23:08 rocky kernel: usb 1-11: New USB device strings: Mfr=1,
Product=2, SerialNumber=3
Jun 23 11:23:08 rocky kernel: usb 1-11: SerialNumber: 13120286006070
Jun 23 11:23:08 rocky kernel: usb-storage 1-11:1.0: USB Mass Storage device
detected
Jun 23 11:23:08 rocky kernel: scsi host18: usb-storage 1-11:1.0
Jun 23 11:23:08 rocky mtp-probe: checking bus 1, device 27:
"/sys/devices/pci0000:00/0000:00:14.0/usb1/1-11"
Jun 23 11:23:08 rocky mtp-probe: bus: 1, device: 27 was not an MTP device
Jun 23 11:23:09 rocky kernel: scsi 18:0:0:0: Direct-Access Verbatim
8.07 PQ: 0 ANSI: 4
Jun 23 11:23:09 rocky kernel: sd 18:0:0:0: Attached scsi generic sg2 type 0
Jun 23 11:23:09 rocky kernel: sd 18:0:0:0: [sdb] 30310400 512-byte logical
blocks: (15.5 GB/14.4 GiB)
Jun 23 11:23:09 rocky kernel: sd 18:0:0:0: [sdb] Write Protect is off
Jun 23 11:23:09 rocky kernel: sd 18:0:0:0: [sdb] Write cache: disabled, read
cache: enabled, doesn't support DPO or FUA
Jun 23 11:23:09 rocky kernel: GPT:Primary header thinks Alt. header is not at
the end of the disk.
Jun 23 11:23:09 rocky kernel: GPT:5714027 != 30310399
Jun 23 11:23:09 rocky kernel: GPT:Alternate GPT header not at the end of the
disk.
Jun 23 11:23:09 rocky kernel: GPT:5714027 != 30310399
Jun 23 11:23:09 rocky kernel: GPT: Use GNU Parted to correct GPT errors.
Jun 23 11:23:09 rocky kernel: sdb: sdb1 sdb2
Jun 23 11:23:09 rocky kernel: sd 18:0:0:0: [sdb] Attached SCSI removable disk
And it can't be mounted.
I used to encounter this on occasion when I refreshed my desktop to
one with 64GB of RAM. My take was, the cache manager could hold a lot
more in RAM before [asynchronously] flushing the write to disk.
Try adding a `sync` to the command line:
dd if=Fedora-Server-dvd-x86_64-42-1.1.iso of=/dev/sdb \
status=progress && sync /dev/sdb
Otherwise, the media used for /dev/sdb may be going bad. But I usually
only encounter this on SDcards, and not USB drives.
Jeff
--
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam, report it:
https://pagure.io/fedora-infrastructure/new_issue