How to Repair Linux Boot Loader after Windows Installation

Gone are those days where dual booting required required understanding of chain loaders. even today XOSL worth mentioning. it got lots of features – i would say most feature rich boot loader i ever seen. nowadays GRUB2 is decent enough to dual boot Linux and windows and very intuitive enough for a layman.

Oh Windows Overwrites MBR and Linux is gone!

Windows versions i ever used, never given respect to other operating system residing in the hard disk. so much selfish. it requires first primary partition itself. and overwrites MBR without any warning.

How to partition then?

With deserved contempt, better to give the first partition for Windows,  let it call “C” drive :). (many boot loaders allow us to hide partitions and trick windows). so let it be like 20GB. Next partition can be given to Linux. it hardly require 10GB space. remaining space can be common area.

I have a new disk, how to partition it properly.

Both windows and Linux comes with required partitioning tools. But Linux live CD or Live USB can give you full fledged working environment and partitioning tools with good GUI. So better to boot the system using Live CD / USB and start installation. Since partitioning must be the first steps to install OS, you can do proceed the installation until the disks are partitioned and then abort the installation if required by pressing the reset button on the machine.

Order Matters

Since windows overwrites MBR during the installation. its better to install windows first. if you are installing linux after that, most of the linux distributions are cable of detecting the other OS es and configure in the boot menu. so dual boot will be taken care automatically.

But I want to keep reinstalling windows often.

many times we may have to keep reinstalling windows after certain period because of problems like virus, deteriorating performance etc and MBR will be gone and again need to install linux also!. wait!… there is quick fix

Use a Live CD or Live USB again and boot using that. Then access all drives in your file manager (it servers 2 purpose, it mounts all those partitions and you can verify the actual content of the partition). issue following command and make sure that linux partition is listing.

df -h

Please make a note of the current mount point of the partition where linux was originally installed. Let it be /media/disk. and suppose MBR is at /dev/sda (your main hard disk which is the boot item int he BIOS)

Now take the command prompt and get into root user. and invoke grup-install

$>su

$>grub-install –root-partition=/media/disk  /dev/sda

or you can run it though sudo

$>sudo grub-install –root-partition=/media/disk  /dev/sda

thats it!. its done. new GRUB installation information will be written to MBR and your system will be dual bootable.

Read More Post

STAY CONNECTED

Most Popular

Why Serviced Apartments Are the Perfect Choice for Long-Term Stays in Singapore – Everything You Need to Know
17 Dec

Why Serviced Apartments Are the Perfect Choice for Long-Term Stays in Singapore – Everything You Need to Know

If you’re heading to Singapore for a few weeks or many months, maybe for work or study or just to

Manifesting Your Dream Career: Finding Your Passion And Purpose
01 Aug

Manifesting Your Dream Career: Finding Your Passion And Purpose

Are you passionate about finding your dream career? Manifesting can help you align your career with your passions and purpose.

Revolutionizing Your Ride: Expert Auto Service At Carolina Auto Service
27 Feb

Revolutionizing Your Ride: Expert Auto Service At Carolina Auto Service

Finding a reliable auto service provider is paramount in the bustling world of vehicle maintenance and repair. That's where Carolina

Floratam: The Robust Grass Solution From Council Growers SOD
25 Jan

Floratam: The Robust Grass Solution From Council Growers SOD

Floratam grass, a popular St. Augustine variety, has become a go-to choice for homeowners and landscapers seeking a lush, durable

Carolina Mobile Autoservice: Your Go-To For Expert Brake Service Repair
25 Jan

Carolina Mobile Autoservice: Your Go-To For Expert Brake Service Repair

For vehicle owners, the braking system is among the most critical components for safety and performance. Carolina Mobile Autoservice, a

Safeguarding Your Property: Expert Water Damage Services By MBC Capital
24 Jan

Safeguarding Your Property: Expert Water Damage Services By MBC Capital

Water damage can significantly impact homes and businesses, often leaving a trail of destruction and disruption in its wake. Understanding