This is an overview of my current Linux/Windows dual-boot setup on my new laptop.
- Introduction
- Hardware
- Step 1: Get a Windows Vista install disc
- Step 2: Backup recovery media
- Step 3: Delete pre-existing partitions
- Step 4: Decide on a partition scheme
- Step 5: Install and update Windows
- Step 6: Install Linux
- Step 7: Setup applications for shared use
- ThinkPad minutiae
Introduction
I've had certain pretensions of becoming a Linux user since 1997, but the desktop environments and hardware support have been flaky enough over the years that I could never quite convince myself to switch over from Windows. But with the Linux desktop (especially Ubuntu) roughly reaching par with XP in terms of usability and stability, and with Vista introducing various functional annoyances and its weird visual rubberiness, I think I'm about ready to drink the Linux-flavored kool-aid.
I'm hoping to move over to non-proprietary software entirely within the next year or two, which is not a terribly ambituous thing to do given the current maturity of free and open-source apps. At this point, I can only think a few categories where the Linux desktop doesn't keep up with Windows: music production software (abundant and full-featured in Windows, cute and larval in Linux), games (not too many free options), and platform-specific software development tools (proprietary SDKs and toolchains, and plus I want to learn to write Win32 and DirectX apps). If it weren't for these things, I'd pretty much be ready to ditch the for-profit software industrial complex entirely.
What follows is a brief HOWTO-style schematic of my mostly pain-free experience getting a new-ish mainstream laptop to work under these operating systems:
- Ubuntu Linux 8.04 Release Candidate
- Windows Vista SP1 Home Premium
Hardware
My machine is a 14.1" non-widescreen ThinkPad T61p. Some sundry specs:
- T8300 2.4ghz Core 2 Duo processor
- 1gb RAM, supplemented by a 2gb DIMM from New Egg
- 160gb 7200rpm Hitachi SATA HDD
- 1gb Turbo Memory
- Bluetooth support
- Lenovo 802.11 a/b/g wifi adapter
- NVIDIA Quadro 570M graphics card, 128mb
- Windows Vista Home Premium, pre-installed on a single partition spanning the entire hard drive
There are some hardware- and vendor-specific issues that make the dual-boot setup something less than effortless, but I'll deal with those as they become relevant.
Step 1: Get a Windows Vista install disc
Lenovo typically doesn't ship any install media with their laptops, but as of the writing of this guide, DVD ISO images of the Windows Vista SP1 RTM [?] are easily available on BitTorrent, and you can use these to make complete, bootable install discs. This works for any version of Windows Vista, from Home Basic to Ultimate, although the image comes in two different flavors, one for 32-bit and one for 64-bit. The Vista product key stuck to the bottom of each laptop determines which Vista functionality gets installed.
Since I changed the base hardware configuration slightly by adding more RAM, I was concerned that there might be issues with activating a Vista install that did not originate from factory-provided media. But while I did end up having to activate Vista using Microsoft's automated phone service, I had no real problems with the activation process. Apparently, it is technically possible to extend the OS activation period indefinitely, although this shouldn't be an issue unless you are using a product key that has been disqualified on Microsoft's end.
Step 2: Backup recovery media
One consequence of having no factory-provided OS or driver media is that all recovery operations are conducted through a special pre-installed partition that is invisible to Windows operating systems. This occupies about 6gb of space and an entire primary partition slot, both of which you're probably better off using for your own purposes.
Purely in the interest of good citizenship, I used Lenovo's pre-installed "Make Rescue/Recovery Media" utility to create a backup of the recovery partition. The rescue disc consists of one bootable CD, while the recovery media has one bootable disc (I used a DVD) and two more DVDs' worth of data.
Step 3: Delete pre-existing partitions
At this point, you are ready to bask in the momentary destructive glee of removing all traces of vendor-provided software from your hard drive.
Since the recovery partition is designed to be invisible to Windows (and this includes the partition editor that runs in the Vista installer), you will have to run your favorite third-party partition editor to delete both the ThinkPad recovery partition and the pre-installed Vista partition. I just used the gparted utility, which you can access by booting off an Ubuntu install or live disc.
Step 4: Decide on a partition scheme
There's no need to pre-partition your hard drive prior to installing the respective operating systems, but it might be worthwhile to have an idea of how you want to organize your hard drive space.
Here's how I ended up partitioning my hard drive:
- 30gb primary parition, Windows C: (NTFS)
- 30gb primary partition, Linux root (ext3)
- 4.5gb primary partition for Linux swap. You'll hear different things from different people, but the swap partition size heuristic is usually to allocate a swap space equivalent to 150-200% of your available physical memory.
- An extended partition with:
- 20gb partition, to be used as a primary data share between Windows and Linux. Ubuntu 8.04 comes with a fairly mature NTFS-3G driver, so you can use NTFS as your share partition and feel safe writing to it from Linux. Of course, FAT32 still works okay.
- ~70gb partition for music, video, and application installers (NTFS)
Step 5: Install and update Windows
For all of its flaws and idiosyncracies, Vista actually has a much more straight-forward install process than XP and other earlier versions of Windows. You pretty much just create an install partition, pick your timezone, type in your license key, and you are good to go. I sort of suspect this simplicity comes at the automatic cost of installing every last driver and utility that Microsoft bundles with the install disc.
Prior to Vista SP1, if you had an SATA hard drive and AHCI enabled in your BIOS, you had to load Intel's third-party Matrix Storage Manager via USB during the Vista install, or else you would subsequently encounter a highly entertaining and insurmountable series of BSODs during Vista's startup cycle. I know this from experiencing just such a series myself. Nevertheless, if you are using an SP1 RTM install disc, then you have nothing to worry about.
Wifi access for my ThinkPad worked after the initial Vista install, so I was able to get on the Internet immediately to grab hotfixes and drivers. After three or four rounds of visiting Windows Update and rebooting, I had nearly every necessary hardware driver, including an up-to-date NVIDIA graphics driver. The only driver I had to install manually was for Turbo Memory, which for some reason is not included in the Windows Update database, despite the fact that it's essentially Vista-specific hardware (ahem).
I didn't bother installing Lenovo's system utilities, so there's no visual response when I change speaker volume or adjust screen brightness.
Step 6: Install Linux
Depending on which distribution you're using, Linux installations are generally way more involved and way more shall-we-say educational than Windows installs, although Ubuntu 8.04's install is basically painless, so long as you know how you want to organize and mount the various partitions on your hard drive.
This might be due to the fact that I'm installing a days-old version of Ubuntu on what's probably at least year-old hardware, but this was the first time I've ever installed Linux without encountering some kind of catastrophic mid-install failure, or a desktop environment that drops windows and dialogs sporadically, or misconfigured/non-functioning network or sound drivers. In fact, pretty much everything on this T61p worked on the first boot--I only had to grab the proprietary NVIDIA Linux driver, which isn't packaged with the distribution, presumably for legal reasons.
Ubuntu even has its own set of built-in laptop function widgets, including popup displays that respond to changes in speaker volume and screen brightness. The only thing that doesn't seem to work out of the box is the trackpoint's middle-click vertical scroll.
Installing Ubuntu after Vista ensures that you get a friendly GRUB boot menu that allows you to choose between your installed operating systems. If you re-install Windows, you'll most likely have to restore GRUB to access your non-Windows OSes.
Step 7: Setup applications for shared use
Although I plan to use Ubuntu most of the time, it'd still be nice to have a fully-functioning Windows environment. The prospect of manually synchronizing the generic apps (e.g. web browsing, email, and chat) between both OS platforms is none too enticing, but one can get around this by 1) moving to online thin clients (who uses desktop mail UAs these days, except for corporate types who have to use Outlook?), or 2) using software that's smart enough to have environment-independent config data.
This last point is where it's useful to have a share partition between Linux and Windows. The following is how I have things setup, along with some caveats.
The share partition
My share partition uses NTFS, so Vista performs read/write operations on it natively and without any explicit configuration. There are various ways of getting read/write access to the partition in Linux, although the easiest might just be to edit /etc/fstab to have Linux mount the NTFS share at boot with read/write permissions.
If you want to grant write access to all users, use the following mount options:
rw,user,users,auto,umask=0000
Personally, I limit write access to a single user account, and so these mount options apply:
rw,user,users,auto,uid=MY_USER_ID
In either case, with a recent Linux distribution equipped with the NTFS-3G driver, you can mount the partition as ntfs-3g.
If you're using FAT32 to format your share, mount as vfat instead. There's a slight caveat for the mount options if you're using Subversion on the share partition in FAT32, which I'll get to in a second.
Firefox
It's probably worth pointing out that Ubuntu 8.04 comes with Firefox 3 Beta 5. This is somewhat idiosyncratic, and so you'll want to make sure your Windows version of Firefox conforms to this. I just used Synaptic to remove Firefox 3 and grab the firefox-2 package. The latter doesn't seem to create a generic /usr/bin/firefox executable, so I just created my own with a symlink to /usr/bin/firefox-2. This will ensure that your launchers still work properly after you've removed Firefox 3.
At any rate, there are various guides across the Web on how to use a shared Firefox profile in a dual-boot scenario, although the basic pattern is as follows:
- Place your profile folder in a location that's readable and writeable for both Windows and Linux.
- Using your method of choice, point Firefox in each respective OS to the location of your shared profile. I prefer simply to edit
profiles.inithat comes with Firefox, although apparently there are GUI wizards that help you do this.
Mozilla Thunderbird has a very similar profile structure, and can be shared in basically the same fashion.
But note: one dual-boot gotcha that I discovered is that Firefox's profile data contains some platform-specific file paths that are totally illegible in the OSes that don't support them, e.g. Windows has no idea what to do with /home/jeff, much in the same way Linux has no idea what to do with a path such as C:\temp. What's more is that this can actually break some non-trivial functionality in Firefox.
One instance of this is the default directory into which Firefox stores downloads. My profile was imported from a Windows environment and had MS-style file paths for various download config values. As a result, I couldn't use Firefox's "Save Page As" and "Save Image As" functions from Ubuntu--the options were there in the menus, but no dialog would appear after selecting them.
The way around this is a) not to specify a download directory (which might be an annoyance for you, although I find I actually prefer this), and b) manually clearing all download-related config variables from your profile.
Pigdin (GAIM)
You can share your Pidgin profile (i.e., setup, connection information, and chat logs) in virtually the same way you share Firefox profiles above. Move your profile to a location that's readable/writeable to both platforms, and then replace the .purple directory in each respective Pidgin install with a shortcut (Vista) or symlink (Linux) to the profile share.
SVN working copies
You can keep Subversion working directories in your share partition that work with both Windows and Linux SVN clients, provided that they use FSFS (i.e., they have little .svn folders in every directory...I believe this is default behavior for most clients, anyway) rather than BerkeleyDB.
One somewhat esoteric caveat, mentioned above, is that if you are using FAT32 on your share partition, you need to mount it with the uid option rather than the umask option, for reasons that are partially explained elsewhere. I say only partially, because I've tested the umask mount with an NTFS share partition and it worked fine, and it's not quite clear from the aforementioned link why FAT32 should be any different.
ThinkPad minutiae
CPU whine
One of the bugbears of laptop acquisition of the last many months has been a longstanding and mostly unresolved issue involving non-trivial, high-pitched noises emitted from laptop-based Core 2 Duo CPUs or associated motherboard components, known colloquially as the "CPU whine" or "fan whine". This problem seems to affect C2D-based laptops of all makes and models, some more consistently than others. I did notice this on my T61p, and it's consistent and distracting enough to be a potential reason for returning the laptop (no joke: certain disgruntled and mercenary elements have broached the idea of pursuing a class-action lawsuit over this issue). Happily, I eliminated the sound almost entirely by changing my BIOS settings so that the CPU runs at maximum performance while on AC power. This is a minimally-intrusive and instantaneous fix. I've decided simply to put up with the noise in the infrequent occasions that I'm running on battery power.
Interestingly (or depressingly), I get a different kind of pained, high-pitched, wheezy noise when I run the preview of Ubuntu's (or GNOME's) Colorfire screensaver. I have decided not to think about it.
No firewire port
14.1" T61p laptops do not have 4-pin Firewire ports. The Lenovo catalog claims that Firewire is available on "certain select models", but then fails to specify which models these might be.
To do
I just found a list of T61-specific issues that arise for Ubuntu 8.04 installs, mostly things that I never would have caught on my own. In most cases, the issue is minor, and fixes are available on the internet. Anyway, this helps me round off a list of things that still need some attention, although most are insignificant enough that I don't need to be in too much of a hurry:
- Trackpoint middle-click vertical scroll doesn't work
- Linux wifi driver and/or GNOME Network Manager doesn't locate hidden SSIDs
- System wifi light doesn't work (I wonder if there's the same issue with the Bluetooth light?)
- Installing utils that grant more precise control over fan and CPU