Tip & How-To about Computers & Internet

When a Windows install kills your dual boot to Linux

Distro installers are pretty good at identifying an existing Windows installation and setting up dual booting, but should you have to reinstall a spyware-riddled Windows install you'll find that your machine boots straight into Windows and that your Linux installation is gone!
Don't panic: all Windows has done is overwrite the Grub bootloader with its own equivalent, removing your boot menu. All your data is still there - you just need to reload the bootloader configuration into the disk's master boot record (MBR). You'll need to boot from a Live CD to do this, this, then open a terminal and run

sudo grub-install /dev/sda

This assumes you have everything installed on the first (or only) hard drive. Grub-install will usually make a good job of detecting a Grub installation and set things back to rights. If it doesn't, you'll have to do it manually, which is a lot easier than it sounds. Run sudo grub to enter the Grub shell. then run

find /boot/grub/stage1

...to determine which partition holds the Grub files. If Windows is on the first partition Grub is likely to be on the second, in which case this command will return something like (hd0,1). Now set Grub up with

root (hd0,1)
setup (hd0)
quit

The first command identifies the boot partition, the second writes the bootloader to the MBR and then you leave the Grub shell. Grub is only concerned with the location of /boot, so if you have a separate /boot partition, omit the /boot part from the find command.

Posted by on

Computers & Internet Logo

Related Topics:

Related Questions:

1 Answer

Can I override the bios at startup so that it will recognize a new hard drive - for linux?


There should be no need to play around with your bios settings. Linux will install on a brand new hard drive as the sole operating system, or on an existing hard drive alongside Windows without any problem.

If you haven't already got a Linux distro, have a look at
http://www.ubuntu.com/download/desktop

Download whichever version of Ubuntu you prefer (LTS- the long term support version is recommended).

When the .iso file containing the operating system had downloaded, burn it onto a dvd, or install it on a usb drive.

Insert the dvd into the drive and restart or switch off/switch on the computer. The dvd will then kick in and offer you the choice of trying Ubuntu without installing, or a full install.

If you're using a new, empty hard drive just follow the on screen instructions and Ubuntu will install as the sole operating system.

If you already have Windows on your hard drive Ubuntu will give you the choice of either erasing Windows or installing Ubuntu alongside Windows. It's your choice.

Installing Ubuntu alongside Windows creates a dual boot hard drive. At start up you just choose which OS to use - Windows or Ubuntu. If creating this dual-boot system Ubuntu puts a (Linux) boot loader into the Windows OS so that Linux is recognised.

If you save the Ubuntu file to a usb drive you then have to change the bios settings so that your computer uses USB as the first boot device. Then restart your computer so that it boots in from your usb .. and Ubuntu will begin installing.

Whichever you use - dvd or usb - during the installation process Ubuntu will ask you how many GB of hard drive space it should use? You do not need to physically partition the hard drive. Linux will do it for you.

If it's a desktop PC you are using with Windows on the first hard drive and are fitting a second hard drive to install Linux on, or have installed Linux on the second hard drive .. and find that Linux doesn't appear at start up, it's because there's no Linux boot loader in Windows.

I quit using Windows many years ago.

override-bios-startup-will-recognize-new-mcgwfbeeztshkxy1nyom2hsg-1-0.jpg

Nov 01, 2015 | Everex IMPACT GC2500 PC Desktop

3 Answers

how to install linux fedora 7, already i am using windows 7, now i want to use dual os's , please tell me how to install linux.


WARNING: I will not be responsible for any data loss that occurs. It is recommended to backup your hard disk to external media before commencing any of these operations. 1. Download and burn the Fedora LiveCD. It is recommended that you use the latest version, Fedora 14, instead of 7, but you can use Version 7 anyways. 2. Boot up with the Fedora LiveCD. Select Install. 3. Follow the instructions displayed onscreen. When you reach the partitioning screen, you will need to resize your Windows partition. Resize it to a reasonable size (1024MB =1GB). Leave at least 5GB for Fedora to install. 4. After resizing, select the "Use Free Disk Space" option, and continue installing. 5. Your system will be installed with Fedora and the GRUB bootloader. The GRUB bootloader will allow you to boot into both Windows and Fedora.
I hope this post helps you. I appreciate your vote very much!

Mar 03, 2011 | fedora Linux Operating System

1 Answer

I want to install RHEL3.0 in SATA DeskStart HD using MSI SATA MB, but not detecting at OS installation time. HOW i can detect, Pls help me!!!!


You need to create a space for which to install Linux. That likely means resizing Windows. Partition Magic is a good Windows utility to accomplish this, although there is a Linux version called Gaprtedthat will do essentially the same thing. You download the Gparted live cd, burn to disk, and run it from your computer. You must go into "setup" and set your Bios to boot from CDROM before booting the Hard Drive. Once booted, follow the on screen instructions. Resize Windows, (but NOT before a thorough defrag of your Windows drive), and create a "blank space" for Linux. Afterward, boot your Linux distro, (RedHat 9 was a great distro, but a newer version of a Red Hat based distro would serve you better, sayCentOS or Fedora Core), and follow the online instructions. Good Luck!

Sep 25, 2008 | MSI 945GM2 H-F (816909015911) Motherboard

3 Answers

Installing XP over preinstalled Vista


You can Install XP simply by inserting the Installation Disk and running the Install Program. When asked where you want to install it select C:\ and let it remove the existing Operating System.

PeepnLklown is correct that this MAY void your Warranty so check this out first. If this is not a problem, install XP as described.

As regards the Drivers, it is IMPORTANT to have the correct Drivers FOR THE OPERATIING SYSTEM INSTALLED, all your devices should have XP drivers listed on the Manufacturers sites - so Identify the components and download the drivers from the manufacturers site (this may not be Toshiba) before you install XP (to make sure that you will have the XP Drivers for the devices).

To identify the Devices - open Device Manager (If I remeber correctly this can be found in Control Centre under Administrative Tools) and open each of the devices which will display the manufacturer and model number of each device. Write these down and do a Google search with the following string:

(brand Name) (Model number) +driver

This should take you to the manufacturers Support site where you can download drivers. Check to see that XP is listed as one of the Operating Systems. Download the Driver and (when you have them all) burn them to a disk.

Install XP and when asked for the drivers, direct it to the disk you have burned to find the drivers. The DVD Burner may need to be searched for on the Internet (after you have Installed XP) before you can use this device to read the Disk.

Good luck.

Apr 14, 2008 | Computers & Internet

Not finding what you are looking for?

132 people viewed this tip

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Doctor PC
Doctor PC

Level 3 Expert

7733 Answers

kakima

Level 3 Expert

102366 Answers

David Payne
David Payne

Level 3 Expert

14161 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Loading...