1

I like many other have this question and can't believe no one has found a way around this.

I have a usb drive that is a UDF format and can not format it was given to me by my company and said i may do with it what i want after i installed the software on my pc.

I have read all the forums possible and cannot find a answer.

I have tried everything I could find on the net... Only going to paste a few stuff so you guys can have one more go at this.

Device info

> 
[ 4328.431126] usb 1-8: Manufacturer: SMI Corporation
[ 4328.431417] usb 1-8: ep 0x81 - rounding interval to 128 microframes, ep desc says 255 microframes
[ 4328.431427] usb 1-8: ep 0x2 - rounding interval to 128 microframes, ep desc says 255 microframes
[ 4328.432091] usb-storage 1-8:1.0: USB Mass Storage device detected
[ 4328.432520] scsi host7: usb-storage 1-8:1.0
[ 4329.703063] scsi 7:0:0:0: CD-ROM            SMI      USB DISK         1100 PQ: 0 ANSI: 2
[ 4329.704295] sr 7:0:0:0: [sr1] scsi3-mmc drive: 0x/0x caddy
[ 4329.704616] sr 7:0:0:0: Attached scsi CD-ROM sr1
[ 4329.704777] sr 7:0:0:0: Attached scsi generic sg2 type 5
[ 4329.898756] UDF-fs: INFO Mounting volume 'company app', timestamp 2015/04/02 11:22 (1078)
> 
> 
> 
> 
> root@TriGz:/home/trigz# hdparm -r0 /dev/sr1

/dev/sr1:
 setting readonly to 0 (off)
 readonly      =  0 (off)

root@TriGz:/home/trigz# mkdosfs -F 32 -I /dev/sr1
mkfs.fat 3.0.27 (2014-11-12)
mkdosfs: unable to open /dev/sr1: Read-only file system

root@TriGz:/home/trigz# mkfs -t vfat /dev/sr1
mkfs.fat 3.0.27 (2014-11-12)
mkfs.vfat: unable to open /dev/sr1: Read-only file system

root@TriGz:/home/trigz# mkudffs --media-type=hd --blocksize=512 /dev/sr1
Error opening device: Read-only file system

Would be really nice if someone has a way around this issue!

  • please refr here – Ravan Aug 24 '15 at 13:09
0

Think about it for a minute. When the system has a device mounted (UDF-fs: INFO Mounting volume 'company app', timestamp 2015/04/02 11:22 (1078)). the (in this case) UDF filesystem code reads file indexes, brings the structure of the device into memory, and gets ready to mediate requests for the data. Now, if you format the device, the in-memory copy of UDF metadata is trashed on the "disk" but "valid" in memory. Bad scene!

The simple answer is to umount the USB key first.

  • root@TriGz:~# umount /dev/sr1 umount: /dev/sr1: not mounted root@TriGz:~# fdisk -b 512 /dev/sr1 Welcome to fdisk (util-linux 2.25.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. fdisk: cannot open /dev/sr1: Read-only file system I know it should be unmounted... the write protection is strong with this one... Any other ideas ? Thanks – TriGz Aug 25 '15 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.