Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Background: I'm running Windows 7 as a host and Debian as a guest OS. I often create backups of the hard drive, but run into the issue that my files are stored in 2 locations, Windows NTFS volume and in the Virtualbox file system(.vdi). I often you use the internet to make such backups, and having such a large .vdi is troublesome. In addition I often have to resize the debian.vdi to allow for more files. I have used a shared folder, but the speed isn't always fast enough and permissions do not hold.

Question: I would like to store all Debian files on the Host OS so I can easily view them between both OS's and simplify the backup process.

From my understanding I can use the following command to mount my shared directories from HOST OS in Debian mount -t vboxsf host_os host_os.

Can I store the Debian folders bin etc media proc selinux tmp boot home lib mnt root srv usr dev lost+found opt sbin sys var on the Windows 7 NTFS file system?

It seems I might be able to do something like mount -t vboxsf home /home. Similary I could do the same for /var and /tmp, but I don't understand the internals to know if I can do it for all the root directories.

EDIT: NTFS doesn't have proper unix file permissions, so it might require a Samba running in a VM. Still not entirely sure though.

share|improve this question

1 Answer 1

To view Debian's files in host OS you could go like this:

  1. Create a physical particion on your hard drive.
  2. Make a virtual disk out of it and attach it to the virtual machine.
  3. Install (or move) Debian on it.
  4. Use ext2fsd or a similar driver to access files on that partition from your Windows host.

But while this could supposedly (almost) directly implement what you asked, I think this solution is suboptimal:

  • Somewhat cumbersome to implement.
  • Your backups with regard to guest OS files would be essentially readonly beacuse I'm not sure any extN filesystem driver for Windows is 100% bullet-proof when it will come to restoring. At least this have to be tested.

So I would probably take another route:

  • When you back up the host OS, exclude the guest's virtual disk file.
  • Back up the guest separately, using the guest's own means.

As to the last bit your question — no, Samba has nothing to do with your situation: it implements "Windows file and printer sharing" on the host it runs on, that is, it exports the host's own resources. It is also possible to mount network shares exported by some other Windows host but this a) requires a network; b) I doubt anyone thought of making Debian be able to mount its essential "static" filesystems off Windows shares; it's definitely doable for NFS, but via SMB — I really doubt.

share|improve this answer
    
I was referring to the idea of installing Samba in the VM so that I could store all my Windows files basically in the VM. There is a network option in Virtualbox so I believe it could be possible with if nothing at least some port forwarding. –  Liam William Apr 10 '13 at 22:08
    
I not seriously considering the Samba option because I have feeling the speed will be terrible. Possible another solution would involving using ext2 fs-driver.org It might be more stable then ext3 considering how long ext2 has been around. –  Liam William Apr 10 '13 at 22:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.