Installing Xubuntu 6.06 (Dapper) on an HP Pavilion dv5178us

Dual Booting with Windows Media Center and the NT Boot Loader

Last Update: 9/23/2006


  • Introduction
  • Preparing the Disk
  • Installing Xubuntu
  • Adding Xubuntu to the NT Bootloader
  • Configuring Networking
  • Install Some Extras
  • Content Information
  • Introduction


    My wife has been complaining about the old-old laptop that isn't really even good enough to run a decent web browser any more. It's about 8 years old with a 366Mhz processor and 128K of RAM. So, I went out and bought a fancy new laptop to replace it. The other thing that she's been complaining about is the fact that she can't read most of her Tamil websites with Firefox on Linux, so against my better judgement, I need the system to continue booting Windows. The laptop as purchased actually has three versions of Windows on it: the full-blown Windows Media Center, another version that is used by the HP computer restoration functionality, and an embedded version that is used by the special "play DVDs without actually starting the computer" buttons. I'm not sure how well all these different versions will work with Linux, or whether they'll still work if I install grub to the MBR, so I plan to continue booting Windows using the NT BootLoader.

    I wrote these notes just so I would remember what I did, and I'm publishing them in case they're helpful to someone else. Use them at your own risk. Just because these procedures worked for me, doesn't mean they'll work for you. If something breaks, I'm sorry, but it's not my fault.

    System Specs

    Here are the system specs, mostly copied off the box:

  • Intel Core Duo Processor T2300
  • Intel PRO/Wireless 3945a/b/g
  • 100GB Hard Drive
  • 15.4in WXGA High-Definition Widesreen
  • 1024MB SDRAMM
  • nVidia GeForce GO 7400 with 256MB RAM
  • 8x DVD+/-RW
  • Intel 82801G HD Audio
  • Microsoft Windows Media Center Edition
  • If it's not listed here, I didn't really care about it, and so can't say whether it works or not. All of the above work without fuss (though I fuss anyway, and there are some notes below to prove it).

    lspci Output

    0000:00:00.0 Host bridge: Intel Corporation Mobile Memory Controller Hub (rev 03)
    0000:00:01.0 PCI bridge: Intel Corporation Mobile PCI Express Graphics Port (rev 03)
    0000:00:1b.0 0403: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)
    0000:00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01)
    0000:00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 01)
    0000:00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 01)
    0000:00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 01)
    0000:00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 01)
    0000:00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 01)
    0000:00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 01)
    0000:00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)
    0000:00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e1)
    0000:00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 01)
    0000:00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)
    0000:00:1f.2 0106: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controllers cc=AHCI (rev 01)
    0000:00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01)
    0000:01:00.0 VGA compatible controller: nVidia Corporation: Unknown device 01d8 (rev a1)
    0000:06:00.0 Network controller: Intel Corporation: Unknown device 4222 (rev 02)
    0000:08:06.0 CardBus bridge: Texas Instruments: Unknown device 8039
    0000:08:06.1 FireWire (IEEE 1394): Texas Instruments: Unknown device 803a
    0000:08:06.2 Mass storage controller: Texas Instruments: Unknown device 803b
    0000:08:06.3 0805: Texas Instruments: Unknown device 803c
    0000:08:08.0 Ethernet controller: Intel Corporation: Unknown device 1092 (rev 01)

    Preparing The Disk

    Things to Do In Windows

    The first thing to do is get rid of any unnecessary files from the Windows environment. After that, you should defragment the hard drive. On my completely new system, this had no real effect, but I did it anyway just to be sure. Select My Computer from the start menu, right click on the C drive, and select Properties. Select the Tools tab, and click the button labeled Defragment Now .... Select the C drive, and click the Defragment button. If you've been using your system for a while, you might need to defragment more than once to get Windows to move everything to the beginning of the disk.

    Things to Do With a GParted LiveCD

    A quick google search uncovered the GParted LiveCD, which can be used to resize an existing NTFS partition. I downloaded and burned the CD image, rebooted the laptop off the CD (skip extra boot options), and it immiediately starts GParted.

    On my machine, there are 3 partitions: sda1, sda2, and sda3. I chose to shrink sda1 (the big NTFS partition) and leave the others alone. Select /dev/sda1 from the list and click the Resize/Move button. I cut the partition in half, 40GB for Windows and 40GB for Linux. Then I selected the free space and marked it as one big extended partition, which I then subpartitioned as partitioned it as I like it for Linux, with separate partitions for /, /usr/local, /home, and swap. After that, click Apply, and when the operations are all complete, boot back into Windows to make sure it still works :-) and to download and burn the Ubuntu CD. Windows will check the NTFS partition on reboot since it's confused by the resize.

    Installing Xubuntu

    Basic Installation

    Xubuntu is a pretty easy install. You boot off of a live CD and then click an icon that says Install, it's that easy. However, if you want to keep the NT bootloader, then you won't be able to use the nifty graphical installer on the live CD, since it always installs to the MBR. So, after rebooting into Windows, download the Xubuntu Alternate CD, burn it, and reboot off the CD. The main install is pretty straightforward, and the only places I didn't follow the defaults are detailed below.

    Disk Partitioning / Mount Points

    When the Prepare Disk Space screen came up, I noticed the option to resize a partition and use the free space. I would have tried that, rather than using GParted, if I had known about it, but I had already repartitioned. So, instead I selected the option to manually edit the partition table. On the main Partition Disks screen, I went through my previously created ext3 partitions one-by-one, specifying the mountpoints, being careful not to touch the NTFS and FAT partitions.

    Grub Installation

    If you want to continue booting Windows with the NT BootLoader, then it's important not to install grub to the MBR. The Xubuntu alternate disk installer will ask if you want to install to the MBR (the default is Yes). Select No, and on the next screen, specify your root partition for grub installation. If you have a floppy drive (I don't) then you can simplify things a little by writing grub to a floppy disk, but you'll have to find those instructions elsewhere.

    Adding Xubuntu to the NT BootLoader

    Boot an Xubuntu Live CD

    I'm sure there's a better way to do this ... but here's what I did.

    After the installation, you will be unable to boot directly into Linux from off of the hard disk, since grub wasn't installed to the MBR. We need to get the NT BootLoader setup so that it can boot the Linux partition for you. An Xubuntu Live CD will come in handy for that, and I already had one since I had previously downloaded it to do the install before I figured out it would muck with the MBR. If you don't already have one, reboot into Windows, download and burn a standard Xubuntu Desktop CD, and reboot off of that CD.

    Things to Do in Xubuntu

    First, mount the /home partition from your the hard drive (e.g. sudo mount /dev/sda8 /mnt). Next, copy the boot sector from your root partition to a file on your home partition (e.g. sudo dd if=/dev/sda5 of=/mnt/boot.lnx bs=512 count=1). Finally, upload the new file to a location that will be accessbile from your Windows system.

    Things to Do in Windows

    First, download the boot sector file you copied out to the internet. Put it directly under C:\. Next, you will need to edit c:\boot.ini, but before you can do that, you will need to remove the file's special attributes: c:\attrib -s -h -r boot.ini. After that, in the editor of your choice, add this line to the end of the file: c:\boot.lnx="Xubuntu Linux". And finally, put the special attributes back on the file: attrib +s +h +r boot.ini.

    Now, when you reboot, you will be presented with a menu of OS choices to select from, which will include both Windows and Linux.

    Configuring Networking

    HOME Configuration

    At home, I use static IP addresses and only automatically start the wireless connection. From the Applications menu, select Systems -> Networking to bring up the network-admin tool. Create a new location called home, and edit the properties for both the wireless and wired network cards, adding the static IP addresses for each. Then mark the wireless connection as active. Finally, add the DNS entries used by the home network.

    REMOTE Configuration

    When I'm away from home, I use DHCP for both interfaces, and I don't configure either one to automatically start. In the network-admin utility, add another location called remote, deactivate the wireless card, set both interfaces to use DHCP, and remove the DNS entries. Then switch back to location home to reactivate the wireless card with the static IP.

    Install Some Extras

    Security Updates

    After completing the network configuration, the most important thing to do is update your software with the latest security fixes. From the Applications menu, select System -> Synaptic Package Manager. Under Settings, click Repositories, and make sure that there are entries for main, restricted, universe, and multiverse for the Ubuntu, Ubuntu Updates, and Ubuntu Security Updates channels, and that they are all checked. Then click the Reload button, click Mark All Upgrades, and click Apply. Now is a good time for refreshments.

    Kernel and Drivers

    If you want to get the most out of the machine, then you'll have to install the right kernel. Xubuntu (and the other versions of Ubuntu, too), still install the i386 kernel by default, rather than intelligently figuring out which kernel you need based on the type of CPU you have. In synaptic, search for linux-686-smp, and click the box to select it.

    The laptop has an nVidia card, and I'd like to get decent 3D graphics out of it, so I'll be using the proprietary drivers. Search for nvidia in synaptic, and select nvidia-glx.

    There are a few Gnome packages that make for a better Xubuntu experience: update-notifier, gnome-volume-manager, and gnome-power-manager. (The volume manager is actually the program that does special handling when removable media is inserted. I don't know why it's called volume manager.) Search for and select all of these packages in synaptic.

    Now that all these useful things have been selected, click Apply. When the installation is complete, reboot to start up the newly installed kernel.

    X11 Configuration

    After the nvidia-glx package has been installed and the computer rebooted, run the command sudo nvidia-glx-config enable from the command line, and restart X. When you log back in, you should have accelerated graphics. Double check this by running nvidia-settings from the command line.

    Content Information and Resources

    Much of the information presented here is just my own ramblings to help me remember what I did. The most important websites I looked at are:

    GParted -- Welcome
    Xubuntu - XFCE and Ubuntu Dynamite
    Booting Linux from Windows NT/2000's Boot Manager

    Please remember, just because all of this worked for me, I make no guarantee of it's suitability for your computer. If you follow my instructions and something breaks, I'm sorry, but it's not my fault. Use these notes at your own risk.

    Linux On Laptops