Been dual booting W7 and Ubuntu for some time using the RC version, but upon purchasing an Asus EB1012, which is now proudly bolted out of sight to the back of my 24″ Hanns.G screen, I found I had a proper licensed copy of W7 Home Premium to look after, alongside side my 9.10 Xubuntu install. With a linux samba server also on the Lan I needed everything to run smoothly, and after fiddling about for a few weeks, I believe I am finally there.
1. Dual boot W7 with Linux. It makes so much sense, as what you can do in Linux is what you can’t do in W7, and vice versa (although the latter has now almost dimished to zero :))
Setting Up for Samba Server File Access
2. The following to get your samba server working with W7 to stop it BSODing:
edit your /etc/samba/smb.conf on the server and ensure that:
- Your workgroup name is listed
- Your netbios name is listed, and is the same as your workgroup (OK, this means you can only have one samba server, but it helps
- Ensure that your security entry is set to user
So in the [global] section of smb.conf you should have these entries (assumes workgroup of MYHOME)
workgroup = MYHOME
netbios name = MYHOME
security = user
3. Follow all the steps in this howto by stormbringer on ubuntuforums to setup your samba server and shares.
4. Follow all the steps for W7 in this howto by dmizer on ubuntuforums to setup W7 for samba access
5. Add a registry key to W7 for LmCompatibilityLevel=2 – see here
6. Make sure your W7 workgroup matches the one in your smb.conf file
7. Have a look at your Antivirus program. Crashes have bee experienced when using free versions of Avast, Avira and AVG. I have AVG 9 Free installed and have disabled the Resident Shield and Link Scanner (the latter of these is apparently the root cause). If this doesn’t fix things, uninstall your AV all together.
8. Add your linux file server to your lmhosts.sam file in Windows 7. You will need to open notepad as administrator to do this. Simply add the ip, followed by a space or tab, followed by the netbios name you chose:
Save and reboot to get it to take effect.
Sharing Files on the Dual Boot
9. Create an NTFS shared partition separate from Ubuntu or Windows. If you don’t have the space, keep your files on the windows partition somewhere. ntfs file access is facile under ubuntu and you can automount through fstab with a simple line like this:
UUID=05AAD3F54R0B9BDA /media/DATA ntfs-3g defaults 0 0
And of course you would use a similar line for accessing the windows partition.
At the moment, you won’t easily be able to access your Ubuntu partition from windows, well, not with read/write access, but to get at least read access, you would need to do some work prior to installation. I’m not going to recommend this route, as I believe it leads to instability. So you will need to be strong, and always copy or move files to your shared partition when in ubuntu. If you really must have read access, look here
1. Try to use Ext2ifs or Ext2fsd to access your ext4 partition. It doesn’t work, (bar the workaround above) and can cause your W7 to crash.
2. Don’t use EXT3 as your file system for a shared partition. Although it “works”, its just asking for trouble, because you will need to run one of the two programs in 1. above, which can increase instability.
3. Use Samba as your file server when on the ubuntu side of the dual boot. Setup NFS on the server for linux file access. Much better.
As you can probably see, I have set out to keep things as native as possible; give W7 what it expects to find and it will work well, give Ubuntu what it expects to find and the same applies….
Observation, after a recent Windows update, or due to something unrelated to all the above, my Server disappeared from the Network section, so have found the need to create a persistent mapped network drive. Wonder if it will ever come back….? [EDIT] it did, following a cold reboot the next day.