I'm assuming it's an external drive. So long as you directly mount the device to the VM you should be able to, yes.
Linux
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
I don't think so, but you should be able to create an install usb, same as for linux, boot into that, and access recovery tools. From there, you can definitely run chkdsk, done it before though I don't recall every step.
For those who don't know, shift+F10 to bring up a command prompt when using a windows install image. Can do it when it starts asking you for stuff. I know the chkdsk tools and manage-bde (the bitlocker cli) are avaliable there at least.
I've definitely run chkdsk from a windows guest vm. More than once.
Then that's a valid way to do it, too. Never done it that way myself.
100% possible with a Windows 10 guest in kvm/libvirt.
You can connect the disk to your Linux system, and then pass through the disk's entire block device to the VM. Windows will see the device as an actual disk, and you can perform your repairs that way. I have something like this in my domain definition to pass through my game drive to my Windows 10 VM: https://pastebin.com/GzuvMTWP
I can even use the manufacturer's SSD maintenance tool from my VM.
Edit: lemmy doesn't seem to like XML in code blocks, so used pastebin instead.
yes
Tentatively yes.
I did once manage to mount an external USB NTFS drive to a VirtualBox-hosted copy of Windows 7 and was actually able to defrag it. I assume I also ran a quick disk check before that, but it was a long time ago now.
Before I did it, I backed up everything important off the drive to another location just in case. I'd recommend you do the same.
As to how I did it, I'm afraid I don't remember, but it can't have been that difficult. There may have been some kind of raw mount option in the virtualisation software.
The other potential obstacle is the fact that things have moved on since I did it. Newer Windows / NTFS might be not be as easy to fool into accepting a drive over weird virtualisation pathways. Or the virtualisation software might not allow it as easily or at all.
Hopefully that's not the case.
Yes. But since we're in Linux land, you may be able to replay the journal and un-dirty your disk by mounting with the ntfs3 driver listed here https://docs.kernel.org/filesystems/ntfs3.html, or you could try using 'ntfsfix -d [your device]' from the ntfs-3g package to clear the journal and the dirty bit, although whatever the last operation was on the filesystem may be left in an incomplete state since the journal is not replayed.
I haven't done it in a while, but with virtualbox I have used direct disk access by creating a special vmdk with vboxmanage to give a VM access to real partitions.
I used -- I think -- ntfsfix
(wish I could remember offhand and am not home) and didn't have to use Windows at all. (In had stupidly formatted a drive as NTFS for compatibility and gparted kept telling me I needed Windows.