Not really sure how dualbooting or vms work at their core. I’m kind of over windows and want to swap, always liked the customizability aspect and have been using Linux more and more for self hosting purposes. Was wondering if I setup linux on my external ssd using a vm if I could change it from vm to a dualboot drive after I’m done setting it up. That way I could setitup and swap to it while keepign my original ssd with my windows install,. and not have to deal with dualbooting and going back and forth while setting up?

Can I make a vm of my current windows machine backup and run that in a linux setup?

  • flatbield@beehaw.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    6 hours ago

    By the way, how one might do this at the high level.

    First, you have to choose virtualization method. Could be any, but if starting with Windows, maybe VirtualBox. When setting up your initial OS you have to figure out how big to make the disk images and what format. If a virtualization format then you’ll have to convert them later when you copy them into a real partition, if in real disk partition to start, one can just copy by imaging partition. In either case, think carefully about the size of the partition your configuring as it is going to have to be smaller or equal to the final partition your going to use for dual booting at the end. There is some question best way to format the VM image so you can actually image it easily to a final partition. May take some thought as you need to think about what needs to be in the final partition and how boot loaders will be setup in the final configuration. Also maybe need to think if the VM should be setup for lagacy/BIOS boot or UEFI boot.

    Linux should not have an issue with booting in multiple configurations. That is either direct/dual boot or in a VM. It generally just works. Windows on the other hand, you may have more issues.

    When fiddling with low level disk and partition layouts and copying. You want to backup everything maybe both at the file system level, and as full disk images so you can easily undo mistakes. Also on Windows secure boot and Bitlocker can present additional issues if your booting with maintenance media. Make sure you have your Bitlocker emergency unlock codes and know how to use them before doing anything other then windows. You may want to disable/remove Bitlocker when fiddling with this stuff too.

    Other then that moving to dual boot from VM should be basically creating a partition into which to place the Linux image, then doing and image copy from your VM image (just the partition, not the whole image), into the new partition perhaps doing the format conversion if your VM image is not using a partition to start with. Then you’d have to setup the boot loader based on some sort of dual booting how to. Too long ago for me to remember the details of that. If the partition is going to be on the drive Windows is filling, you’ll have to figure out how your going to shrink one or more of the existing partitions, and then create space for Linux. There are tools that can do that.

    Caution in doing partition layout changes, low level image copies, and fiddling with boot loader and maybe BIOS configs is all quite technical. You have to be prepared for this to take some time, and to be able to restore your original setup if things go poorly. You will also have to have another means of accessing the web/internet as you’ll need to be able to lookup howtos and hints, maybe also download stuff, and format media for things you’ve forgotten to do ahead of time.

    If you doing this on a workstation, not a laptop. Another safer way to do this is hot mountable drive drives (do not actually have to be hot mountable). Just have windows on one drive, Linux on another. Pop the drive in you want to boot from and go. The other more expensive method, just have two different computers purchased with the OS preinstalled. As you suggest another method that is not that technical is just run Linux under virtualization in Windows, say with VirtualBox.

    Someone who has recently done this should feel free to make any corrections to the above. Thanks.

    Edit: Another caution. Linux cannot always boot from USB media with a size larger then 2T. So if using external USB media, consider using media less then 2T. Also if using USB, use USB3 media plugged into USB3 ports for best speed.