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+Ton most systems) - We need to know where (partition) our OS is installed. You can use
sudo fdisk -lto get the list of partitions. In my case it was/dev/sda2. - Now we’ll mount our partition with
sudo mount /dev/sda2 /mnt(insteadsda2type 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
/mntholds the image of our system. Usingsudo chroot /mntwe tell the system to use/mntas its root folder. - Now we re-install grub with
sudo grub-install /dev/sda, wheresdais the whole disk. - After installation is complete (no errors) let’s run
sudo update-gruband if it’s successful we canexitfromchroot. - 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.
