1

Topic: stick readonly (from write-protect) review/check ends with error

Hi.
A SanDisk stick with Ventoy (exfat) partition and (fat16) VTOYEFI partition - I do not know exact, whether from diskpart bcdboot or what - says "At use of the operations an error occured".

Sadnessly the Details file is not easy to save and to view into it.
Even a plugged in stick - which is offered to see, but not to save into, why ever - is not to use for it.

The ways to save with terminal commands are just too much, please.

I really was in hope, after long time works now to this problem with diskpart already without success, this GParted would help this problem, just to remove this write protect.
Wouh, NO.

2 (edited by visionhelp 2023-12-02 17:20:13)

Re: stick readonly (from write-protect) review/check ends with error

OK. Not so ´much´ respond.

A try to describe the create this error:
Installed Ventoy to the stick, with Win10-iso to it.
Bootet Win10 to repair a Win10-installation on a hd.
MBR was missing first, then after some new boots the Bootloader missing the message was.
(I still did not have the Win10 on stick working.)
With repairing this - with diskpart -, I think the trouble began, when I used (the command; near many before) ´bcdboot´ and being asked to use for all drives, did not think about NOT to use this, for all drives.
The Win10 installation now was/is fixed, but cince there the stick is being messaged (in red colour), stick is marked as read-only.

I did try much, diskpart, Linux commands, at last GParted from CD.   
Here I want to post some links for possible solutions with Linux, I could find, but for me just hard to follow, because of the commands are many, and the examples are often kept short.
And it is not described, what single parameters exactly do.

Here it sounds good, but the file mentioned there, do not know where to find:
https://ubuntuforums.org/archive/index. … 30703.html

But I can not understand this command "DD /dev/zero with bs=1M" worked". "zero means the drive, the stick. I am confused this ? 

(Oh, despite been logged in "You do not have permission to post", accidentily copied, else the text would have been gone.)

3 (edited by visionhelp 2023-12-02 17:39:45)

Re: stick readonly (from write-protect) review/check ends with error

Here a link where at first the flag readonly is tried to change with "hdparm -r0 /dev/sdb", where sdb is to change to the stick´s currently label.
(More is following there, but still reading and testing.) https://bbs.archlinux.org/viewtopic.php?id=217557

error message, BLKROSET failed: Permission denied

4 (edited by visionhelp 2023-12-06 18:48:31)

Re: stick readonly (from write-protect) review/check ends with error

visionhelp wrote:

Here a link where at first the flag readonly is tried to change with "hdparm -r0 /dev/sdb", where sdb is to change to the stick´s currently label.
(More is following there, but still reading and testing.) https://bbs.archlinux.org/viewtopic.php?id=217557

error message, BLKROSET failed: Permission denied

tried sudo hdparm -r0 /dev/sdb (note and SORRY: in the following code-window the drive is sdd) 
message: setting readonly to 0 (off)
                 readonly       =  0 (off)
test: hdparm -r /dev/sdb does confirm it, OK. Well. So far ..., let me see.

A repeating this says: readonly again ...


My last post to here now, sorry, german:

Gerät      Boot   Anfang     Ende Sektoren Größe Kn Typ
/dev/sdd1  *        2048 60022783 60020736 28,6G  7 HPFS/NTFS/exFAT
/dev/sdd2       60022784 60088319    65536   32M ef EFI (FAT-12/16/32)
knoppix@Microknoppix:/media/sdb2$ sudo dosfsck -a -v /dev/sdd
fsck.fat 3.0.28 (2015-05-16)
open: Das Dateisystem ist nur lesbar
knoppix@Microknoppix:/media/sdb2$ sudo dosfsck -a -v /dev/sdd1
fsck.fat 3.0.28 (2015-05-16)
Logical sector size is zero.
knoppix@Microknoppix:/media/sdb2$ sudo dosfsck -a -v /dev/sdd2
fsck.fat 3.0.28 (2015-05-16)
Checking we can access the last sector of the filesystem
Boot sector contents:
System ID "mkfs.fat"
Media byte 0xf8 (hard disk)
       512 bytes per logical sector
       512 bytes per cluster
         1 reserved sector
First FAT starts at byte 512 (sector 1)
         2 FATs, 16 bit entries
    130048 bytes per FAT (= 254 sectors)
Root directory starts at byte 260608 (sector 509)
       512 root directory entries
Data area starts at byte 276992 (sector 541)
     64995 data clusters (33277440 bytes)
63 sectors/track, 255 heads
         0 hidden sectors
     65536 sectors total
Reclaiming unconnected clusters.
/dev/sdd2: 1015 files, 55570/64995 clusters
knoppix@Microknoppix:/media/sdb2$ sudo dosfsck -a -v /dev/sdd
fsck.fat 3.0.28 (2015-05-16)
open: Das Dateisystem ist nur lesbar

Note: translation for "Das Dateisystem ist nur lesbar" = The file-system is only readable.

5 (edited by visionhelp 2023-12-05 18:38:01)

Re: stick readonly (from write-protect) review/check ends with error

Could there be a chance to solve this boot-trouble this stick, or only also the ´read-only´ restriction, with GParted, please ?
Thank You.

6

Re: stick readonly (from write-protect) review/check ends with error

No, GParted can't make a USB stick read-write.  It is only a partitioning tool.

Why did you make device sdb read-write using sudo hdparm -r0 /dev/sdb and then use dosfsck on different sdd* devices?

7 (edited by visionhelp 2023-12-06 20:44:40)

Re: stick readonly (from write-protect) review/check ends with error

mfleetwo wrote:

No, GParted can't make a USB stick read-write.  It is only a partitioning tool.

Sorry, I understand GParted equal to Diskpart.
Diskpart using the bcdboot command - but with the ´/all´ parameter; which I think was the error, which leads to that troubles now) - command did repair (the last) Win10 boot error, but from then the stick does no more boot, and every tries to access lead to ´read-only´ error messages.


mfleetwo wrote:

Why did you make device sdb read-write using sudo hdparm -r0 /dev/sdb and then use dosfsck on different sdd* devices?

sdd1 is one partition of the stick, sdd is the whole stick with dosfsck, to show the data of stick.

Sorry, now I see, in the text I did write it wrong. In the ´code´-window it is correct, not sdb, I am very sorry this confusion. Thanks the note. I did add a note there.

(Can ´only´ come from tries the stick to an other USB-port.)