I have a jail with its own dedicated disk, which I now want to be able to split away and boot independently.
Complicating things, this is a legacy system with a very old version (9-STABLE), so many things that you could normally do (such as installing or updating packages) will not work.
Method #1, preserve the existing filesystem:
1. Install kernel to jail path (world already present)
2. Partition a new image with the typical partitions (freebsd-boot, freebsd-swap, freebsd-zfs) then copy the entire jail partition to the freebsd-zfs partition on the new image
3. Install bootcode to MBR and freebsd-boot partition on new image
4. Rename jail filesystem to zroot, change mount point, ...??
5. ...??
Method #2, create new file system and install, then copy old files:
1. Install kernel to jail path (world already present)
2. Install FreeBSD 9.3-RELEASE from scratch on new image
3. Copy all jail files, including world, over to new image (except /boot/kernel ?)
4. Cross fingers then reboot new image
5. Recompile and install 9-STABLE world and kernel
Am I on the right track here? Which method do you think might be better? Thanks for any suggestions.
Complicating things, this is a legacy system with a very old version (9-STABLE), so many things that you could normally do (such as installing or updating packages) will not work.
Method #1, preserve the existing filesystem:
1. Install kernel to jail path (world already present)
2. Partition a new image with the typical partitions (freebsd-boot, freebsd-swap, freebsd-zfs) then copy the entire jail partition to the freebsd-zfs partition on the new image
3. Install bootcode to MBR and freebsd-boot partition on new image
4. Rename jail filesystem to zroot, change mount point, ...??
5. ...??
Method #2, create new file system and install, then copy old files:
1. Install kernel to jail path (world already present)
2. Install FreeBSD 9.3-RELEASE from scratch on new image
3. Copy all jail files, including world, over to new image (except /boot/kernel ?)
4. Cross fingers then reboot new image
5. Recompile and install 9-STABLE world and kernel
Am I on the right track here? Which method do you think might be better? Thanks for any suggestions.