You are not logged in.

#1 2013-01-06 02:05:37

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Cannot wipe USB stick - filesystem is read only

I was given a USB stick with some sort of non-standard set up which I don't fully understand. Part of the drive was formatted as a separate partition containing 2 files. The rest of the drive I was able to use normally in Linux. Both Linux and Windows saw the USB as 2 devices - one volume for the 2 files and one for the rest.

This is annoying because I don't need those files and would like to recover the space. The more serious problem, though, is that the USB stick cannot be read by the photocopiers at work which means I cannot print directly from them using this USB stick. The photocopiers do not see any device as present at all.

I have tried deleting the read-only partition in both fdisk and gdisk. (I don't care if it screws up the partition table - I can always redo it once it lets me.) I have also tried using fdisk to just make a new partition table and the same with gdisk. In both cases, I cannot write the changes to disk.

I have also tried dd if=/dev/zero of=/dev/sdd, I have tried running fsck.vfat and I have tried various other incantations of dd using different bs sizes. I've also tried just wiping the first 512B as explained in the wiki for recovering a key used for Arch install. (Not the same, I know, but I figured why not?)

Here is a selection of what I've tried initially as a normal user:

$ udevil mount /dev/sdd1
mount: /dev/sdd1 is write-protected, mounting read-only
Mounted /dev/sdd1 at /media/USB
$ ls /media/USB/
FINAL_english.pdf*  FINAL_welsh.pdf*
$ ls -al /media/USB/
total 2540
drwxr-xr-x 2 <me> <me>   16384 Ion   1  1970 ./
drwxr-xr-x 3 root   root      4096 Ion   6 01:22 ../
-rwxr-xr-x 1 <me> <me> 1289400 Med   7  2010 FINAL_english.pdf*
-rwxr-xr-x 1 <me> <me> 1290641 Med   7  2010 FINAL_welsh.pdf*
$ rm /media/USB/FINAL_english.pdf 
rm: cannot remove ‘/media/USB/FINAL_english.pdf’: Read-only file system

I then switched to root (but for some reason I've lost the # indication for root so it is still using $ - this is definitely root, though):

$ fdisk /dev/sdd
Welcome to fdisk (util-linux 2.22.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p

Disk /dev/sdd: 4 MB, 4718592 bytes, 9216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1              64        9215        4576    1  FAT12

Command (m for help): d
Selected partition 1
Partition 1 is deleted

Command (m for help): p

Disk /dev/sdd: 4 MB, 4718592 bytes, 9216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System


Command (m for help): w
fdisk: cannot write disk label: Bad file descriptor

$ gdisk /dev/sdd
GPT fdisk (gdisk) version 0.8.5

NOTE: Write test failed with error number 30. It will be impossible to save
changes to this disk's partition table!

Partition table scan:
  MBR: MBR only
  BSD: not present
  APM: not present
  GPT: not present


***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format.
THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by typing 'q' if
you don't want to convert your MBR partitions to GPT format!
***************************************************************


Warning! Secondary partition table overlaps the last partition by
33 blocks!
You will need to delete this partition or resize it in another utility.

Command (? for help): p
Disk /dev/sdd: 9216 sectors, 4.5 MiB
Logical sector size: 512 bytes
Disk identifier (GUID): 7AC6F68E-EC0D-41D0-AAB1-FB037342751C
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 9182
Partitions will be aligned on 64-sector boundaries
Total free space is 30 sectors (15.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              64            9215   4.5 MiB     0700  Microsoft basic data


Command (? for help): d
Using 1

Command (? for help): p
Disk /dev/sdd: 9216 sectors, 4.5 MiB
Logical sector size: 512 bytes
Disk identifier (GUID): 7AC6F68E-EC0D-41D0-AAB1-FB037342751C
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 9182
Partitions will be aligned on 64-sector boundaries
Total free space is 9149 sectors (4.5 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name

Command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sdd.
Unable to open device '/dev/sdd' for writing! Errno is 30! Aborting write!


Command (? for help): p
Disk /dev/sdd: 9216 sectors, 4.5 MiB
Logical sector size: 512 bytes
Disk identifier (GUID): 7AC6F68E-EC0D-41D0-AAB1-FB037342751C
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 9182
Partitions will be aligned on 64-sector boundaries
Total free space is 9149 sectors (4.5 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name

Command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT) to /dev/sdd.
Unable to open device '/dev/sdd' for writing! Errno is 30! Aborting write!

Command (? for help): q

$ fsck.vfat /dev/sdd1
dosfsck 3.0.13, 30 Jun 2012, FAT32, LFN
/dev/sdd1: 3 files, 5040/8832 clusters
$ fsck.vfat /dev/sdd
dosfsck 3.0.13, 30 Jun 2012, FAT32, LFN
Logical sector size (1872 bytes) is not a multiple of the physical sector size.

$ dd if=/dev/zero of=/dev/sdd 
dd: opening ‘/dev/sdd’: Read-only file system
$ dd bs=4M if=/dev/zero of=/dev/sdd
dd: opening ‘/dev/sdd’: Read-only file system
$ dd count=1 bs=512 if=/dev/zero of=/dev/sdd
dd: opening ‘/dev/sdd’: Read-only file system

Does anybody have any suggestions? I can find similar sounding issues on the wiki and in the forums but the solution is usually something I've tried or think I've tried. I seem to be able to do anything to that partition and it still pops up. Even though I did most of this yesterday, it still mounts the second partition with the custom label I added to distinguish the two volumes easily.

Some info from udevil (again, obtained as root despite the dollar signs):

$ udevil info /dev/sdd
Showing information for /org/freedesktop/UDisks/devices/sdd
  native-path:                 /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host9/target9:0:0/9:0:0:1/block/sdd
  device:                      8:48
  device-file:                 /dev/sdd
    presentation:              /dev/sdd
    by-id:                     /dev/disk/by-id/usb-USB_USB_2.0_Flash_2F9A6A73-0:1
  system internal:             0
  removable:                   1
  has media:                   1
  is read only:                1
  is mounted:                  0
  mount paths:                 
  presentation hide:           0
  presentation nopolicy:       0
  presentation name:           
  presentation icon:           
  automount hint:              
  size:                        4718592
  block size:                  512
  usage:                       
  type:                        
  version:                     
  uuid:                        
  label:                       
  partition table:
    scheme:                    mbr
    count:                     1
  drive:
    vendor:                    USB
    model:                     USB 2.0 Flash
    revision:                  8.09
    serial:                    2F9A6A73
    WWN:                       
    detachable:                1
    ejectable:                 0
    media:                     
      compat:                  
    interface:                 usb
    if speed:                  480000000 bits/s

$ udevil info /dev/sdd1
Showing information for /org/freedesktop/UDisks/devices/sdd1
  native-path:                 /sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1/1-1.1:1.0/host9/target9:0:0/9:0:0:1/block/sdd/sdd1
  device:                      8:49
  device-file:                 /dev/sdd1
    presentation:              /dev/sdd1
    by-id:                     /dev/disk/by-id/usb-USB_USB_2.0_Flash_2F9A6A73-0:1-part1
  system internal:             0
  removable:                   1
  has media:                   1
  is read only:                1
  is mounted:                  0
  mount paths:                 
  presentation hide:           0
  presentation nopolicy:       0
  presentation name:           
  presentation icon:           
  automount hint:              
  size:                        4685824
  block size:                  512
  usage:                       filesystem
  type:                        vfat
  version:                     FAT16
  uuid:                        00CA-A254
  label:                       USB
  partition:
    scheme:                    mbr
    number:                    8584720
    type:                      0x01
    flags:                     
    offset:                    32768
    alignment offset:          0
    size:                      4685824
    label:                     
    uuid:                   

Obviously this shows the problem - the read only flags. But is it possible to change that?

I didn't realise that it was possible to do this on a simple USB stick...

EDIT: I just realised that the above examples of gdisk/fdisk don't actually show me trying to just make a new partition table. Here's another attempt with sudo fdisk /dev/sdd:

Welcome to fdisk (util-linux 2.22.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p

Disk /dev/sdd: 4 MB, 4718592 bytes, 9216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1              64        9215        4576    1  FAT12

Command (m for help): o
Building a new DOS disklabel with disk identifier 0xdf9684cd.

Command (m for help): p

Disk /dev/sdd: 4 MB, 4718592 bytes, 9216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xdf9684cd

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): v
Remaining 9215 unallocated 512-byte sectors

Command (m for help): w
fdisk: cannot write disk label: Bad file descriptor

Last edited by cfr (2013-01-06 02:11:35)


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#2 2013-01-06 02:21:59

mamamia88
Member
Registered: 2012-08-29
Posts: 483

Re: Cannot wipe USB stick - filesystem is read only

Maybe use gparted and create a new partition table wiping the entire disk in the process?    If you don't need the info on there might be worth a try.

Offline

#3 2013-01-06 02:25:06

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,705
Website

Re: Cannot wipe USB stick - filesystem is read only

While not able to contribute to a solution, I can sympathize with the problem.  I had a flash drive with something similar.  From what I was able to determine, it seemed to be "hardcoded" data block of the manufacturer's (mal|soft)ware.

I even once thought about taking the thing apart to see if I could physically remove the element storing that data while keeping the memory chip intact.  But I was not that bored, and just buying a different flash drive was much easier.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Online

#4 2013-01-06 02:34:08

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: Cannot wipe USB stick - filesystem is read only

Thanks for the replies.

@mamamia88,
Is there something special about gparted? I mean I've tried this with both fdisk and gdisk. I could also try with parted. Is gparted special in some way? I don't have it installed as I find the GUI confusing in comparison to the CLI tools.

@Trilby,
I realise that USB sticks are cheap and this isn't even the only one I have. It is just bugging me that I have a perfectly good stick which is screwy in this way. I tend to forget this is the one which doesn't work in the photocopier which is partly why it is so annoying.

It is definitely not the hardware manufacturer's files on the disk. The files are actually study guides for lifelong learning students at an institution I do not work for. My line manager in the lifelong learning department at the institution I do work for gave me the USB stick as he wasn't using it. We were giving out similar sticks but with a normal partition so it was easy to wipe the learning guides. (I transferred those to disk since I might want to reference them - I do work at my own institution, after all - and then freed up the space for other stuff.)

It would be bizarre if the other institution is going so far as to have their learning guides hard-coded onto the sticks, wouldn't it? I mean, I realise that they don't want students to delete them accidentally or whatever but surely that sort of thing would make the sticks much more expensive?


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#5 2013-01-06 02:44:22

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,705
Website

Re: Cannot wipe USB stick - filesystem is read only

cfr wrote:

It would be bizarre if the other institution is going so far as to have their learning guides hard-coded onto the sticks, wouldn't it? I mean, I realise that they don't want students to delete them accidentally or whatever but surely that sort of thing would make the sticks much more expensive?

Yes, very.  If you had mentioned the content previously I missed it - given that it isn't manufacturer content, there should be a way to remove it from just software.  But the dd write is the most aggressive method I'd come up with.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Online

#6 2013-01-06 02:44:53

bassu
Member
Registered: 2011-12-21
Posts: 90

Re: Cannot wipe USB stick - filesystem is read only

You have tried everything I can think of. If the device is not write protected then you might have stumbled upon a hardware issue or block failure.


The greatest threat to knowledge is not ignorance - it is the illusion of knowledge!

Offline

#7 2013-01-06 03:17:38

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Cannot wipe USB stick - filesystem is read only

What fs does the first partition mount as? (df -T)

I've found this. U3 and ceedo might be also the keywords to google for.

Offline

#8 2013-01-06 03:24:14

mamamia88
Member
Registered: 2012-08-29
Posts: 483

Re: Cannot wipe USB stick - filesystem is read only

cfr wrote:

Thanks for the replies.

@mamamia88,
Is there something special about gparted? I mean I've tried this with both fdisk and gdisk. I could also try with parted. Is gparted special in some way? I don't have it installed as I find the GUI confusing in comparison to the CLI tools.

@Trilby,
I realise that USB sticks are cheap and this isn't even the only one I have. It is just bugging me that I have a perfectly good stick which is screwy in this way. I tend to forget this is the one which doesn't work in the photocopier which is partly why it is so annoying.

It is definitely not the hardware manufacturer's files on the disk. The files are actually study guides for lifelong learning students at an institution I do not work for. My line manager in the lifelong learning department at the institution I do work for gave me the USB stick as he wasn't using it. We were giving out similar sticks but with a normal partition so it was easy to wipe the learning guides. (I transferred those to disk since I might want to reference them - I do work at my own institution, after all - and then freed up the space for other stuff.)

It would be bizarre if the other institution is going so far as to have their learning guides hard-coded onto the sticks, wouldn't it? I mean, I realise that they don't want students to delete them accidentally or whatever but surely that sort of thing would make the sticks much more expensive?

nothing special really just a front end for parted.  it is rather easy though.  just select your drive and then under devicei believe is the opttion for creating new partiton table.  worth a try imo.  i mean isnt that the point of pacman? takes a few seconds to try

Offline

#9 2013-01-06 03:35:19

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: Cannot wipe USB stick - filesystem is read only

Trilby wrote:
cfr wrote:

It would be bizarre if the other institution is going so far as to have their learning guides hard-coded onto the sticks, wouldn't it? I mean, I realise that they don't want students to delete them accidentally or whatever but surely that sort of thing would make the sticks much more expensive?

Yes, very.  If you had mentioned the content previously I missed it - given that it isn't manufacturer content, there should be a way to remove it from just software.  But the dd write is the most aggressive method I'd come up with.

Yes, sorry. I didn't realise manufacturers did that so it didn't occur to me when initially posting that the specific content would be relevant. I realised after I read your post that it was relevant after all. I apologise for not realising to make it clear initially.

lucke wrote:

What fs does the first partition mount as? (df -T)

I've found this. U3 and ceedo might be also the keywords to google for.

Wow. I suppose I should be glad the damn thing doesn't autorun a slide show telling me how to find the other institution's library every time I plug it in. (For the record: it doesn't do that even in Windows.)

It really sounds similar - along with the claims about mismatching numbers of blocks and things.

I'm pretty stunned they would go to this much trouble, though. That is, I'd expect that such sticks still cost more than standard sticks. I was just reading my (other - non-lifelong learning) department's handbook today and noted that my department is "unable to provide USB sticks" even to members of its own staff, never mind specially tweaked ones to its students!

Last edited by cfr (2013-01-06 03:46:26)


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#10 2013-01-06 03:49:22

mamamia88
Member
Registered: 2012-08-29
Posts: 483

Re: Cannot wipe USB stick - filesystem is read only

its not one of those with preinstalled crapware that opens a popup to helps computer illiterate people use it when they plug it into a windows machine is it?   i remember back in the day i had one of those and it was annoying as heck but the manufacurer provided a removal tool

Offline

#11 2013-01-06 03:55:08

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: Cannot wipe USB stick - filesystem is read only

For whatever it is worth, I think my efforts have rendered the USB stick entirely unusable. I seem to have managed to destroy the partition I could write files to but not the other one. So I'm left with a read-only 512M USB key with a read-only 4.5M partition containing 2 files which total 58% of that 4.5M. Of course, I can't change the partition table or add a further partition or create a file system because, guess what? Everything is now read-only!

Well, it is from a lifelong learning department and I will say that the experience is proving educational although probably not in quite the way they intended. I wonder if they teach computer science? EDIT: intentionally, I mean.

EDIT: correct size of stick.

Last edited by cfr (2013-01-09 00:51:54)


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#12 2013-01-06 04:00:37

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: Cannot wipe USB stick - filesystem is read only

mamamia88 wrote:

its not one of those with preinstalled crapware that opens a popup to helps computer illiterate people use it when they plug it into a windows machine is it?   i remember back in the day i had one of those and it was annoying as heck but the manufacurer provided a removal tool

I don't know. Windows 7 opens a helpful popup to help you use the stick no matter which of my USB sticks I plug into them. And the others are not in any way strange. Several of them now boot Arch, for example, and I had no problem wiping them, formatting them, dding them etc. Nothing additionally popup like happens with this one. The only oddity is that it appears as two devices, doesn't appear at all in the photocopier, and won't let you touch the 4.5M partition. Apparently it will let you destroy the rest of it beyond repair but presumably as long as the learning guides are still there, everything should be OK.

I'm annoyed with myself for destroying it. I never realised that it was possible to do that. I just figured what I tried might not work. I didn't think I'd make things worse.

Oh, and I have no idea who the manufacturer of the stick is. The branding is institutional but I doubt they are producing their own USB sticks even to safeguard their learning guides.

EDIT: I've opened it up but can't read the inscription. Will have another go later (in daylight). I'm fascinated now.

Last edited by cfr (2013-01-06 04:12:10)


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#13 2013-01-08 02:06:20

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: Cannot wipe USB stick - filesystem is read only

Well I tried to decipher the description with the help of natural light, electric light and a magnifying glass several times. Either I'm not deciphering it correctly or there's nothing to be found googling for this particular stick as I haven't had any luck finding a useful Russian site hosting a useful configuration utility. (Doubt I could get it working anyway but still.)

So somehow I've destroyed the key's usability completely and now have no way to restore it. It has been interesting enough to almost be worth it, mind you...


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#14 2013-01-08 15:07:54

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Cannot wipe USB stick - filesystem is read only

Maybe this page can put you on track.

Offline

#15 2013-01-08 21:42:56

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: Cannot wipe USB stick - filesystem is read only

lucke wrote:

Maybe this page can put you on track.

Thanks. That tool does look useful. Unfortunately it appears to be for Windows and I do not run Windows.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#16 2013-01-08 23:54:59

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: Cannot wipe USB stick - filesystem is read only

Hmm... Apparently the disk is now only 4.5M (as well as being read-only). It should be 512M!

I'm really curious about this. Despite all I've done to it, the original learning guides are still sitting in their protected partition ready for use even though the rest of the USB stick is apparently non-existent as far as the OS is concerned. (For all I know, the rest of the flash memory really *is* non-existent - I have no idea at all.)


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#17 2013-01-09 00:28:01

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: Cannot wipe USB stick - filesystem is read only

That is funny!  Does it now write to those 4.5M?  Maybe you could make the ultimate single song USB stick!  It can't be too long though...

I keep coming back to this thread to see if you have made progress.  I find it very curious that you can so completely destroy the writeable partition, while the ro part seems rather indestructible.

Offline

#18 2013-01-09 00:35:25

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,705
Website

Re: Cannot wipe USB stick - filesystem is read only

After a nuclear appocolypse the cockroaches will be eating twinkies and reading learning guides from flash drives.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Online

#19 2013-01-09 00:46:23

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: Cannot wipe USB stick - filesystem is read only

WonderWoofy wrote:

That is funny!  Does it now write to those 4.5M?  Maybe you could make the ultimate single song USB stick!  It can't be too long though...

I keep coming back to this thread to see if you have made progress.  I find it very curious that you can so completely destroy the writeable partition, while the ro part seems rather indestructible.

Oh, no. I can't write to it. Perish the thought - I might "accidentally" delete one of the learning guides! I just checked and all 80 pages of both versions of the learning guide appear to be intact.

I only hope that it does not come down to a competition for funding based on the durability of our learning guides because if it does, my institution will not stand rice paper's chance in a hurricane.

Trilby wrote:

After a nuclear appocolypse the cockroaches will be eating twinkies and reading learning guides from flash drives.

I hope they are bilingual cockroaches - it would be a shame to waste anything!

Last edited by cfr (2013-01-09 00:47:58)


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#20 2013-01-09 02:13:56

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Cannot wipe USB stick - filesystem is read only

That site has both the application that tells what chipset your USB stick uses and those programs for working with particular chipsets. Probably both would be safest to run under Windows (not wine) and especially the latter - it seemed as if you had access to that OS.

Offline

#21 2013-01-09 02:34:55

jspaces
Member
From: Canada
Registered: 2009-04-16
Posts: 21

Re: Cannot wipe USB stick - filesystem is read only

Try zeroing the actual partition first.

dd if=/dev/zero of=/dev/sdd1

I just had a ssd card give me all the same errors and failures to delete, create and format the ssd card. Once the partition itself was filled with zeros, fdisk and/or gdisk was able to create a new partition which formated without issues and is now usable again. Hopefully it will work for you as well.


Knowledge is a beam of light in which humans can only see the reflection.

Offline

#22 2013-01-09 09:52:30

qinohe
Member
From: A Dutch location..)
Registered: 2012-06-20
Posts: 649

Re: Cannot wipe USB stick - filesystem is read only

All you want should be doable with Arch, but,
have you tried 'Hiren’s BootCD'
I ask because it saved me more than once in the past, in cases like this.

There are numerous progs for disk, like formating & mbr-tools.
There's a lot more on it like Xp-PE, a win-xp pre-installed (live-cd) environment, DOS tools & much more. (which you'll probably never use;)


Just give it a try, you can't break anything anymore,) maybe you will also manage to make your disk usable again with these tools!


-I can give you a ladder, but you need to climb it yourself-

Offline

#23 2013-01-10 02:37:56

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: Cannot wipe USB stick - filesystem is read only

lucke wrote:

That site has both the application that tells what chipset your USB stick uses and those programs for working with particular chipsets. Probably both would be safest to run under Windows (not wine) and especially the latter - it seemed as if you had access to that OS.

I have access to networked Windows machines at work but I cannot install software on them. In fact, they will not allow me to format ordinary, unproblematic USB keys which I own. So I can tell you what it looks like in Windows but I can't use a Windows programme unless it happens to be installed and it will allow me to use it on the USB stick. Neither of those are very likely. My own desktop at work runs Fedora. That I have complete control over.

The only machines I can install software on or really work with the key on are running some form of Linux. (Fedora or Arch at the moment.)

@jspaces,
I appreciate the suggestion but unfortunately I've already tried that. I don't have permission.

@qinohe,
Thanks. I might take a look at that. I left the key in work.

Interestingly, *both* partitions still showed up when the key was inserted into a Windows 7 machine and they could be mounted. Windows even claimed they were healthy. However, there is something very corrupt about the partition map. The IT guy who looked at it said he wouldn't use it as something could just disappear since the map is corrupt. Nothing they tried could correct this or delete the read-only stuff.

I later managed to reformat the larger partition in Fedora and Fedora now sees it as existing again. I made the file system etc. But the partition map remains corrupt so I certainly wouldn't trust it with actual files. I get errors about file descriptors, mismatches etc. etc.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#24 2013-06-21 10:56:37

Konstantin_hu
Banned
Registered: 2012-05-14
Posts: 84
Website

Re: Cannot wipe USB stick - filesystem is read only

Same things happened to me right now... I wanted to format my USB stick for USB-ZIP compatibility to be able to boot on an old PC. I used an utility from the syslinux package, called "mkdiskimage". This create a ZIP drive-like disk geometry on the USB stick, modifying the cylinder, head, and sector numbers. Now the USB stick still doesn't boot, but additionally I am unable to revert it from this state to the original. I tried to fill it with zeros (dd if=/dev/zero of=/dev/sdc) but only the first 14 MB was writeable from the 512 MB. Fdisk also doesn't work, when I delete the partition and want write the changes to the disk, it says it is read only. Now I must use some windows utility to make it work again.

Offline

#25 2013-06-21 20:50:00

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: Cannot wipe USB stick - filesystem is read only

That sounds like a different issue. Especially if it is fixable on Windows, which mine definitely wasn't. Moreover, mine wasn't the result of my using a utility but more a result of how the thing was manufactured/created in the first place.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

Board footer

Powered by FluxBB