What if I really need OpenBSD to be installed on 2 slices (on virtual machine and not for production purposes):
- /
- swap
instead of 6:
- /
- swap
- /tmp
- /var
- /usr
- /home
I suppose that I must create all that folders on root fs but how can I do that during installation?
Please do not duplicate fdisk / installation manuals in your answers.
Assuming you're running a recent release, when you get the disklabel setup simply type:
Folders and such are created automatically for you by the installer.
As your Question says that this is for a testing configuration, I'd say Go for it!
Not dealing with the vagaries of which partitioning scheme is optimal, can really save you time and disk space (e.g. that 5G you partitioned for /etc is wasted space when you've only got 10G or less to play with.)
OpenBSD works just fine with a single slice for working with, and it will automatically create the directories /home, /var, et. al. within the / (root) partition/slice.
During Installation - Create the single root partition
When you select to use the all of 'driveX' during the installation, you can take a look at the partitions currently in use:
At the ">" prompt you can type:
to see existing partitions and their allocations (g for showing the output in Gigabit units)
On a clean drive, it will only show the 'c' partition, or depending on the installer (4.6+) or used drive, there may allocated partitions for you.
You can follow sh-beta's instructions above ('D' or 'd partition' to delete the partitions, and 'a partition' to manually create new partitions.)
Create the 'a' partition for '/' (root), and create a 'b' partition for swap (depending on what you intend to do with your test system 'b' may or may not need to be of any real size.)
Continue installation as normal and the OpenBSD install process will create directories as needed where in other cases it would be using partitions.
When you run the OpenBSD installer, simply delete the other slices at the
disklabel
step, leaving justa
andb
. The installer will still create the other directories; they just won't be as securely protected. (For example, normally OpenBSD sets things likenodev
for/home
; when on the same volume as/
, which houses the/dev
directory, this is no longer possible.)I really wouldn't recommend attempting to create an install without a seperate /home partition. Having a separate home partition has massive advantages when correcting problems , backing up and restoring or reinstalling the entire system.