OpenBSD runs only in RAM from a USB Flash Drive

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

OpenBSD runs only in RAM from a USB Flash Drive

soveran
30 May, 2019

Greetings OpenBSD aficionados,

As a newbie to OpenBSD, I am delighted to have the chance to interact
with the OpenBSD Mailing Lists community.
Since I am about to install OpenBSD 6.5 (amd64) on a USB Flash Drive for
the first time, I was wondering if anyone has a solution to the
following conundrum.

In order to minimize wear on the USB Flash memory, is there a way to
command OpenBSD to always run in RAM, and at shutdown to either save or
not save the session to the USB Flash Drive.

For instance, Precise Puppy Linux 5.7.1 has a package called Puppy Event
Manager. Since Precise Puppy is programmed to run in RAM, you can select
the 'Save Session' tab and enter the span of minutes for everything in
RAM to be saved to the Precise Puppy SaveFile.

Best of all, you can enter 0 minutes to only do a save at shutdown.
Perfect for minimizing wear on a USB Flash Drive.

Please accept my apologies if this issue has already been solved. My
search so far in sites like https://marc.info has come up empty.

I thank you for your support.

Best regards,
Hugh

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD runs only in RAM from a USB Flash Drive

Predrag Punosevac-2
> 30 May, 2019
>
> Greetings OpenBSD aficionados,
>
> As a newbie to OpenBSD, I am delighted to have the chance to interact
> with the OpenBSD Mailing Lists community.
> Since I am about to install OpenBSD 6.5 (amd64) on a USB Flash Drive for
>
> the first time, I was wondering if anyone has a solution to the
> following conundrum.
>
> In order to minimize wear on the USB Flash memory, is there a way to
> command OpenBSD to always run in RAM, and at shutdown to either save or
> not save the session to the USB Flash Drive.
>

Chris Cappuccio created flashrd

https://www.nmedia.net/flashrd/flashrd-faq.html

I am not sure how useful it is these days as tmpfs was disabled in the
Fall of 2016

https://marc.info/?l=openbsd-misc&m=146980890627188&w=2

You also have

https://stable.rcesoftware.com/resflash/


Once upon a time people used Flashboot

https://www.mindrot.org/projects/flashboot/


Honestly even SMART capable SSDs are so cheap these days that the only
reason I can see you running OpenBSD from a USB Flash drive is to use
something like Ubiquiti Networks EdgeRouter LITE. I do use Octeon port
of OpenBSD on multiple firewalls around our lab but it is all generic
kernel

https://www.openbsd.org/octeon.html

and I am not very concern that the USB will fail due to the excessive
read and write.

Cheers,
Predrag


> For instance, Precise Puppy Linux 5.7.1 has a package called Puppy Event
>
> Manager. Since Precise Puppy is programmed to run in RAM, you can select
>
> the 'Save Session' tab and enter the span of minutes for everything in
> RAM to be saved to the Precise Puppy SaveFile.
>
> Best of all, you can enter 0 minutes to only do a save at shutdown.
> Perfect for minimizing wear on a USB Flash Drive.
>
> Please accept my apologies if this issue has already been solved. My
> search so far in sites like https://marc.info has come up empty.
>
> I thank you for your support.
>
> Best regards,
> Hugh
>

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD runs only in RAM from a USB Flash Drive

Jan Stary
In reply to this post by soveran
On May 30 17:40:11, [hidden email] wrote:
> As a newbie to OpenBSD, I am delighted to have the chance to interact with
> the OpenBSD Mailing Lists community.
> Since I am about to install OpenBSD 6.5 (amd64) on a USB Flash Drive for the
> first time, I was wondering if anyone has a solution to the following
> conundrum.

Why? If this is your first OpenBSD installation,
keep it simple: install on a spare computer.

Do you need to have a portable installation
that you can carry around?

> In order to minimize wear on the USB Flash memory, is there a way to command
> OpenBSD to always run in RAM, and at shutdown to either save or not save the
> session to the USB Flash Drive.

Don't. A USB flash is a disk, just like any other disk.
Install on it like you would on any other disk.

> For instance, Precise Puppy Linux 5.7.1 has a package called Puppy Event
> Manager. Since Precise Puppy is programmed to run in RAM, you can select the
> 'Save Session' tab and enter the span of minutes for everything in RAM to be
> saved to the Precise Puppy SaveFile.
> Best of all, you can enter 0 minutes to only do a save at shutdown. Perfect
> for minimizing wear on a USB Flash Drive.

What 'wear'? What heavy IO are you going to be doing
on your usb flash installation? If you plan to do heavy io,
using USB flash is a mistake in the first place.

        Jan

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD runs only in RAM from a USB Flash Drive

Patrick Harper
In reply to this post by soveran
FFS isn't a journaling filesystem so any 'wear', even on primitive flash storage, won't be enough to worry about.

--
  Patrick Harper
  [hidden email]

On Fri, 31 May 2019, at 03:41, [hidden email] wrote:

> 30 May, 2019
>
> Greetings OpenBSD aficionados,
>
> As a newbie to OpenBSD, I am delighted to have the chance to interact
> with the OpenBSD Mailing Lists community.
> Since I am about to install OpenBSD 6.5 (amd64) on a USB Flash Drive for
> the first time, I was wondering if anyone has a solution to the
> following conundrum.
>
> In order to minimize wear on the USB Flash memory, is there a way to
> command OpenBSD to always run in RAM, and at shutdown to either save or
> not save the session to the USB Flash Drive.
>
> For instance, Precise Puppy Linux 5.7.1 has a package called Puppy Event
> Manager. Since Precise Puppy is programmed to run in RAM, you can select
> the 'Save Session' tab and enter the span of minutes for everything in
> RAM to be saved to the Precise Puppy SaveFile.
>
> Best of all, you can enter 0 minutes to only do a save at shutdown.
> Perfect for minimizing wear on a USB Flash Drive.
>
> Please accept my apologies if this issue has already been solved. My
> search so far in sites like https://marc.info has come up empty.
>
> I thank you for your support.
>
> Best regards,
> Hugh
>
>

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD runs only in RAM from a USB Flash Drive

KAWAMATA Yoshihiro
In reply to this post by soveran
Hi,

From: [hidden email]
Subject: OpenBSD runs only in RAM from a USB Flash Drive
Date: Thu, 30 May 2019 17:40:11 -0700
Message-ID: <[hidden email]>

> In order to minimize wear on the USB Flash memory, is there a way to
> command OpenBSD to always run in RAM, and at shutdown to either save
> or not save the session to the USB Flash Drive.

Try FuguIta - http://fuguita.org/
This is the live system based on OpenBSD.

It has several boot mode.

FuguIta mounts USB flash memory with read only.
Or it places the entire file tree on TMPFS memory file system.

Also, you can save your session and can retrieve at next boot time.

It may be similar to Puppy's concept.


Regards,

Yoshihiro KAWAMATA

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD runs only in RAM from a USB Flash Drive

Kevin Chadwick-4
In reply to this post by Patrick Harper

>FFS isn't a journaling filesystem so any 'wear', even on primitive
>flash storage, won't be enough to worry about.

I disagree, depending on a few variables. If you can't get a better device then be prepared to replace the storage or count writes and create new files, keeping the old. KARL and randomness development depends on writing and shouldn't be disabled.

There is a lot of misinformation about flash out there from fairly respectable people too. Maybe because phones are also in the close our eyes and hope brigade.