Multiple FreeBSD-installations on one harddisk?
strick at covad.net
Fri Feb 27 11:04:21 PST 2004
On Fri, 27 Feb 2004 17:23:13 +0100, a at jenisch.at wrote:
> In order to run two (different) versions of FreeBSD on one Harddisk
> (4.9 and 5.2) are there any special caveats/pitfalls besides having a
> separate slice for every installation?
1) If you use the default FreeBSD master bootstrap program, boot0,
do not configure it with the "noupdate" option. (See the man
page for the "boot0cfg" command.) The boot1 program needs the
boot0 "update" feature to determine which slice is being booted.
2) FreeBSD 4.9 does not understand UFS2 file systems (the default file
system for FreeBSD 5.2). Therefore, if you create a file system
under 5.2 that you want to access from 4.9, specify the UFS1 file
system format when you run newfs.
3) FreeBSD 4.9 and 5.2 store UFS1 summary data (e.g. amount of free
disk space) in different places in the file system superblock.
If you mount the same file system writable from both OS, you might
like to "fsck -p" the file system after you switch to the other OS.
> Anything special to take care of during installation (esp. when
> installing the second FreeBSD?)
Be very careful not to enable a newfs for any preexisting partition
(on the other OS slice) when working in the sysinstall disk partition
menu. I generally avoid the issue by doing the installation onto another
disk and manually copying the new OS onto the first disk. Caution
dictates making a full set of backups before installing the second OS.
> Is it possible to use the same swap-partition for both instances of BSD?
Probably. It used to be possible to configure a partition outside of
its slice by specifying an out-of-bounds partition offset to the disklabel
program. I don't know if this is still tolerated. I strongly advise
against it. You can probably declare a special "swapdev" in a kernel
config file. Perhaps there is a relevant "syscontrol" or "hint" (which
I don't know about) that you could specify in /boot/whatever.
I strongly advise against this also. Disk space and main memory are
very cheap these days. If you have enough main memory, you don't
need much swap space. Creating a dependency of one OS on another's
installation could create a painful long term maintenance problem.
strick at covad.net
More information about the freebsd-questions