When the developer edition of the new XPS 13 was announced, I was excited. My Asus UX31E Zenbook has been showing its age lately and I was suddenly looking for a ultrabook to replace it as my main dev laptop. Unfortunately, the price of the Developer's Edition XPS 13 with the QHD+ screen, 8 GB of RAM, and a 256 GB SSD was a bit underwhelming, Dell wanted around $1450 for the laptop after taxes, and their biggest discount I could find was a measly $50 off.
Bizarrely enough, I'd heard that the Microsoft Store store offered a better deal (albeit not for the Ubuntu version). After an initial 10% discount found on their site, I was able to sign up for SMS updates from Microsoft for an extra 5% off my next purchase on the store. This brought the same machine (but with Windows 8.1 installed) to just under $1200 after taxes. After an additional $17 for 1-2 day shipping (because Amazon has spoiled me with Prime shipping), the total came out to $1212.
So now I have a new machine for software development that's running Windows. Urgh. I could either wipe the drive completely and install Ubuntu fresh, or I could dual-boot. Windows is not really something I need for my development, but Windows 10 (and a free upgrade to it) is right around the corner and it might be neat to check out... so dual-booting it is.
Since this is a new laptop, I decided to document the process of adding Ubuntu to the machine. Dell's own engineers have stated that everything won't work perfectly out of the box when installing Ubuntu, so let's find out how fun/disastrous this will be.
Install all firmware updates
I recommend you update any firmware you can before trying to install Ubuntu on the XPS 13. The most required update is probably the BIOS, which is on version A03 at the time of writing this. I've read that earlier BIOS versions can really screw up Ubuntu installations. You can find Dell's firmware updates here.
Backup Windows
First, it's a good idea to backup Windows on the laptop in case something goes horribly wrong. Create a recovery USB drive as per Microsoft's instructions. You could delete the recovery partitions on the disk after this, but I won't because the extra ~7 GB of space aren't worth the gamble of losing my USB drive to me.
Shrink Windows partition on disk
Using the Disk Management utility, shrink the Windows partition on the SSD. There are 5 partitions on my machine in total, including the recovery partitions. You want to shrink the big ~230GB partition. I just let Windows select the largest size to shrink, so my Windows partition is now ~117 GB while I have 113 GB of unallocated space for Ubuntu. I really don't need my Windows partition to have an extra 90 GB of free space lying around, but oh well. Maybe I'll actually use Windows on it at some point. Anyway, moving on...
Turn off fast-startup in Windows
For safety purposes describe here, you'll want to disable fast-startup in Windows 8. Go to Control Panel > Hardware and Sounds > Power Options > Choose what the power buttons do, and then un-check the box near the bottom that says "Turn on fast startup."
Note: If this box is grayed out, click on the link at the top of the page that says "Change settings that are currently unavailable," and then un-check the box. Finally, click "Save changes" at the bottom of the page.
Download Ubuntu
Download an Ubuntu image for the laptop. I'm Downloading the nightly-build .iso of Ubuntu 15.04 at this time, as it's a week from final release so I'm hoping the nightly-build is all but finalized and stable. You can download it from here. Choose the 64-bit image.
Now download Universal USB Installer (UUI) and install the image on a USB drive you have lying around (not the one you just used to backup Windows). Any 2 GB USB drive should do just fine. After running the installer, you'll have to select the very last Linux distribution option for step 1, "Try Unlisted Linux ISO." Since 15.04 hasn't officially been released at the time of writing this, UUI does see the .iso file as a legitimate Ubuntu .iso. The rest of the USB drive creation is fairly straightforward with UUI.
Install Ubuntu
This is a big step, so let's break it down a bit more.
Boot into Ubuntu installer
Now power down the XPS 13 and plug your new USB drive. Turn the laptop on with the power button and start frantically hitting F12 until it opens the boot menu. Your USB drive should be listed in the boot menu below "Windows Boot Manager" and the SSD. Select your USB drive with the arrow keys and hit enter. Now select "Install Ubuntu" from the grub menu that pops up. It'll be really tiny font because of the QHD+ screen, but I don't know how to get around that in grub.
The Ubuntu desktop will load and a tiny box will appear in the center of the screen, asking for your language. Select the desired language and click "Continue."
This next page will show you how to achieve best results while installing Ubuntu. If there's not a check mark next to the internet connection, you can connect to wifi now. In the top right of the screen, click on the wireless settings and connect to your desired network. Once connected, you should see a check mark and now you can check the box next to "Download updates while installing" if you wish. Now click "Continue."
The next page asks you how you would like to install Ubuntu. The first option says to install Ubuntu alongside Windows Boot Manager. Don't do this. Click the radio button for "Something else" instead. Then click "Continue."
Create partitions
Be very careful with this step. Doing the wrong thing will destroy your Windows installation and will make your life sadder. You should see a list of "devices" along with their type, mount point, size, used space, and system. One of these will say "free space" and will have roughly the same amount of space as you freed up when shrinking the Windows partition. For instance, mine says 121663 MB (roughly 117 * 1024 MB). I know the math doesn't work out perfectly. Shush.
We're going to create two partitions now: one for the root and one for swap. Adding an additional home partition is optional, but I don't feel for it. You can read about all of the different possible partitions for Ubuntu here. I encourage you to read a bit to see if a separate home partition is useful in your case.
Let's first discuss how we're going to divide the free space for these two partitions. I have ~117 GB of free space to play with. This isn't a ton of free space, but it should be plenty considering my previous laptop had a whopping 60 GB dedicated to Ubuntu. I'll choose to allocate what I need for swap, and then allocate the rest for the root partition. There's plenty of discussion as to how large the swap partition should be, but I'm going to choose 16 GB to allocate for swap, as per specified as the maximum needed by this FAQ. 16 GB will work out to be (16 * 1024) or 16384 MB. That leaves me 105279 MB for the root partition. Now to create them...
Select the big "free space" row and click the little "+" button underneath the list. Set the size to be what you've calculated your root partition to be (mine was 105279 MB). Set the partition type to "Logical," use as "Ext4," and set the mount point to "/" from the dropdown. Then click "OK."
Now you should see the new ext4 partition that you just created listed in the devices list. There should also be a "free space" device that has the remaining size left for your swap (mine was 16384 MB). Select the "free space" row and click the "+" button underneath the list again. Set the size to your swap size, set the partition type to "Logical" and use as "swap area." Then click "OK."
Actually install Ubuntu
Now all of your free space should be gone in the list and you should see your two partitions in the middle of the list with their respective sizes. Leave the "device for boot loader installation" alone and click "Install Now." It will prompt for confirmation. Just click "Continue," and finish following the rest of the installation prompts.
Finally, it will ask you to restart. Do it and you should hopefully see the grub bootloader with an option to select the Windows Boot Manager.
Is that it?
Yes and no. Everything's still super tiny so you'll need to play around with some settings. Also, not everything will necessarily work perfectly. Check the notes here. There are some apparent issues with the mic not working, although I haven't tried it yet.