On 2024-07-24, 04-psyche.tot...@icloud.com <04-psyche.tot...@icloud.com> wrote:
> Hi all,
>
> I have a machine that will be placed in a remote location, and have no
> physical access to. The connection will be made through ssh only.
>
> I'd like to make it as resilient to failure as possible.
>
> A big concern to me is for a disk failure to happen (say a power
> outage), and the machine to be rebooted in single user mode. At that
> point, the machine has no network access, and so I lose contact to it.

If there's an actual disk failure, you're going to have to visit.
I guess you mean "dirty filesystem that requires changes before it
can be marked clean".

> Is there any way to disable going to single user mode when fsck is not
> happy?

No.

You can reduce the chance of fsck failing by:

- reduce writes to mounted filesystems: noatime, use memory buffers
or network for syslog, use mfs for things like /tmp /var/run
- mounting filesystems read-only where possible

Sometimes people modify /etc/rc to use "do_fsck -y" instead of just
"do_fsck" on systems like this. (imho: if the only thing you'd do when
running fsck manually is hit 'F' or keep hitting 'y' then this change
is no worse, though some people don't like it).

> Is it reasonable to change the /etc/fstab to modify the fsck flag from
> 1 and 2 to 0, to bypass the fsck checks ?

If a filesystem is marked "dirty" you can't mount it read-write.

> Alternatively, is there a way to have ssh access in single user mode?

Sure, start network and run sshd. You may be able to do this from
/etc/profile. You just need someone/something to press enter to the
question about running the shell...


On 2024-07-24, Crystal Kolipe <kolip...@exoticsilicon.com> wrote:
> The normal way to handle this and other boot-related problems is with a serial
> connection from another machine that is still accessible via the network.
>
> Depending on your budget, what this system is being used for, and the
> connectivity that is available at the remote location, there are various ways
> of making that happen.

Exactly. (Note that some consumer/small business-ish routers can handle
running as a serial console server over a USB/RS232 interface - e.g.
picocom and USB serial port drivers can often be installed on openwrt -
routeros has /system serial-terminal or /system special-login).


Reply via email to