Re: Can one Mount a usb Drive read-only?

2018-07-19 Thread Brad Rogers
On Fri, 20 Jul 2018 00:20:02 -0400
songbird  wrote:

Hello songbird,

>  i always turn off the automatic reboot.  i don't want

If this machine had that option, so would I.  Meaning; once powered
down it requires user interaction to restart, it doesn't automatically
reboot after power is restored.  BIOS doesn't allow for it.

-- 
 Regards  _
 / )   "The blindingly obvious is
/ _)radnever immediately apparent"
It's the age of destruction, in a world of corruption
Neuromancer - Billy Idol


pgpSagJXAT5eK.pgp
Description: OpenPGP digital signature


Re: Can one Mount a usb Drive read-only?

2018-07-19 Thread songbird
Brad Rogers wrote:
...
> During stormy weather, in the exposed rural area I live in, power can go
> off several times an hour.  Although it's rarely longer than a few
> seconds at a time, it's enough to forcibly shut down computers, and
> would be rather annoying if said computer were to be shut down *again*
> whilst still trying to recover the journal after the previous outage.

  i always turn off the automatic reboot.  i don't want
a system playing yoyo during power fluctuations.  when i
shut it down i want it off.  i also turn off any wake-on-[x]
things.


  songbird



Re: Can one Mount a usb Drive read-only?

2018-07-19 Thread songbird
Cindy-Sue Causey wrote:
...
> Whatever it was that happened, I now tell my BIOS to NO, DO *NOT* keep
> trying to come back up if a power failure completely shuts it down at
> some point. That's from having seen the lights and thus power flicker
> on and off some 4, 5, 6, 7 times within a 2 or 3 minute timespan. My
> memory is yelling that I've possibly even heard the computer grunting
> and groaning while trying to keep up with that outside interference.

  yep, no need to make things even worse.  :)


  songbird



Re: Power Failure - was Re: Can one Mount a usb Drive read-only?

2018-07-19 Thread Kenneth Parker
On Thu, Jul 19, 2018 at 12:47 PM Brad Rogers  wrote:

> On Thu, 19 Jul 2018 18:14:19 +0200
> deloptes  wrote:
>
> >why not use something more decent like ext3 or ext4? we are in 2018 ;-)
>
> (your smiley noted)
> Ken gave no indication of time-frame, other than in the past.  Could've
> been last week, could've been twenty years ago.
>

 Thank you, Brad.  In fact, this was back in 2006, on Ubuntu 6.06 (the
Release that was "Spammed on CD's", almost as bad as AOL used to do).  Back
then, I used ReiserFS for everything except /boot.  And I have been a
"Happy UPS User". ever since that mishap.

Kenneth Parker


Re: Power Failure - was Re: Can one Mount a usb Drive read-only?

2018-07-19 Thread Brad Rogers
On Thu, 19 Jul 2018 18:14:19 +0200
deloptes  wrote:

Hello deloptes,

>why not use something more decent like ext3 or ext4? we are in 2018 ;-)

(your smiley noted)
Ken gave no indication of time-frame, other than in the past.  Could've
been last week, could've been twenty years ago.

-- 
 Regards  _
 / )   "The blindingly obvious is
/ _)radnever immediately apparent"
It's becoming an obsession
Teenage Depression - Eddie & The Hot Rods


pgpofeNIu3yE4.pgp
Description: OpenPGP digital signature


Re: Power Failure - was Re: Can one Mount a usb Drive read-only?

2018-07-19 Thread deloptes
Kenneth Parker wrote:

> My worst, was kind of "mild", though scary:  I had to rebuild /boot (on
> ext2), because the last action was placing a copy of the Linux Kernel on
> /boot.

why not use something more decent like ext3 or ext4? we are in 2018 ;-)

regards




Re: Power Failure - was Re: Can one Mount a usb Drive read-only?

2018-07-19 Thread Kenneth Parker
On Thu, Jul 19, 2018, 8:09 AM Brad Rogers  wrote:

> On Thu, 19 Jul 2018 07:56:34 -0400
> Kenneth Parker  wrote:
>
> Hello Kenneth,
>
> >My worst, was kind of "mild", though scary:  I had to rebuild /boot (on
> >ext2), because the last action was placing a copy of the Linux Kernel on
> >/boot.
>
> It was the fear of such an issue (an inability to boot) that finally
> galvanised me into action and buy a UPS.
>
> A decision that I have never regretted.


My /boot debacle was the trigger for my first UPS purchase.

Kenneth Parker

Kenneth Parker

>


Re: Power Failure - was Re: Can one Mount a usb Drive read-only?

2018-07-19 Thread Brad Rogers
On Thu, 19 Jul 2018 07:56:34 -0400
Kenneth Parker  wrote:

Hello Kenneth,

>My worst, was kind of "mild", though scary:  I had to rebuild /boot (on
>ext2), because the last action was placing a copy of the Linux Kernel on
>/boot.

