Copying a jail to a standalone system

balanga

Son of Beastie

Reaction score: 109
Messages: 2,718

If I've used a jail to prototype a system, can I then copy that jail to a standalone system?

I'm referring to userland, although I would want to include any configuration in /etc or /boot.
 

thogard

New Member

Reaction score: 4
Messages: 12

The jail image won't have enough stuff to boot as it is missing the boot loader, possible some drivers and maybe the disk partitioning. You can do an install of the same version on the standalone system, then copy over all the other files or look at the bsdinstall scripts in /usr/libexec/bsdinstall/. The auto gets run on a full install and it partitions the disk and installs the proper boot loader and asks more config questions. The bsdinstall jail does much less. If you compare auto and jail, its easy to see what you might need to fix up.

Have you considered building your standalone system as a jail host and run just one jail in it?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,266
Messages: 29,700

If I've used a jail to prototype a system, can I then copy that jail to a standalone system?
Document what you installed, which configuration files you modified and why the change was needed. Then use the documentation to do a clean install on the stand-alone system. Preferably done by somebody else (so your documentation is verified too).
 

roccobaroccoSC

Well-Known Member

Reaction score: 93
Messages: 406

You can run in the jail:
Code:
freebsd-update IDS
This will show you all the files that are different from the standard installation (all modified files).
You can install a fresh OS on the standalone system and then just copy the modified files from the command above.

Also, to make sure the system boots, merge files like /etc/rc.conf, /etc/sysctl.conf and /boot/loader.conf carefully, don't simply overwrite them.
 
Top