Reinstall without reformat

Polytropon freebsd at edvax.de
Mon Oct 14 02:07:58 UTC 2013


On Sun, 13 Oct 2013 13:24:30 -0400, Kenta Suzumoto wrote:
> Hi all. Is it possible to install FreeBSD without formatting the disk?

Yes. The installer supports not formatting existing partitions.
The file system characteristica will be kept, possible content
will overwritten. Note that "superfluous content" will also be
kept, except of course you previously remove everything.



> I have one directory of data that I want to keep.

You should still make a backup, because "I want to keep" does
imply exactly that in regards of an OS installation. :-)



> I can boot from the
> installer and rm every directory except that (/bin /boot etc), but how
> could I install the OS from there?

You simply re-enter the installer, assign the (existing, but now
empty) partitions to the desired mountpoint, make sure _not_ to
newfs them, and then commit to the installation as usual.

An alternative would be, after "preparing" the partitions, mount
them as desired and extract the installation datasets from the
installation media manually (via shell commands). Still you might
miss other steps the installer performs.



> I've done ZFS on root installs with
> the shell and mounting the zpool to /mnt, would that work here too?

Probably yes (never tried that myself).



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list