LVM or logical volume manager is the recommended way of installing domUs onto a partition. I've written another how-to on installing Linux Mint 13 root and /home partitions onto LVs.
Once you have successfully created the Windows domU and installed Windows, you can also access the Windows file system from your Linux Mint dom0.
Warning: Don't mount your Windows domU under Linux in read-write mode while Windows is running - it may cause data loss
It's strongly advised to shut down the guest system BEFORE mounting it under dom0 as shown below !
Install kpartx:
Code: Select all
sudo apt-get install kpartx
Code: Select all
sudo fdisk -l
Device Boot Start End Blocks Id System
/dev/mapper/lm13-win7p1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/mapper/lm13-win7p2 206848 125827071 62810112 7 HPFS/NTFS/exFAT
win7p1 is the boot partition, win7p2 is the actual Windows partition which I'm going to mount. lm13 is the volume group I created when installing my Linux Mint system.
Use kpartx to map the new LVs:
Code: Select all
sudo kpartx -av /dev/mapper/lm13-win7
Create a mount point:
Code: Select all
sudo mkdir /mnt/win7 # or wherever you want to mount your Windows partition
Code: Select all
ls /dev/mapper
control lm13-root lm13-win7p1 vol1-lm13_backup vol2-swap
lm13-home lm13-win7 lm13-win7p2 vol2-data
lm13-win7p2 is what I want.
Let's mount the Windows file system as NTFS, read-only:
Code: Select all
sudo mount -t ntfs -o ro /dev/mapper/lm13-win7p2 /mnt/win7
Code: Select all
ls /mnt/win7
hiberfil.sys ProgramData $Recycle.Bin Windows
NVIDIA Program Files System Volume Information
pagefile.sys Program Files (x86) temp
Note: Never mount the Windows domU file system under dom0 when it is up and running, unless in read-only mode..
Important: When you're done with the Windows partition,you must remove the partitions with kpartx -d:
Code: Select all
sudo kpartx -dv /dev/mapper/lm13-win7
That was easy.