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
- We need to boot a liveCD, preferably with the same OS (Manjaro in my case) and the same architecture (x86/x64)
- Terminal (
Ctrl+Alt+T
on most systems) - 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
. - Now we’ll mount our partition with
sudo mount /dev/sda2 /mnt
(insteadsda2
type your partition) - Next we mount all the virtual folders with
for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done
- Ok, so
/mnt
holds the image of our system. Usingsudo chroot /mnt
we tell the system to use/mnt
as its root folder. - Now we re-install grub with
sudo grub-install /dev/sda
, wheresda
is the whole disk. - After installation is complete (no errors) let’s run
sudo update-grub
and if it’s successful we canexit
fromchroot
. - 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.