Use the following method if you have recently needed to reinstall your Windows partition on a dual-boot Ubuntu/Windows setup. (Note: These instructions are not limited to Ubuntu only. Most any flavour of Linux and dual/multi-boot configuration can be repaired with few or no tweaks to the procedure.)
1. Boot from a recent Ubuntu installation CD (or Live CD.) Choose to "Try Ubuntu" without installing it from the boot menu.
2. Open a terminal.
3. Determine where your Ubuntu partition is using fdisk:
sudo fdisk -l
sudo mkdir -p /media/ubuntu sudo mount /dev/sda6 /media/ubuntu
sudo grub-install --root-directory=/media/ubuntu /dev/sda
I recently had this problem trying to fix an old laptop running Windows XP Home. I found a solution here: http://www.pcmech.com/forum/showthread.php?t=139698 but I ran into a snag of my own when trying to run Task Manager.
The message Task Manager has been disabled by your administrator popped up when I tried to follow the guide. I suspect this is a curiosity of the XP Home disc, but it was easily fixed by running the Registry Editor and changing the appropriate flag.
The whole process is documented below for reference:
1. When stuck at 31/32 minutes, press SHIFT-F10 to bring up a command-prompt (yes, that one's news to me, too.)
2. Type taskmgr and press ENTER. If the Task Manager appears skip to step 3. If you get a warning, continue to 2a:
2a. Type regedit and press ENTER.
2b. Navigate to HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ System. You will see a value labeled DisableTaskMgr and its value will be set to 1. Double-click on it and change the value to 0.
2c. Close the Registry Editor and return to the Terminal window. Type taskmgr and the Task Manager should appear this time.
3. Look for the process(es) in the Processes tab that are hogging all the resources (ie, greater than 90% CPU, huge memory usage, etc.) and causing setup to freeze. If you don't see any, your setup may not have actually frozen yet. Patience, grasshopper!
4. Click "End Process" on each rogue process once you're sure they are causing problems. Setup should start making progress quickly after you've killed the right process.
5. Setup may freeze again at the 13 minute mark. If it does, simply repeat from step 1.
Do not be trigger-happy about loading Task Manager and killing processes. Ensure the that setup has frozen by waiting 30 minutes to 1 hour before acknowledging that yes, it really doesn't have 31/32/13 minutes to go!
A recent emerge --update --deep world performed an upgrade of gcc. This was fine in itself; the problems came after running emerge --depclean, which removed my old gcc version and invalidated my current gcc profile.
But I did not actually realise gcc was broken until I tried emerging something else, and even then I did not immediately look to my gcc configuration!
Solution
These are the steps you should take when faced with upgrading gcc:
1. Before installing a new version, check that your current gcc is configured correctly:
linux # gcc-config -l linux # gcc-config 1
# Manually: linux # unset GCC_SPECS linux # emerge gcc # Or through a world update: linux # emerge --update --deep world linux # emerge --depclean linux # revdep-rebuild
linux # source /etc/profilelinux # gcc
gcc: no input fileslinux # emerge geoip ... configure: error: C compiler cannot create executables See `config.log' for more details. !!! Please attach the following file when seeking support: !!! /var/tmp/portage/dev-libs/geoip-1.4.5/work/GeoIP-1.4.5/config.log * * ERROR: dev-libs/geoip-1.4.5 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 2627: Called econf '--enable-shared' * ebuild.sh, line 543: Called die * The specific snippet of code: * die "econf failed" * The die message: * econf failed * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/dev-libs/geoip-1.4.5/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-libs/geoip-1.4.5/temp/environment'. *
linux # emerge --info !!! No gcc found. You probably need to 'source /etc/profile' !!! to update the environment of this terminal and possibly !!! other terminals also.
linux # gcc-config -l * gcc-config: Active gcc profile is invalid! [1] x86_64-pc-linux-gnu-4.3.2
* Switching native-compiler to x86_64-pc-linux-gnu-4.3.2 ... * Your gcc has a bug with GCC_SPECS. * Please re-emerge gcc. * http://bugs.gentoo.org/68395 >>> Regenerating /etc/ld.so.cache... [ ok ] * If you intend to use the gcc from the new profile in an already * running shell, please remember to do: * # source /etc/profile
linux # gcc gcc-config error: Could not run/locate "gcc"
Taken from elsewhere for my own notes:
1. Use "mdadm --manage /dev/md0 -r /dev/sdd" to remove the drive that was marked as faulty from the array.
2. Power down and replace the drive with a good drive.
3. Power up and set the partition table on the new drive to match those of the other drives in the array. Here we used "sfdisk -d /dev/sda | sfdisk /dev/sdd".
4. Add the proper partition on the new drive into the array, "mdadm --manage /dev/md0 -a /dev/sdd2"
5. Sit back and wait for the recovery to happen, you can "cat /proc/mdstat" to watch its progress; you should see something like:
Personalities : [raid5] md0 : active raid5 sdd2[4] sdc2[2] sdb2[1] sda2[0] 731985408 blocks level 5, 256k chunk, algorithm 2 [4/3] [UUU_] [===>.................] recovery = 19.7% (48253056/243995136) finish=59.1min speed=55184K/sec

Outcast is a PC video game from 1999 by the now bankrupt Appeal, and was distributed by Infrogrames. At the time it was Windows-only, but today you can get your retro-fix on Linux thanks to developments with WINE.
Here are instructions on how to get Outcast working in Ubuntu Hardy Heron, although you will not have too much trouble transferring them to other distros:
Installing WINE: You will need a patched version of WINE 1.1.0 in order to fix the mouse-look problem. This problem affects other games, too. Fortunately, the patch adds an optional ENV flag, so you will not affect your other WINE applications with it.
1. Install the build-dependencies and patching utility:
sudo apt-get build-dep wine sudo apt-get install patch
mkdir ~/wine-dev cd ~/wine-dev tar xvf ~/wine-1.1.0.tar.bz2 -C .
cd ~/wine-dev/wine-1.1.0 patch -p0 < ~/wine-force-mousewarp.patch
./configure make sudo make install
winecfg # Applications > Windows Version > Windows 98 # Graphics > Allow DirectX apps to stop the mouse leaving their window # Audio > OSS Driver # Drives > Autodetect... (make sure it picks up your CD-ROM drive!) # Press OK
# Terminal 1 # Install the game as normal (use the default settings) # Assumes D:\ is how WINE detected your CD-ROM drive wine "D:\Setup\SETUP.EXE" # Terminal 2 # Once the installer starts copying the game-files, run # this command to delete Uninst.isu when it exists. # The game takes a little while to install, so you should # not need to rush the process rm ~/.wine/drive_c/Program\ Files/Outcast/Uninst.isu
env WINEPREFIX="~/.wine" wine "C:\Program Files\Outcast\Outcast.exe"
env WINEFORCEMOUSEWARP="yes" WINEPREFIX="~/.wine" wine "C:\Program Files\Outcast\oc\loader.exe"
This article is a backup of a thread I posted elsewhere, and partially documents the installation of my Gentoo server.
Click "Comments" to see the whole thread.
Still on a retro-gaming bender, I reinstalled ZSNES recently only to find out why I abandoned it in the first place: Bad sound quality on my system.
After much digging I think I've finally stumbled on the solution, so here's the lowdown on getting ZSNES up-and-running from source: (This assumes you've already downloaded it from the ZSNES site and have extracted it to an appropriate place.)
# You'll need SDL if you don't have it: sudo apt-get install libsdl1.2-dev # Configure, make and install ZSNES ./configure --enable-libao --enable-release make && sudo make install
sudo apt-get install libsdl1.2debian-alsa sudo apt-get install libsdl1.2debian-oss sudo apt-get install libsdl1.2debian-esd
bsnes aims to emulate SNES hardware as closely as possible, and as of 4th August 2007 it claimed to achieve 100% compatibility with all commercially available games.
Trying to compile version 0.022 on Ubuntu 7.04 Feisty Fawn I came a cropper on a couple of dependencies, so here they are for anyone else who's interested in trying out bsnes:
sudo apt-get install libxv-dev libao-dev
Miles off-topic, but perhaps I can be forgiven since this is my first post on this site for nearly a year. 
If you're interested in amateur electronics, you may have heard of Velleman and their excellent kits, and you may also have heard of their K8055 USB Experiment Interface Board.
Unfortunately Vellemen only provide Windows drivers and examples for this great little project, but help is at hand for Linux users over at this site:
http://libk8055.sourceforge.net/
One of the issues highlighted is giving the device the correct permissions using hotplug when it is first plugged-in. If you are using udev instead, follow this procedure:
1. Build your K8055. 
2. Plug it in and find out its Vendor and Product ID. You'll need to install usbutils for this:
# Install usbutils in a Debian-based distro (eg, Ubuntu) sudo apt-get install usbutils # Install usbutils in Gentoo emerge usbutils
Bus 002 Device 052: ID 10cf:5500 Velleman Components, Inc. 8055 Experiment Interface Board (address=0)
# udev rules file for Velleman K8055 USB Experiment Interface Board # SUBSYSTEMS!="usb", ACTION!="add", GOTO="k8055_rules_end" # The K8055 device, including all jumper configurations ATTRS{idVendor}=="10cf", ATTRS{idProduct}=="5500", GROUP="k8055", MODE="0660" ATTRS{idVendor}=="10cf", ATTRS{idProduct}=="5501", GROUP="k8055", MODE="0660" ATTRS{idVendor}=="10cf", ATTRS{idProduct}=="5502", GROUP="k8055", MODE="0660" ATTRS{idVendor}=="10cf", ATTRS{idProduct}=="5503", GROUP="k8055", MODE="0660" LABEL="k8055_rules_end"
/etc/init.d/udev restart
groupadd k8055
usermod -a -G k8055 <your_username>Oops... Upload-links were broken. 