It was the fear of such an issue (an inability to boot) that finally
galvanised me into action and buy a UPS.

A decision that I have never regretted.

-- 
 Regards  _
 / )   "The blindingly obvious is
/ _)radnever immediately apparent"
It's becoming an obsession
Teenage Depression - Eddie & The Hot Rods


pgpCKcvlxVJC7.pgp
Description: OpenPGP digital signature


Re: Power Failure - was Re: Can one Mount a usb Drive read-only?

2018-07-19 Thread Kenneth Parker
On Thu, Jul 19, 2018, 2:20 AM Brad Rogers  wrote:



>
> Worst I had happen as a result of power failure was that disk the
> journal couldn't recover everything required, such that sector errors
> were reported on every boot.  A reformat got around that.  Tiresome, but
> not fatal.
>

My worst, was kind of "mild", though scary:  I had to rebuild /boot (on
ext2), because the last action was placing a copy of the Linux Kernel on
/boot.

(Scary, because it wouldn't, even *start* to Boot).

Thank Goodness, for "Live Rescue Systems"!

Kenneth Parker

>
>


Power Failure - was Re: Can one Mount a usb Drive read-only?

2018-07-19 Thread Brad Rogers
On Wed, 18 Jul 2018 15:34:37 -0400
Cindy-Sue Causey  wrote:

Hello Cindy-Sue,

(I've removed references, so this should no longer thread with the USB
drive thread)

>reinstall... or something.  I don't remember hardware getting fried,
>just [code]. Maybe it was even "that other" operating system or

Worst I had happen as a result of power failure was that disk the 
journal couldn't recover everything required, such that sector errors
were reported on every boot.  A reformat got around that.  Tiresome, but
not fatal.

I have had hardware get fried (a printer and an ethernet card), but that
was due to a lightning strike during a storm, not the power outages.

-- 
 Regards  _
 / )   "The blindingly obvious is
/ _)radnever immediately apparent"
Stained glass windows keep the cold outside
Religion - Public Image Ltd


pgpPVkd6m7Jd6.pgp
Description: OpenPGP digital signature


Re: Can one Mount a usb Drive read-only?

2018-07-18 Thread Cindy-Sue Causey
On 7/18/18, Brad Rogers  wrote:
> On Wed, 18 Jul 2018 09:47:31 -0400
> songbird  wrote:
>
>>  we get enough power flickers that it's probably saved
>>me a lot of issues over the years since.  well worth the
>>$80 i spent.
>
> Agreed, *well* worth the spend.
>
> During stormy weather, in the exposed rural area I live in, power can go
> off several times an hour.  Although it's rarely longer than a few
> seconds at a time, it's enough to forcibly shut down computers, and
> would be rather annoying if said computer were to be shut down *again*
> whilst still trying to recover the journal after the previous outage.


I'm glad I waited a few seconds instead of responding immediately to
songbird's input. This is a purchase on my own to-do that I
occasionally even remember is needed..

What you said there about power going on and off a few times within
minutes.. That killed a forgotten something once a LONG time ago.

I think it was that it [borked] the code so badly that I had to
reinstall... or something.  I don't remember hardware getting fried,
just [code]. Maybe it was even "that other" operating system or
something, i.e. not Linux. ? :)

Whatever it was that happened, I now tell my BIOS to NO, DO *NOT* keep
trying to come back up if a power failure completely shuts it down at
some point. That's from having seen the lights and thus power flicker
on and off some 4, 5, 6, 7 times within a 2 or 3 minute timespan. My
memory is yelling that I've possibly even heard the computer grunting
and groaning while trying to keep up with that outside interference.

Cindy :)
-- 
Cindy-Sue Causey
Talking Rock, Pickens County, Georgia, USA

* runs with duct tape *



Re: Can one Mount a usb Drive read-only?

2018-07-18 Thread Brad Rogers
On Wed, 18 Jul 2018 09:47:31 -0400
songbird  wrote:

Hello songbird,

>  we get enough power flickers that it's probably saved
>me a lot of issues over the years since.  well worth the
>$80 i spent.

Agreed, *well* worth the spend.

During stormy weather, in the exposed rural area I live in, power can go
off several times an hour.  Although it's rarely longer than a few
seconds at a time, it's enough to forcibly shut down computers, and
would be rather annoying if said computer were to be shut down *again*
whilst still trying to recover the journal after the previous outage.

-- 
 Regards  _
 / )   "The blindingly obvious is
/ _)radnever immediately apparent"
We are the League, we are the anti band
We're The League - Anti-Nowhere League


pgp7r29lfS1XK.pgp
Description: OpenPGP digital signature


Re: Can one Mount a usb Drive read-only?

2018-07-18 Thread songbird
Martin McCormick wrote:
...
>   We normally have a stable power situation, here, but
> recently we had 4 small glitches in one day plus several more
> before and after that day and anything mounted rw usually needs
> the fsck procedure afterward to be sure it is still any good.
>
>   Nothing like power interruptions to make a fellow truly
> paranoid.

  i've never regretted buying a small UPS to ride out
