prushik--- via plug on 31 Jan 2021 06:16:36 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Missing Space on USB Disk / Reset to fully clean?


I can't twll you exactly whats happening there, but I can probably clarify some things. Your dd command should overwrite the whole disk, that includes the partition table, so anything you do with gdisk or cfdisk or anything prior to this command will have no effect whatsoever as it all gets overwritten.
I suspect that your short write issue is caused by a loose connection in that usb port, when you get the issue, I suggest checking dmesg to see if there are any usb related errors around the time of your short write.
on a side note, are you sure your iso file is a gpt disk inage? iso is supposed to be the extension for iso cdrom images, not regular disk images. I have seen others using the iso extension in this way and I have seen it cause confusion before, ultimately the extension doesn't matter, but it can and does confuse us humans.

On January 31, 2021 7:42:55 AM EST, Casey Bralla via plug <plug@lists.phillylinux.org> wrote:

This has been a recurring problem from me.  I've been able to work around it by mucking around randomly enough times until I fix it (somehow!), but despite my above-average physical attractiveness, I don't understand what is happening.   I hope somebody can help me figure this out.


Sometimes when I try to create a bootable USB disk to try out a new distro, the process fails.

I always use this command to create the bootable USB disk:

dd if=distro.iso of=/dev/sdd bs=4M

But occasionally this disk won't boot so I try to repeat the command.   In about 5% of the times when I repeat the command I'll get an error message like:

dd: error writing '/dev/sdd': No space left on device
3+0 records in
2+0 records out

Using cfdisk to look at the partition table shows that my 4 GByte USB disk now has only 9 MBytes!  Somebody stole my disk space!

I've tried using gdisk with the "z" command to zap the partition table, and I think it has worked sometimes, but it didn't work for me this morning.

I've also tried using dd to write all zeros to the disk, with the same result.


GPT disks are still confusing to me.   I'm assuming the USB disk has allocated space for GPT tables and the like, but I'm bumfuzzled.   Can anybody explain this, or tell me how I can completely reset a USB disk?


TIA!

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug