HOWTO: Share Settings Between Windows And Linux

Windows and Linux Share a Server

What You Need:

  • A running network, preferably Gigabit.
  • A computer to use as a file server, running Linux with Samba and NFS.
  • A computer to use as a desktop, running Linux and Windows Vista or 7.

Setting Up The Home Network

This isn’t too too hard, but it’s worth getting some caveats out of the way. You can just use your router and slap in some cables, but networking performance will be middling since most home routers only offer 100mbit wired Ethernet. If your router does offer Gigabit Ethernet, make sure it also supports Jumbo Frames. If you’re SOL, you can always purchase a Gigabit Ethernet switch for around $30. In addition, you’ll need make sure you have at least Cat5e cables. Even though Cat5e is rated for a maximum of 350mbit/sec (41MB/sec), actual sustained speeds rarely get that high. If you’re buying new, I suggest going with Cat6 as the price difference is negligible.

Setting Up Linux File Server


The only other thing to note is that older computers, and even some newer ones, run onboard Ethernet controllers off the PCI bus and — worse yet — stick it at 33MHz. Basic gist is that if the computer you’re using doesn’t have PCIe slots, than it has no PCIe bus and will be stuck at PCI speeds. If it has PCIe slots, chances are good that the motherboard manufacturer moved the GigE (along with the SATA) controller over to PCIe.

PCI 32-bit 33MHz = 1.067gbit/sec half-duplex
PCI 32-bit 66MHz = 2.133gbit/sec half-duplex
PCIe v1.0 = 2.0gbit/sec full duplex
PCIe v2.0 = 4.0gbit/sec full duplex

Setting Up The Linux Desktop

If you’re installing Linux and Windows from scratch, install Windows before Linux to avoid MBR problems.

The best thing to do after installing Linux is to set up all user accounts locally before setting up /etc/fstab to mount /home from the file server. If there’s any trouble with the file server, a local copy of /home will still be available for you to diagnose and bring the server connection back up.

Once you bring up /home from the file server, check out for information on changing the naming of the desktop, documents, downloads, music, pictures, and video, folders for Linux.

Setting Up the Windows Desktop

Install Windows as you would normally. Once done, you can use junction points for the Desktop, Documents, Downloads, Music, Pictures, and Video folders. Also of note, you can use junction points for the profiles of any programs you use on both platforms, like Mozilla Firefox and Pidgin.

You will have to be logged in as each user as only these users will have the permission to delete these files. Once deleted, execute mklink /d c:\users\[user]\desktop \\[server-ip]\[user]\desktop. Repeat for the other folders.

If you want to retain your Mozilla settings between Linux and Windows, delete C:\Users\[user]\AppData\Roaming\Mozilla\Firefox\Profiles and create a junction point Profiles to \\[server-ip\[user]\.mozilla\firefox. You will then have to edit the profile.ini file in C:\Users\[user]\AppData\Roaming\Mozilla\Firefox to point to the correct profile.

Pidgin is similar. Delete C:\Users\[user]\AppData\Roaming\.purple and make a junction point .purple that points to \\[server-ip]\[user]\.purple.

At this point you may be tempted to put all of c:\users\[user] as a junction point. This is a bad idea for the same reason you should create user accounts locally on Linux system before mounting /home from another computer: If the server goes down, you won’t be able to use the system.

At this point, you might figure that it’s OK to put c:\users\[user]\appdata\roaming as a junction point, because it’s for roaming profiles, right? True, but Windows actually synchronizes that data in a Domain or Active Directory environment. If the Domain or Active Directory server goes down, the local computer will use the most recent data cached on the local computer. If you point these off permanently to an external server, you won’t be able to use Windows if the server goes down.

You CAN use synchronization to sync each user’s AppData\Roaming folder with a folder on their share. Just don’t make it a junction point.