Converting dual boot (Windows + FreeBSD) to FreeBSD only system.

I have a dual boot system on which I occasionally use Windows and am thinking of converting it to FreeBSD ZFS system but would need to be able to use my existing Windows system from time to time.

Can I achieve something like this and if so does anyone know of any guide which would show me how to do this?
 
I would prefer USB boot for FreeBSD and keep the Windows partitioning the same. Then make a follow-up partition of the remaining space and add it to a pool.
Configure the USB bootstick to import it and replace its /usr with a ZFS directory. Maybe /var too if the databases are accessed often.
Only don't leave it inserted during the Windows login screen. I have seen Windows 10 accidentally killing the bootloader data.
 
I have a dual boot system on which I occasionally use Windows and am thinking of converting it to FreeBSD ZFS system but would need to be able to use my existing Windows system from time to time.

I think a ZFS-based set up is better suited when the entire disk(s) is given to FreeBSD. I have experimented with multi-boot previously using UFS. I even managed to share the 'freebsd-swap' partition between FreeBSD and Linux distros. For boot manager, 'rEFInd' used to work fine, as it detects and boots FreeBSD, Linux and Windows.
 
If you do not need your Windows running on bare metal, 'bhyve' could be a perfect option. The system can be run on FreeBSD with ZFS. A Windows virtual machine can be run in 'bhyve' on a separate pool or data set. That way, you can make full use of ZFS features such as snapshots, etc. 'bhyve' also allows PCI pass-through where you can pass through a physical NVME drive with your Windows installaion as the disk for the virtual machine.
 
If you do not need your Windows running on bare metal, 'bhyve' could be a perfect option. The system can be run on FreeBSD with ZFS. A Windows virtual machine can be run in 'bhyve' on a separate pool or data set. That way, you can make full use of ZFS features such as snapshots, etc. 'bhyve' also allows PCI pass-through where you can pass through a physical NVME drive with your Windows installaion as the disk for the virtual machine.
This what I was hoping to do but have no idea how to import an existing Windows system and the process seems error prone.

Some guide would probably help.
 
If you are willing to reinstall FreeBSD, you can create a ZFS partition instead of UFS. That worked for me. Anyhow boot environments don’t work with a single ZFS partition, so that would require a more complex setup.
 
This what I was hoping to do but have no idea how to import an existing Windows system and the process seems error prone.

I use sysutils/vm-bhyve to manage my bhyve virtual machines and it works like a charm. It's wiki has some examples, including PCI pass-through.

In your case, try passing the NVME drive with Windows installation through to the VM, without specifying a separate disk. I think that should make the virtual machine try to boot from the NVME drive instead. Please note that Windows may complain about hardware changes, etc. It may be worth cloning the Windows NVME drive before experimenting with it.
 
I'm not sure what you really want to achieve but it's possible to boot the FreeBSD OS and then run a bhyve vm using the Windows disk (previous post solution).
What I didn't get is if you want to convert Windows partition to ZFS and I think that's not possible.
Instead you can create a new zfs partition for Windows and copy the full disk (dd) into the new zfs partition.
You'll need disk space for this as at that moment there will be 2 copies of Windows and you can still dual boot.
Test the bhyve vm if everything is alright, all you do in this copy stays only in that copy, I mean if you boot back into Windows the newly created files or installed apps aren't in that partition.
You can get rid of the original Windows partition and expand the ZFS when you feel confident your "new" windows is working as expected.
I've never done this last zfs expanding part but, seems the ZFS expansion may not be possible depending on the partition layout.
But remember that after deleting that partition your original copy will be gone, there's no return from that point and all you'll have is a copy of it in zfs and no more dual boot.

Be very careful messing around with partitions there's always the risk of loosing data.
Good luck.
 
I'm not sure what you really want to achieve but it's possible to boot the FreeBSD OS and then run a bhyve vm using the Windows disk (previous post solution).
What I didn't get is if you want to convert Windows partition to ZFS and I think that's not possible.
Instead you can create a new zfs partition for Windows and copy the full disk (dd) into the new zfs partition.
You'll need disk space for this as at that moment there will be 2 copies of Windows and you can still dual boot.
Test the bhyve vm if everything is alright, all you do in this copy stays only in that copy, I mean if you boot back into Windows the newly created files or installed apps aren't in that partition.
You can get rid of the original Windows partition and expand the ZFS when you feel confident your "new" windows is working as expected.
I've never done this last zfs expanding part but, seems the ZFS expansion may not be possible depending on the partition layout.
But remember that after deleting that partition your original copy will be gone, there's no return from that point and all you'll have is a copy of it in zfs and no more dual boot.

Be very careful messing around with partitions there's always the risk of loosing data.
Good luck.
Maybe I phrased my requirement wrongly.

I want to preserve a working Windows installation, but can't figure out how to access/run it from the new ZFS partition.

Once I figure out if/how this can be done, I will use a new disk for the new environment so will be able to use the old environment in the event of failure.
 
you don't access from a zfs, zfs is a filesystem not the system itself, you access from a running freebsd os.
do you just want to mount the ntfs to access the files/documents or do you want to boot windows directly in a VM?
The point of my thread is to have my current Windows system accessible directly from FreeBSD rather than having to reboot into Windows.
I don't know if it possible to migrate an existing Windows installation to a VM.
 
Back
Top