How to erase read-only usb memory stick?
How do I erase read-only usb memory stick?
I have an install Debian on it, but it is read-only, I can't erase it. I tried to follow http://www.linuxquestions.org/questi...d-only-772711/ , but to no avail. gparted doesn't do it. Thanks, Hearthtstone. |
Quote:
Posting the command you are trying to use, and the resulting output would be most beneficial. To erase a disk completely, and unequivocally you should be able to write zeros/random with dd. Search LQ for dd and you will find a couple of good threads that give examples on just about every possible use of dd. You may not be able to do this as a user, you may need to be root. |
Member response
Hi,
Look at pendrivelinux: Restoring your USB Key procedure to restore the USB flash using MS Windows or Gnu/Linux. Simple! |
Did you boot to the usb?
|
I give up.
Hearthstone. |
Member response
Hi,
Quote:
|
Hearthstone
Perhaps you are having the same problem as me. The instructions on the Pendrivelinux site look sensible, and I think that the program "Disk Utility" will achieve the same thing, so you might want to try that. I just get an error message "One or more partitions are busy on /dev/sdd", so maybe it's something to do with whether or not the USB drive should be mounted? If you know how to do that you could try mounting and unmounting it first. If that works please post how you did it. |
1 Attachment(s)
Please see the bellow (and the attachment)--is this what I wanted?
I want to use the stick to have a bootable, installable .iso on it AND extra space for storing files. Would that be possible? Thanks, Hearthstone. After I followed the instructions for Linux - http://www.pendrivelinux.com/restori...key-partition/ I got: modelearth:~# fdisk -l Disk /dev/sda: 60.0 GB, 60011642880 bytes 255 heads, 63 sectors/track, 7296 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00028b7f Device Boot Start End Blocks Id System /dev/sda1 * 1 7047 56601600 83 Linux /dev/sda2 7047 7296 2000897 5 Extended /dev/sda5 7047 7296 2000896 82 Linux swap / Solaris Disk /dev/sdb: 4004 MB, 4004511744 bytes 220 heads, 3 sectors/track, 11850 cylinders Units = cylinders of 660 * 512 = 337920 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x0621e424 Device Boot Start End Blocks Id System /dev/sdb1 * 1 606 199648 17 Hidden HPFS/NTFS modelearth:~# fdisk /dev/sdb1 WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). |
I've found a way to reformat the disk despite it being write-protected, which is all I want, but I think that if you did that then made it bootable it would probably become write-protected again. Maybe you need to try different packages for making bootable USB sticks - it may be that there is one doesn't make it write-protected. Alternatively that may just be the way it is with bootable memory sticks.
|
1 Attachment(s)
I used gparted to erase and repartition the stick, then I used:
modelearth:~# dd if=/root/firmware-6.0.1a-i386-netinst.iso of=/dev/sdb1 to get Debian Squeeze install .iso on it. The flag checked for "boot". Please see the attachment. Yet it did not boot. Thanks, Hearthstone. |
This, finally, worked:
I used (g)parted to erase and partition the stick. Then I followed instructions at http://pthree.org/2010/02/21/installing-debian-via-usb/ and got me a stick that I can install a Debian Squeeze with on wireless, using debian-6.0.5-i386-netinst.iso. Thank you all! Hearthstone. |
Thanks for posting the answer Hearthstone.
|
All times are GMT -5. The time now is 05:37 AM. |