Casey Bralla via plug on 31 Oct 2023 07:10:08 -0700


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

[PLUG] Cached USB Disk Info Weirdness / Fix a USB Disk


I have recently tried to "repair" a hosed USB Thumb drive, and had lots of trouble. I hope somebody here can help me learn and understand how to deal with what is happening here.

Background:

Using "dd" to create a bootable thumb drive, something goes wrong and then the data structure on the thumb disk is damaged and won't report the correct size.  (It usually shows a few megabytes on a 100+ megabyte thumb drive).  fdisk reports incorrect info about the thumb disk.

Fix Techniques:

Any number of techniques can be used to reset the original data structure.  Some examples: "dd if=/dev/zero...", gdisk "zap disk" command, etc, etc.

Results:

No effect.  The disk structure is still damaged.  None of the documented fix techniques seem to have worked.  Inexplicable!

Resolution:

Reboot computer, and now the thumb drive shows that the fix techniques previously tried have actually worked!  The thumb drive is fixed.

Issue Analysis:

Linux is looking at some type of cached info about the thumb drive and this cached info is cleared during a reboot.  Linux is not looking at the actual hardware of the USB thumb drive.

Questions:

  1. How to clear this cached info and force a full re-reading of the USB disk structure without rebooting?
  2. Why does the cache even get involved?  Doesn't utilities such as fdisk simply bang the hardware?


Any insight into this would be greatly appreciated!

TIA!

-- 
LEGAL NOTICE:  This eMail contains private, personal, and/or privileged
information and is only for the intended recipient(s).  In fact, you
really should consider yourself honored to even be cc'd on this
tremendously important communication.  The author spent literally
seconds composing this magnificent opus of rational thought and
deductive logic.  Unfortunately, it has probably been based on
inaccurate data, which really stinks because this eMail would have been
truly awesome!  If you have received this eMail in error, we
respectfully DEMAND that you immediately delete it and inform the sender
that you have received it in error.  Then, just to be safe, you should
reformat your hard drive, shave your head, renounce all material
possessions (which are really controlling your life anyway), and join an
end-of-times cult somewhere.  Once there, you must reconsider all the
terrible choices you've made in your life, and promise never to confuse
"sex" with "gender" again.  Of course, this assumes you have already
come to terms with your inherent whiteness, AND that you have learned
the lyrics to The Internationale. "Arise, wretched of the earth!  Arise,
convicts of hunger..."
(https://en.wikipedia.org/wiki/The_Internationale)
We sincerely hope you are able to get your medication stabilized and no
longer have that recurring dream where you're alone in a large crowd,
standing naked in a vat of chocolate Yoo-hoo.  BTW, Yoo-hoo really is an
underrated beverage.  It’s chocolatey, yet suprisingly refreshing. Pick
up a 6-pack today, and tell your friends!
___________________________________________________________________________
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