Ceci est une ancienne révision du document !
This past month saw me installing Windows 8 on my dual monitor PC setup, in order to test it thoroughly for a client. Naturally, I didn't remove ArchLinux, but there are certain steps required to keep both operating systems happy. As such, I felt this month it may be useful to explain some of the extra steps, in order to save some people headaches when dealing with this.
Trick 1: Hard disk order Note: This is important only to people with multiple physical hard disks in their PC.
Windows has a major complaint any time the primary hard disk is not the one Windows is installed in. It works just fine, so long as you don't do anything with the partition layout. In order to run an upgrade, for example, you need to have the main partition (Windows C: drive) set to active. This can be done in the disk management menu, but won't work if you've made the Windows drive secondary. Solving this is as easy as switching the order in your BIOS.
Trick 2: GRUB is gone
As one would expect, Windows replaces any boot manager with its own. After this happens, you have two options: either create a menu for Linux from the Windows boot manager (this is possible), or re-install GRUB. If, like above, you have two disks, my preference is to simply install GRUB on the Linux drive, and leave the windows boot manager intact on the other. The boot manager used is always the one on the primary drive, so you can effectively switch between both managers by switching the hard disk order. This saves you the trouble. If, however, you don't have two drives, you'll need to re-install GRUB. The easiest way to do this is to boot from a live CD, and, for GRUB2 (which is used on all the newest Ubuntu versions), run:
sudo grub-install /dev/sdX
in the terminal. Remember to replace sdX with the actual hard disk number (for example, /dev/sda). You can check this with either gparted, fdisk -l or any similar program. If you have internet in the live CD, you can also install a graphical tool called boot-repair.
Trick 3: System time is constantly wrong in both Windows and Linux
This is often the case when Ubuntu is set to use UTC time. Coordinated Universal Time (UTC) is a modern successor to GMT, and is the de facto standard for the Network Time Protocol and quite a bit of the internet. The problem? Windows refuses to offer an easy option to enable UTC. You can edit the registry in order to enable it (see UbuntuTime link in Further Reading below). The, probably easier, option is to set Linux to local time. To do so, simply do the following:
sudo vim /etc/default/rcS
Then edit, or create, the following line:
UTC=no
If you're someone who isn't comfortable editing files like this, or editing the registry, you can also simply adjust your timezone in Windows to balance the offset. For example, if you live in GMT+1, and your clock is 2 hours behind, switch to GMT+3, and it should work just fine. However, this may create unforeseen problems further down the line.
The “Developer-recommended” solution is to set both Windows and Linux to UTC, and disable Internet synchronization in Windows (it doesn’t seem to work with UTC), instead relying upon NTP in Linux. I’m currently testing this solution, and it seems to be working alright so far.
Trick 4: Keeping media organized
If you want to keep your media (music, videos, pictures, etc.) available to both systems without having to constantly copy and update the files, the easiest solution is to have a media partition. I've split my 1TB hard disk into 200GB for Linux, and 700GB for media. The Linux stuff is just a / and /home (both EXT4), and the 700GB partition is NTFS. The 700GB partition contains all my music, videos, pictures, and backups. Once you've relocated the files onto the media partition, you need to create symbolic links to them in Linux. My preference is to create a sub-folder link, as opposed to replacing the Music, Pictures and Videos folder completely. To create a symbolic link, do the following:
ln -s /media/Media/Music ~/Music/External
This would create a link to your Music folder (on the partition called “Media”). The link would be called External, and is located in the Music folder within your home folder. You can, naturally, change the command however you see fit. You can do something similar in Windows 7 or 8 (possibly in Vista), by adding a new folder to your “Libraries” for Music, Pictures, Videos. Instructions can be found in the Further Reading section.
A quick note: If Ubuntu doesn't automatically connect the Media partition, you'll need to do that manually, and instructions are below in the Further Reading section.
This trick for media files can also be used for any other type of file you would need to share. For example, you can stick your Dropbox folder on it, and avoid having to download any updates twice.
I hope at least a few of my readers find this article useful, and for those of you who didn't, odds are I'll have something to interest you next month. If you have any questions, comments, or suggestions, feel free to email me at lswest34@gmail.com. This month I've also written a review on Think Like A Programmer by V. Anton Spraul, so if you're interested in programming, you may want to give it a look.
Further Reading:
http://windows.microsoft.com/is-IS/windows7/Customize-a-library – Customize Windows Library
https://help.ubuntu.com/community/UbuntuTime – UbuntuTime
https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows – Restore GRUB
https://help.ubuntu.com/community/AutomaticallyMountPartitions – Automatically Mount Partitions
http://superuser.com/questions/482860/does-windows-8-support-utc-as-bios-time - UTC in Windows