February 21st, 2003, 09:16

OK, last year I posted a question about how to re-install obsd from scratch
without losing data. One of the suggestions which i decided to follow was to
place the /home partition on it's own HD (wd1). Worked great.

Only problem is I don't know how to re-install openbsd so that it doesnt
re-format my /home partition on wd1 (second HD) while formatting /, /tmp, /var, /usr on
wd0 (first HD).

During the install, i've deleted and recreated all partitions on wd0 and then issued
the "q" command to write and save the changes, afterwhich, I'm told wd1 is an available
disk and I am asked if i want to initialize. Am I correct to assume that if I choose to
initialize wd1 then it will format this disk and I will lose the data on my /home
partition? If so how can I get around this? There must be commands to issue during the
install, but what are those commands and at what point during an install are they issued?


February 21st, 2003, 09:27
short answer: dont do anything to wd1. once you're booted up again, add wd1 to /etc/fstab.

long answer: does wd1 have anything else on it, or do you need to place something else on it like /usr or /var ? if so, then you can choose it during install. change nothing at the fdisk part (preferably you just chose 'use whole disk for openbsd') and at the disklabel part, first look at it. you should see your /home listed there (well, the partition letter should have the info about size/etc, though /home will not be listed there) DO NOT add the label /home to it or you will lose your data! at this point you can add other partitions around /home w/o consequence to /home, so long as their sizes and offsets dont interfere with /home. when the point comes that he installer says "are you sure you want to proceed?" look at the listing. be sure your /home isnt there. be sure you did not previously label that partition as something else. a partition that isnt labelled wont get touched, even if there are other (nonintersecting) partitions that will get formatted on the same disk. as with 'short answer', once you're booted up, add wd1 to /etc/fstab

i used this method to reinstall 3 days ago, and i only had one disk. no data was lost on my /home.

February 21st, 2003, 10:08
:D Awesome man, thanks!

/home is the only partition on the disk (it takes up the whole disk) and I'm going to keep it that way for now, so I'll go with your first answer (short answer). But the "long answer" is great to know.

One question re: /etc/fstab - a sample of my entries:

/dev/wd0a / ffs rw 1 1
/dev/wd0g /usr ffs rw,nodev 1 2
/dev/wd0e /var ffs rw,nodev,nosuid 1 2

I'm assuming my new entry for /home would look like this:

/dev/wd1h /home ffs rw,nosuid 1 2

Thanks again Frisco.

February 21st, 2003, 10:37
/dev/wd1h /home ffs rw,nosuid 1 2

yes, you can also include nodev in there, and might want to also include softdep, for a final:
/dev/wd1h /home ffs rw,nosuid,nodev,softdep 1 2

February 21st, 2003, 11:02
you can also include nodev in there, and might want to also include softdep
What effect does this have?
Searched man -k nodev, softdep & fstab but came up empty...

Can/should these be added to wd0 slices /tmp, /var & /usr too?


February 21st, 2003, 11:26
for more info: mount(8) and

softdep are soft dependencies, a feature which should speed up disk writes.

nodev disallows special devices - character and block devices - from being on that partition. like nosuid, it's a security feature.

by default nodev is only *not* on /
by default softdeps are not enabled.

whether to use softdeps depends on functionality of the partition. on my home machine i have softdeps turned on for all partitions except /

February 21st, 2003, 16:49
Thanks for the tips Frisco - I'm back on track :)