r/linuxquestions • u/Competitive_Bear_111 • 3d ago
dd: error writing '/dev/sda': No space left on device
I am finding problem with flashing my usb which is 128gb
sudo dd if=Downloads/linuxmint-22.3-xfce-64bit.iso of=/dev/sda bs=4M
dd: error writing '/dev/sda': No space left on device
2+0 records in
1+0 records out
4194304 bytes (4.2 MB, 4.0 MiB) copied, 0.00332243 s, 1.3 GB/s
I have tried
sudo dd if=/dev/zero of=/dev/sda bs=2 count=4000707510272
dd: error writing '/dev/sda': No space left on device
2097153+0 records in
2097152+0 records out
4194304 bytes (4.2 MB, 4.0 MiB) copied, 1.66505 s, 2.5 MB/s what could be the problem ?
4
Upvotes
16
u/birdspider 3d ago edited 3d ago
you're sure about that?
EDIT: might want to check with
lsblk -o NAME,MODEL,MOUNTPOINT12
u/PlanetVisitor 3d ago
Provide the output of
lsblkfirst to confirm that sda is what you expect it to be, preferablylsblk -o +MODEL.If it is not present, re-insert or power cycle the drive.
When a USB drive is unmounted in the GUI, it won't re-appear until it's disconnected and connected again. Don't use the GUI to mount or unmount it, just use the terminal.
Always lsblk before dd. Drive letters are not guaranteed to be consistent.
1
u/Competitive_Bear_111 3d ago
i previously worked with this usb and it worked fine fine suddenly it showing me this
lsblk -o NAME,SIZE,MODEL,TRAN,FSTYPE,MOUNTPOINTS
NAME SIZE MODEL TRAN FSTYPE MOUNTPOINTS
loop0 111.8M squashfs /var/lib/snapd/snap/obsidian/73
loop1 63.8M squashfs /var/lib/snapd/snap/core20/2866
loop2 105.2M squashfs /var/lib/snapd/snap/core/17292
loop3 66.8M squashfs /var/lib/snapd/snap/core24/1643
loop4 110.6M squashfs /var/lib/snapd/snap/obsidian/67
loop5 49.3M squashfs /var/lib/snapd/snap/snapd/26865
loop6 128K squashfs /var/lib/snapd/snap/wireless-tools/7
sda 115.4G FLASH DRIVE usb iso9660
├─sda1 756M iso9660
└─sda2 3.6M vfat
zram0 8G swap [SWAP]
nvme0n1 465.8G WD_BLACK SN770 500GB nvme
├─nvme0n1p1 600M nvme vfat /boot/efi
├─nvme0n1p2 2G nvme ext4 /boot
└─nvme0n1p3 463.2G nvme btrfs /home
8
u/wowsomuchempty 3d ago
Cheap scam USB sticks are fake - the storage is far less.
3
u/9NEPxHbG 3d ago
Either
/dev/sdaonly has 4 MB or its defective.4
u/Netblock 3d ago
/devis a virtual system limited to 4MiB of memory. I believe you're not writing to your drive but to/devitself, for a regular file namedsda.2
u/suicidaleggroll 3d ago
Are you sure the drive is functional?
2
u/iluvatar 3d ago
You have a faulty flash drive. Throw it away and get another one.
1
u/GreatSouledLED 3d ago
Is it still mounted?
1
u/marozsas 3d ago
There is a chance your device is lesser than you think . I have seen 4G flash drive that are actually a bit less, like 3.8G.
Or it is completely fake.
Use F3 (Fight Flash Fraud) to test if a USB drive or SD card has fake capacity on Linux.
-1
u/CardOk755 3d ago
The problem is that you have a 4mb USB.