Difference between revisions of "OpenBSD readonly root"

From WTFwiki
Jump to navigation Jump to search
(add some notes to the ro-root page)
m (7 revisions)
 
(5 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
mostly in the end-user or volatile-power routing environments.  Most often, I've done this<br />
 
mostly in the end-user or volatile-power routing environments.  Most often, I've done this<br />
 
on [http://www.soekris.com/ Soekris] [http://www.soekris.com/net4801.htm net4801] devices.<br />
 
on [http://www.soekris.com/ Soekris] [http://www.soekris.com/net4801.htm net4801] devices.<br />
We'll show an example of how to do it on a net4801, which is the same procedure for a net5501,<br/>
 
and we'll be using OpenBSD 4.6 for the example.<br/>
 
 
<br />
 
<br />
 
To perform such a magic trick, you need to do a bit more planning.  It's not as easy to run some<br />
 
To perform such a magic trick, you need to do a bit more planning.  It's not as easy to run some<br />
Line 15: Line 13:
 
space.<br />
 
space.<br />
  
= Practice =
+
= Detailed Examples =
 +
* [[OpenBSD Soekris Read Only Root]]
 +
* [[Sun Netra t1 compact flash root]]
  
== Installation ==
+
= Other Useful Info =
Perform a PXE-boot standard OpenBSD 4.6 i386 install, the following differences apply:<br/>
+
* [[Setting up PXE]] or: "building a netboot server"
* Press ^P at the 5-second BIOS countdown, then "boot f0" to boot from the first ethernet port.
 
* Interrupt the loader after it gives you a prompt (type anything, it stops the counter).
 
* Type the following, in this order:
 
 
 
  stty com0 19200
 
  set tty com0
 
  boot /bsd.rd
 
 
 
You should now be booting a kernel and be tossed into the OpenBSD installer.. look elsewhere<br/>
 
for instructions on how to properly setup PXE booting for OpenBSD, or maybe I'll document it<br/>
 
someday.<br/>
 
<br/>
 
* When installing, you should partition your CF card with 1 giant / partition, and *no swap*
 
* It'll ask you later on if you want to change the console to com0, tell it yes and choose 19200 to match the soekris BIOS settings.<br/>
 
* Once installed, reboot into your installation and do basic post-install configuration, including setting up network interfaces, adding packages, configuring sudo, etc.. the idea is to have a fully installed system that just needs configuration.
 
<br/>
 
Login and 'sudo ksh' if you haven't already: you'll need to perform a number of steps,<br/>
 
which I'll detail below.. another time ;)
 

Latest revision as of 21:48, 4 January 2013

Theory

In a lot of situations, you'll find yourself not wanting to check filesystems, thereby
facilitating hard power-downs with ~no data loss. I've come across this case a few times,
mostly in the end-user or volatile-power routing environments. Most often, I've done this
on Soekris net4801 devices.

To perform such a magic trick, you need to do a bit more planning. It's not as easy to run some
services in a configuration like this, since they need areas to write to. Even worse is when they
need to write data that you actually want to keep. In this case, I like to avoid the RO root
scenario, because it adds some awkward complexity that involves a regular mount-writable/sync/remount-ro
cycle. In general though, most services you can get away with just providing them ramdisk scratch
space.

Detailed Examples

Other Useful Info