Working Windows&Linux dual-boot

27 Sierpnia 2015

A while ago, I got a new laptop so that I can experiment without destroying my stable system. I started with OpenSUSE 13.2, but it became hard to work on (some stuff didn’t work like it should). Then I installed Manjaro, which is based on Arch. It’s great.

Recently, I decided to install Windows on a spare partition. It worked fine. But it removed GRUB from MBR. Yeah, not nice. So, in to the Internet: DuckDuckGo -> "windows grub install" and here’s what I got:

Fixing GRUB

  1. We need to boot a liveCD, preferably with the same OS (Manjaro in my case) and the same architecture (x86/x64)
  2. Terminal (Ctrl+Alt+T on most systems)
  3. We need to know where (partition) our OS is installed. You can use sudo fdisk -l to get the list of partitions. In my case it was /dev/sda2.
  4. Now we’ll mount our partition with sudo mount /dev/sda2 /mnt (instead sda2 type your partition)
  5. Next we mount all the virtual folders with for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
  6. Ok, so /mnt holds the image of our system. Using sudo chroot /mnt we tell the system to use /mnt as its root folder.
  7. Now we re-install grub with sudo grub-install /dev/sda, where sda is the whole disk.
  8. After installation is complete (no errors) let’s run sudo update-grub and if it’s successful we can exit from chroot.
  9. Reboot

Ok, if everything worked, we should be able to boot our OS. And everything’s great. Well, nearly. I have all my files in /home on a separate partition, which I’d like to be able to use on Windows as well.

Making /home partition visible on Windows

Actually it’s quite easy. There’s a tool called Ex2Fsd on SourceForge. After installing just run the Ext2Mgr. It’s fairly easy to configure. You can select an option that mounts the selected volume on startup and automatically assigns a letter to it.