4 ms·
It's worth noting that these days you can move Windows installs across hardware/VMs and fix issues from a live image. I'm a longtime Linux user and every time
by marcan_42 6y ago
It's worth noting that these days you can move Windows installs across hardware/VMs and fix issues from a live image.
I'm a longtime Linux user and every time I have to do this on Windows I find the documentation poor, but it is possible to do things like load kernel modules (drivers), partition a drive, format a new NTFS filesystem, copy all the files over preserving special filesystem features, reinstall the bootloader, add required additional drivers, ensure the drive assignments are correct, etc. all from a command line prompt which you can pull up from the Windows 10 installer image. The process ends up being very similar to doing the same thing on Linux at a high level, just with different tools.
What Windows needs in this regard is something like the Arch Linux wiki.
Just in case it's useful to someone, here are some pointers:
To add critical (e.g. storage) drivers to a mounted Windows install (or image file within installers): dism
To modprobe a driver within the live environment: drvload
To rsync files over to a new filesystem preserving (almost?) all critical metadata: robocopy (use the latest Windows 10, older versions had trouble with stuff like directory junctions and symlinks; read the manual carefully to figure out what options to use)
To fix drive assignments (i.e. fstab): you actually just pull up regedit and edit the registry directly; you copy the (binary) drive ID info from the live instance, mount the registry hive of the target, and paste it there (this isn't really morally different from running blkid and then editing fstab by hand to paste a UUID). Search terms: MountedDevices and DosDevices.
Fix the bootloader: bootrec is the top level "fix stuff automatically" tool, kind of like grub-install and grub-mkconfig. However, you may have to delete your BCD (grub.conf) first so bootrec can make it fresh, as it often won't fix existing bootloader entries with a problem. bcdboot and bcdedit are the lower level tools.
- hashhar 6y agoI'm not sure I'll ever need this but this is really useful for the times I get stuck in a situation. Thanks for writing this. I bet we couldn't find this information consolidated in a single place anywhere on the internet. This would also be useful as a blog post (if you have one and have the time). Thanks again!
- zvrba 6y agoHah, indeed. I had to build a custom Windows install image, so I had to learn about DISM and other stuff. Everything is documented, but rather badly organized.
- bariumbitmap 6y agoThat's quite interesting, do you mind if I update the article and cite you as a source? (OP here.) One a Linux LiveCD, I've sometimes connected to the internet and installed non-default packages; is something analogous possible with Windows 10 installer image, or is it only the tools that come on the disc?