Windows 8 and Debian Wheezy dual boot

An old Dell XPS M1330 laptop has been collecting dust around here for ages. It’s one of those “yes… I am sure that laptop will come in handy some day…” machines, and I finally took the time to set it up as test machine for Windows 8 and Linux. I also had an unused SSD drive that could replace the old and slow HD in the laptop.

Time to get to work!

Install Windows 8

  1. Get the Windows 8 installer. Run it, then go through all the steps until you get an option to “Install by creating media”. A Windows machine of some kind obviously needed for this. This will create a bootable USB flash drive or an ISO, with all the Windows install files on it.
  2. You can actually install Windows 8 directly from the flash drive, but once you try to activate Windows it will tell you that the product key can only be used for upgrades. I found this out the hard way -> had to re-do the whole process.
  3. Get a copy of Windows XP, Vista or whatever earlier Windows version you can find. I happened to have a bunch of XP Pro licenses taken from old computers over the years. If going the XP route, it might be worth installing from XP SP3 (rather than SP2 or earlier), IIRC the pre-SP3 XP versions were rather crappy.
  4. Windows XP + SSD = <FAIL>. As the Windows 8 license was an upgrade, I had to get some prior Windows version installed first. Turned out that Win XP SP3 didn’t play nicely with the SATA2 SSD I had installed. Probably some missing drivers in the XP installation – SATA2 just had not been invented when Win XP was hot, I guess.
    I had to change a couple of BIOS parameters handling flash cache and SATA emulation (reverting back to some older ATA variant, I believe. Not sure, but it worked).
    The XP installer then detected the SSD and fired up as expected.
  5. Install XP from CD/DVD, as was done in the old days. No need to apply updates etc once it is installed. I didn’t activate Windows XP Genuine Advantage either.
  6. While in XP, start the Windows 8 installer from the flash drive created step 1 above. From here it’s a pretty easy ride, think I went with the defaults most of the way
  7. Windows 8 should then be installed, and XP gone. Nice.

If you have a fresh-install product key for Windows 8, you can most likely skip the XP installation steps above, of course.

Install Debian

  1. Download UNetbootin to the new Windows 8 machine. No need to install, it’s a standalone application.
  2. Use UNetbootin to create a bootable Debian installation flash drive. All the actual Debian files will be downloaded during the installation, so the flash drive can be small (I used an old 256 MB one). I went with the Debian Stable_Netinstall, worked well.
  3. Reboot the computer to start the Debian installer. If the entire disk was allocated to Windows during that installation (it would have been, unless you repartitioned it yourself) you need to make some space for Debian. The Debian installer allows you to do this in the partitioning section. Go to the partition that Windows is installed on, hit enter and you can edit the size of the partition. Apply.
  4. While still in the partitioner, move to the now free/unused space on the SSD, and use the assisted partitioner for all unused free space. Going with the recommended option (all data on same partition) is fine. You will then get /dev/sdb5 and /dev/sdb6 partitions for general use and swap, respectively.
    NOTE: When booting from the USB flash drive it gets the name /dev/sda. The SSD is /dev/sdb, with the Windows partition being called /dev/sdb1.
  5. The Debian installer can be a bit cryptic the first times you use it, but it’s not too bad. Going with the defaults is usually fine.
  6. One of the last steps is to install the GRUB boot loader. Now, this can be done different ways. The easiest is to just follow the suggestion to install GRUB to the Master Boot Record. This will overwrite Windows boot loader (which in Windows 8 is actually pretty nice, with graphical UI, mouse interface etc).
  7. When the Debian installer finish and the computer reboots, quickly remove the flash drive and if all is well GRUB should now kick in, showing Debian side by side with Windows 8.

If you want to use the Windows 8 boot loader, you need to reinstall it. I first thought I would do this, but changed my mind.. GRUB might not have the pretties UI around, but it works.

I think the last part of this article might be useful if you still want to switch back to using Windows 8 boot loader.

Closing thoughts

Now that XP is no longer anywhere on that SSD, it should be safe to switch the BIOS back to proper SATA mode. Windows 8 didn’t boot when I did that though… Not sure why. After switching back to the old legacy mode both Windows 8 and Debian boots fine, so I guess that decides it.

I did actually also do some initial work on the SSD, upgrading the firmware of it, as well as using the GParted Linux distro on a flash stick (once again using UNetbootin to create the flash disk) to create a FAT32 partition and align it as described in this post. No idea if that was really necessary..

Misc sources providing input for the above

http://www.howtogeek.com/99060/how-to-dual-boot-windows-8-and-linux-mint-on-the-same-pc/
http://unix.stackexchange.com/questions/76932/installing-debian-7-besides-windows-8
http://askubuntu.com/questions/217904/installed-ubuntu-my-windows8-not-booting/218006#218006

2 Replies to “Windows 8 and Debian Wheezy dual boot”

  1. I have a dual boot in a 256gb SSD , Deb7 and win 8.1, now have a problem, apparently debian wheezy and windows 8.1 work fine, but occasionally when I go to win 8.1, this deletes files created in a shared linux partition (ntfs), usually with chkdsk (windows) I get back , I have to solve this ,,in windows 7 only disabling the hibernate mode gets resolved, in windows 8 is already disabled and still does … is a problem since I use linux 95% of the time

Leave a Reply

Your email address will not be published. Required fields are marked *