View Single Post
  #1   (View Single Post)  
Old 13th February 2010
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,131
Default A plan for a remote install and reinstall of FreeBSD

In our guides/howto section there are two interesting guides about installing FreeBSD without using sysinstall.

However, these guides assume you have physical access to the machine. But what if you have not, and the machine is in a datacenter 200 kms away?

My suggestion is have a small, say 2 Gigabyte, FreeBSD on the disk. This mini-FreeBSD installation is only used for a sysinstall-less install of the 'real' FreeBSD in the other slice(s).


The partitioning plan for this remote machine:
Code:
ad0s1 = 2 Gigabyte mini-FreeBSD only to be used for installing 
        or reinstalling, the "real FBSD" on the other slices
ad0s2 = Real FreeBSD "/", swap, "/usr" 
ad0s3 = Real FreeBSD "/tmp", "/var",  "/var/tmp" , "/var/log" i 
ad0s4 = Real FreeBSD "/usr/local", "/home", "/var", "/var/mail"
Why a multiple slice install?

There is 8 labels restriction per slice (at least for the disklabel or bsdlabel utility).
The glabel man page doesn't mention any limit in number of glabel'led partitions.
During the growing pains of the FreebSD 5.x series, I became am more focussed on OpenBSD, so I have never used glabel yet.

An overview of this 'bsdlabel' 8 partition/file system limit

Code:
1) 	a = "/"		(reserved for "/" on the booting slice") 
2) 	b = swap		(reserved for swap)
3) 	c = complete slice	(cannot be used)
4) 	d =			
5) 	e =
6) 	f =
7) 	g =
8) 	h =
On the first slice you only have 4 not pre-defined labels and with
separate file systems for the following you have used them all.
Code:
1	"/usr"
2	"/var"
3	"/home"
4	"/tmp"
So for a real system, with separate files ystems as 'watertight compartments' one has to use multiple slices for a single FreeBSD install.
A reason for example is that you don't want an attacker to fill your "/var/log" logs with junk and thus leaving no more space for "/var/mail".

Code:
 1	"/"
 2	swap
 3	"/usr"
 4	"/usr/local"
 5	"/usr/ports"
 6	"/tmp"
 7	"/var"
 8	"/var/tmp"
 9	"/var/log"
10	"/var/mail"
11	"/home"
After you are done with the install, you use fdisk to change the active MBR partition
from ad0s1 (the mini-FBSD), to ad0s2, which has the "/" filesystem of your new fresh install and
reboot.

If next year yeat another new file system for FreeBSD emerges, let us call it YANFS, you can use the
the 'real' FBSD in slice 2,3 and 4 to first update your mini 'fixit" FBSD in slice 1 so it has all the
YANFS tools.

AFter changing the active partition from slice 2 to slice 1, you reboot and are in an "fixit" environment where you can (I am willing to bet on it) follow the Ultra-Modern FreeBSD Install with YANFS (vermaden way)

Does this sound like a good plan? I don't mean the bet, but the idea of using a mini-FBSD to create the equivalent of a Fixit or Rescue CD environment.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote