A look at Linux with the latest Microsoft system

Living with Vista


Will your strategies of coexistence work for the newest version of Windows? We examined Windows Vista with an emphasis on issues of Linux compatibility.

By Thomas Leichtenstern

www.sxc.hu

Windows XP has been the standard Microsoft desktop operating system for six years now. Users have grown accustomed to XP, and they have learned to cope with the problems - especially in a Linux context.

Vista [1], which was announced way back in 2001, is now set to replace XP, so you can expect a new round of Linux compatibility issues for any Windows system you plan to upgrade.

Software and hardware vendors have expressed a preference for engineering their products to support Vista. If you want to - or are forced to - work with Windows, you may have no alternative but to opt for Vista (Figure 1). This article investigates the consequences of running Vista parallel to Linux.

Figure 1: Microsoft's latest operating system, Vista, will be replacing the venerable Windows XP system in the near future.
Fast Searching on Windows

The locate tool, which is very common on Linux, is also available for Windows [3], with a practical GUI thrown in for free (Figure 2). locate indexes your files at regular intervals and stores the results in a database. As of this writing, locate is the fastest way of finding files by name on Windows.

Figure 2: Locate for Windows will index large volumes of data in next to no time and return search results in a matter of seconds.

Multiboot

Many users run a version of Windows as a second operating system in a multi-boot configuration. The easiest way to set up a dual-boot machine has always been to install Windows first, before you install Linux. Although Linux overwrites the Windows bootloader, it detects the existing Windows system (assuming you install Grub or Lilo in the MBR) and automatically integrates Windows as a boot option.

This approach hasn't changed with Vista, however, it may take some time for Linux installers to accommodate Vista. In our lab, the Suse 10.0 setup detected the Windows system and added it to the boot menu, but Vista still would not launch.

The Grub settings needed some manual attention. Working as root, load /boot/grub/menu.lst in your editor and add the following entry:

title Windows Vista
root (hd0,0)
savedefault
makeactive
chainloader +1

If you discover a previous entry that looks similar to this, you can simply modify the existing entry. The root line indicates where Windows is located on your disk.

In contrast to Microsoft's enumeration method - where hard disks start at 0 and partitions at 1 - Grub always starts counting at 0. Thus, the entry for the first partition on the master disk is root (0,0).

If Vista is located on partition 3, as it was in our lab, the corresponding entry is root (hd0,2).

Retrofitting Vista

If you install Vista on a machine that already has a Linux installation, the setup routine will overwrite the Master Boot Record (MBR) without prompting you to confirm, as it has done in the past.

The easiest way to go on using the MBR is to save it prior to the installation, like this:

dd if=/dev/hda of=/root/mbr.txt bs=512 count=1

If you use Ubuntu 6.06, you might see a Segmentation Fault error message at this point, but dd will still write the dump to the file. Because your Linux distribution will be inaccessible after the install, you will need to boot a Live Linux, such as GParted, and then reinstate the MBR as shown here:

dd if=/root/mbr.txt of=/dev/hda bs=512 count=1

The preceding command restores the MBR to its original state. You need to modify the Grub config file, /boot/grub/menu.lst, as described earlier, to boot Windows.

As a workaround, you can use the Windows bootloader to boot Linux. On Windows NT/2000/XP, you only needed to modify the boot.ini file [2]. This config file has now been replaced by a binary program, which is configurable using the bcdedit command line editor. Typing bcdedit /help launches the comprehensive help function for the tool.

To boot Linux from the new Microsoft bootloader, you must:

You will now be able to boot your distribution via the Linux entry in your Windows boot menu.

Filesystems

Vista now exclusively uses the NTFS 3.1 filesystem, which is also supported by Windows XP. In contrast to Windows XP, you can't install Vista on a FAT partition. To install Vista, you will need a partition of at least 10 GB, and the operating system itself will occupy about 9 GB of this space.

Microsoft's strategy of not confusing users with technical details occasionally has some particularly bizarre consequences. The partition manager, for instance, does not tell you anything about the filesystems on the partitions or give you the ability to use anything but the default NTFS filesystem.

You need to pay special attention to which partition you choose for Vista to avoid overwriting your Linux partition, particularly if you are setting up Vista parallel to an existing Linux system.

Fortunately, changing the filesystem with a tool like PartitionMagic had no undesirable side effects. This is very important if you intend to set up a FAT partition to exchange data between Linux and Windows.

Linux read access to the Micrsoft NTFS filesystem under Vista is no problem, and several Linux distributions support various options for write access. See Linux Magazine, issue #74 / January 2007 for a discussion of NTFS options in Linux.

Microsoft's update to WinFS (Windows Future Storage) probably will not affect Linux access to files stored under Vista. WinFS is not a filesystem in the true sense of the word; instead, it is a database-like indexing layer on top of the filesystem. WinFS's main task is to cross-reference files to improve the search speeds.

Useful Programs

You can easily install the Ext2ifs [4] program to support Windows access to the Linux Ext2 and Ext3 filesystems. In our test, the installation routine complained about having the "wrong" operating system and it also refused to launch at first, but then Vista's Program Compatibility Wizard stepped in to clear up the problem and help ensure a relatively pain-free installation.

The Program Compatibility Wizard provides any Windows-based program you launch manually with the operating system environment it needs in order to run properly. A service monitors program then calls and automatically launches the compatibility wizard if a problem occurs.

Virtual environments such as Cygwin, as well as Windows versions of Gnuutils and the TightVNC remote control tool, ran without any restrictions.

Samba and Network

A central component on a Windows network is the SMB protocol, which is used both by Windows and by Linux's Samba file and print sharing service. SMB publishes shared directories and printers on the network.

Vista has a modified version of the protocol SMB 2.0, which is currently supported by the latest Windows operating systems only; for this reason, Windows Vista automatically downgrades to SMB 1.0 if the requesting operating system is not compatible - or so Microsoft says.

As our test revealed, this generosity does not extend to Linux; at present, it is not possible to open Vista shares using a Linux client.

Although the authentication dialog appears, you can't access the directory even if you enter the correct username and password.

In contrast to this, access from Apple OS X works without any trouble, although the authentication dialog appears for unprotected global shares.

Users with older Windows operating systems have no trouble at all accessing Vista shares. In other words, Vista obviously only blocks access to network shares for Linux systems.

Figure 3: Vista provides a collection of tools for supporting programs designed for older Windows versions.

We immediately contacted the Samba team to inform them of our test results, and the developers seemed to be surprised by this previously unknown issue. The developers, however, were subsequently able to reproduce and confirm our findings.

Volker Lendecke, one of the leading Samba developers, provided us with a short analysis of the issue, which you can read in the box titled "Wrong Number." To sum up this issue: there is no workaround for the problem; access to Vista shares from Linux will not be possible until the Samba team has modified the code.

Wrong Number

The Samba 3.0.23c client code can't connect to Windows Vista RC1 (Build 5600). In other words, many client applications based on libsmbclient, including the Konqueror K10 slave (smb://), will not be able to open Vista shares. But why?

Establishing a connection to a CIFs server is a process with a number of steps. After establishing a TCP connection via port 139 or 445, the client issues the Negotiate Protocol, Session Setup, and Tree Connect requests in succession. The Negotiate Protocol request negotiates the connection parameters, Session Setup logs the user on and passes in a password, and Tree Connect tells the server which share the client wants to connect to.

This basic approach has remained unchanged since the earliest versions of the protocol that date back to the 80s. However, security requirements directed at the protocol have grown drastically since then. Different versions of Windows have responded to demands for more security in various ways. Besides authenticating with cleartext passwords, an approach that is theoretically still viable, a number of new approaches have been added, including LanManager authentication, NTLM v1, and NTLM v2.

With the introduction of Windows 2000 and Active Directory, Microsoft added another authentication mechanism that is completely different from all previous ones: Kerberos 5. In the process of extending Kerberos, Microsoft entered into new territory; some of the Internet RFCs concerning encapsulating Kerberos in other protocols, such as CIFS and LDAP, have seen major development since the introduction of Windows 2000.

Samba 3 has always been based on what Windows really does, as Microsoft rarely keeps to standards. One of the consequences is that changes to Windows have often surprised us in the past. In this special case, Microsoft has applied the underlying RFCs more strictly than previously with respect to Vista compatibility. We need to modify the code to reflect the new requirements before Samba-based clients can access Vista shares. Volker Lendecke

Figure 4: Volker Lendecke, Samba developer.

Conclusions

Vista cooperates surprisingly well with Linux for certain tasks, although other tasks can cause some headaches for unfamiliar users.

The compatibility wizard lets users run software originally designed for older Windows versions, which really turns out to be a godsend in the case of the Ext2/3 driver, Ext2ifs.

Vista's approach to multiple boot scenarios is similar to the approach taken by earlier Windows versions. The ability of your Linux distro to access Vista NTFS partitions will be similar to how it was with previous NTFS versions, but the fact that Vista won't install on a FAT partition could cause some extra planning and configuration for many Linux dual-boot users.

Access to Vista shares by Linux clients will also be a problem for the time being, so if you want to serve files to Linux clients, don't give up your Linux file server.

INFO
[1] Microsoft Vista: http://www.microsoft.com/windows/windowsvista/default.aspx
[2] Modifying the Windows bootloader: http://www.microsoft.com/technet/windowsvista/library/85cd5efe-c349-427c-b035-c2719d4af778.mspx
[3] Locate for Windows: http://www.uku.fi/~jmhuttun/english/softwares.shtml
[4] Ext2ifs: http://www.fs-driver.org