power glitches and it gives me enough time to shut down
the system safely.

  we get enough power flickers that it's probably saved
me a lot of issues over the years since.  well worth the
$80 i spent.


  songbird



Re: Can one Mount a usb Drive read-only?

2018-07-18 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, Jul 17, 2018 at 04:46:59PM -0500, Martin McCormick wrote:
>  writes:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> > 
> > Yes, you can. Try

[...]

> Thank you.  I see the error of my ways, now.  I had tried just
> about everything except -oro and that worked perfectly.

Glad it helped...

>   Funny thing, it was /dev/sdc1 in this case but that was
> pure coincidence.

Magic powers... crystall ball... ;-P

>   We normally have a stable power situation, here, but
> recently we had 4 small glitches in one day plus several more
> before and after that day and anything mounted rw usually needs
> the fsck procedure afterward to be sure it is still any good.
> 
>   Nothing like power interruptions to make a fellow truly
> paranoid.

Heh. You're in good company [1] (if you allow me to tweak the
context a bit -- but don't take it too seriously).

Cheers

[1] https://hardwaresecurity.training/trainings/chipwhisperer-fall-2017/
- -- t
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAltO4xoACgkQBcgs9XrR2kaKugCfZbnE/dFjpeX7j1SfXHwKSw1t
nHUAnAtro1SY/ceczd7BlzjypOpkau20
=1bMf
-END PGP SIGNATURE-



Re: Can one Mount a usb Drive read-only?

2018-07-17 Thread Martin McCormick
 writes:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Yes, you can. Try
> 
>   sudo mount -oro /dev/ /mnt
> 
> (for a more concrete example, assuming your USB drive comes up as
> /dev/sdc and has one partition, say /dev/sdc1):
> 
>   sudo mount -oro /dev/sdc1 /mnt
> 
> Now if you are using a desktop environment, it will most probably
> mount things for you... but read/write.
> 
> You can remount it read-only like so
> 
>   sudo mount -oro,remount /dev/sdc1 /mnt
> 
> Perhaps your desktop environment has some knobs to do that. Here,
> I'll have to defer to more DE knowledgeable folks here.
> 
> Cheers

Thank you.  I see the error of my ways, now.  I had tried just
about everything except -oro and that worked perfectly.

Funny thing, it was /dev/sdc1 in this case but that was
pure coincidence.

We normally have a stable power situation, here, but
recently we had 4 small glitches in one day plus several more
before and after that day and anything mounted rw usually needs
the fsck procedure afterward to be sure it is still any good.

Nothing like power interruptions to make a fellow truly
paranoid.

Martin McCormick



Re: Can one Mount a usb Drive read-only?

2018-07-17 Thread john doe

On 7/17/2018 9:44 PM, Martin McCormick wrote:

The reason to do this is to protect data on thumb drives full of
archives.

When searching for information, most of the discussion
was from people who had root file systems which had been
corrupted so the mount process mounted them read-only.

In this case, all is well and the drives being mounted
contain archives which one doesn't want to lose so mounting them
as read-only would be a good way to protect them.



I would use the '-r' or '-o ro' option to the mount command.

https://linux.die.net/man/8/mount

--
John Doe



Re: Can one Mount a usb Drive read-only?

2018-07-17 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, Jul 17, 2018 at 02:44:02PM -0500, Martin McCormick wrote:
> The reason to do this is to protect data on thumb drives full of
> archives.
> 
>   When searching for information, most of the discussion
> was from people who had root file systems which had been
> corrupted so the mount process mounted them read-only.
> 
>   In this case, all is well and the drives being mounted
> contain archives which one doesn't want to lose so mounting them
> as read-only would be a good way to protect them.  

Yes, you can. Try

  sudo mount -oro /dev/ /mnt

(for a more concrete example, assuming your USB drive comes up as
/dev/sdc and has one partition, say /dev/sdc1):

  sudo mount -oro /dev/sdc1 /mnt

Now if you are using a desktop environment, it will most probably
mount things for you... but read/write.

You can remount it read-only like so

  sudo mount -oro,remount /dev/sdc1 /mnt

Perhaps your desktop environment has some knobs to do that. Here,
I'll have to defer to more DE knowledgeable folks here.

Cheers
- -- t
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAltOSSQACgkQBcgs9XrR2kab+gCZAelUxR3R2+Lgj7C3WJCAoZjm
PJwAmwQh+2gEpFqqIGQhzovP25zQApi9
=funo
-END PGP SIGNATURE-



Can one Mount a usb Drive read-only?

2018-07-17 Thread Martin McCormick
The reason to do this is to protect data on thumb drives full of
archives.

When searching for information, most of the discussion
was from people who had root file systems which had been
corrupted so the mount process mounted them read-only.

In this case, all is well and the drives being mounted
contain archives which one doesn't want to lose so mounting them
as read-only would be a good way to protect them.  

Thank you.

Martin McCormick