Re: usb marked as read-only

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Rusty Carruth via PLUG-discuss
Date:  
To: plug-discuss
CC: Rusty Carruth
Subject: Re: usb marked as read-only
man fsck says:

       The exit code returned by fsck is the sum of the following
conditions:

              0      No errors
              1      Filesystem errors corrected
              2      System should be rebooted
              4      Filesystem errors left uncorrected
              8      Operational error
              16     Usage or syntax error
              32     Checking canceled by user request
              128    Shared-library error

so zero means no errors without our having to guess (however, it implies
that it did a check, but we're assuming that, so there is a guess there).

You could try the '-r' option to fsck and it will tell you the return
code and some other stuff, supposedly.

Anyway, it would REALLY HELP to know what 'df -h' says.  That would
answer (most of) the questions I still have at this moment.

Oh, how big is the USB stick?  How much room is left?

and what does 'sudo fdisk -l /dev/sdb' say?


On 1/16/23 12:22, Michael via PLUG-discuss wrote:
> creating persistence means I want to use the drive as if it were the main
> drive.
> The verbose flag is a big v? I tried the little v!
>      sudo fsck -V $usb
>     [sudo] password for michael:
>     fsck from util-linux 2.37.2
> Same thing.
>     sudo fsck -Vf /dev/sdb ; echo $?
>     fsck from util-linux 2.37.2
>     0
> I think the zero means there is nothing wrong with the drive.

>
> "You don't say what you booted on - the USB drive? And what device is
> that?"
> What do you mean? I'm trying to run thOS from the pen drive? THe device is
> /dev/sdb?
>
> On Mon, Jan 16, 2023 at 2:00 PM Rusty Carruth via PLUG-discuss <
> > wrote:
>
>> I think it is probably too early to say if you need a new drive, and I
>> don't know what you mean by 'create persistence', but I'll stick my foot
>> in my mouth and ask a few questions.
>>
>> You don't say what you booted on - the USB drive? And what device is that?
>>
>> When you run fsck, I suggest you use the -V option (verbose). Also, what
>> is the return code from fsck? that is:
>>
>> sudo fsck -Vf /dev/sdb ; echo $?
>>
>> what number is the last thing before your next prompt?
>>
>> Did you boot from device /dev/sda? Is anything mounted from /dev/sdb?
>> (e.g. what does 'df -h' say (as one option))
>>
>> Finally, it is safer to do the fdisk commands manually and not use the
>> 'printf' trick. This works for me on all my systems:
>>
>> echo $usb ; sudo fdisk $usb
>>
>> (then I enter the commands to fdisk to create a new partition, or whatever)
>>
>> Oh, the very first thing I should have asked is, what does 'ls -l
>> /dev/sdb' say?
>>
>> On 1/16/23 11:34, Michael via PLUG-discuss wrote:
>>> maybe that is why it ran out of space?
>>>
>>>
>>> On Mon, Jan 16, 2023 at 12:06 PM Michael <> wrote:
>>>
>>>> HI. On my Kali Live USB drive I am trying to create persistence. I did
>> it
>>>> once but then something happened (it ran out of space when I tried to
>>>> install snort) so I started over. But when I tried tpo create
>> persistence I
>>>> got the read-only error. YOu know in my search to get it out of
>> read-only I
>>>> discovered that it might mean my file system is corrupted.. But when I
>> ran
>>>>      $ sudo fsck -f /dev/sdb
>>>> it just responded
>>>>      fsck from util-linux 2.37.2
>>>> then when I attempted to follow the directions (that worked before:
>>>>      sudo fdisk $usb <<< $(printf "n\np\n\n\n\nw")
>>>>      Welcome to fdisk (util-linux 2.37.2).
>>>>      Changes will remain in memory only, until you decide to write them.
>>>>      Be careful before using the write command.
>>>>      fdisk: cannot open /dev/sdb: Read-only file system
>>>> I'm thinking I need a new drive. Anything the gurus know that would be
>>>> beneficial before I spend the money on a new drive??
>>>> --
>>>> :-)~MIKE~(-:

>>>>
>>>
>>> ---------------------------------------------------
>>> PLUG-discuss mailing list:
>>> To subscribe, unsubscribe, or to change your mail settings:
>>> https://lists.phxlinux.org/mailman/listinfo/plug-discuss
>> ---------------------------------------------------
>> PLUG-discuss mailing list:
>> To subscribe, unsubscribe, or to change your mail settings:
>> https://lists.phxlinux.org/mailman/listinfo/plug-discuss
>>
>
>
> ---------------------------------------------------
> PLUG-discuss mailing list:
> To subscribe, unsubscribe, or to change your mail settings:
> https://lists.phxlinux.org/mailman/listinfo/plug-discuss

---------------------------------------------------
PLUG-discuss mailing list:
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss