Advanced

Fix / Restore GRUB Boot Loader

Posted by hotice on · 22 comments
Web Upd8
Mail this story
Print this story

Unfortunately, maintaining a multi-boot configuration like this can be a pain, especially if you later install an operating system which overwrites the GRUB boot loader you had in place (such as a version of Windows). If your boot loader is overwritten, you could be left with no choice but to boot the most recently installed OS. In this tutorial, I will show you how to restore an overwritten copy of the GRUB boot loader by using a Linux live CD. In this example, my master GRUB installation is on a Kubuntu 8.10 installation, and I’m using an older Kubuntu 8.04 Live CD I have lying around. This tutorial does require you to have some understanding of how your multi-boot system operates, disk partitions and using the command line. If you are not confident, perhaps find a friend who knows Linux more intimately to do this process.

Unfortunately, maintaining a multi-boot configuration like this can be a pain, especially if you later install an operating system which overwrites the GRUB boot loader you had in place (such as a version of Windows). If your boot loader is overwritten, you could be left with no choice but to boot the most recently installed OS.

In this tutorial, I will show you how to restore an overwritten copy of the GRUB boot loader by using a Linux live CD. In this example, my master GRUB installation is on a Kubuntu 8.10 installation, and I’m using an older Kubuntu 8.04 Live CD I have lying around.

This tutorial does require you to have some understanding of how your multi-boot system operates, disk partitions and using the command line. If you are not confident, perhaps find a friend who knows Linux more intimately to do this process.

Full Story

  Nav
» Read more about: Story Type: Tutorial; Groups: Linux

» Get new stories by e-mail: nightly or as they are published

« Return to the newswire homepage

  Related stories
» More like this

Comments (22)

2 earlier comments in the full thread.

I still do. I keep Winders around to play games. Sadly, few of the titles I want to play are available for Linux and they often don't run on Wine.

I do buy Linux games though when I can. I bought the game "X2:The Threat" for WIndows a while back, lost it, then re-bought it again as a budget-bin title. I then learned that it was being ported to Linux, but by then I had already bought it twice for Windows, so there was no point in buying it again. Later I heard that the sequel, X3, was being ported to Linux, so I held off on purchasing that. So now I have the urge to play a space sim again, and will be buying the Linux version of X3, even though it's more expensive than the Windows version.

But I have not destroyed my boot record in a long time. Usually an installation of any variant of Windows will accomplish that wonderfully, so my usual rule is to install Windows first, then the Linux side.
I haven't multi booted in years. I only keep Windows around on a VM so I can provide support, mostly to support people to move off Windows, these days, and in case I need to do some emergency programming on one or another of our webs applications.

I don't play games much, the very occasional FPS, and Solitaire while I'm waiting, but only on Linux. I'm not interested enough to actually buy games.
I don't know if I've ever not multibooted.

I keep Windows on every machine just in case. I'm not the only one who uses the computers, after all. I usually have at least two or three Linux distros installed as well. Just in case one distro doesn't do what I need, I can try another that has either newer or older software or just for some reason might do what is needed.

I always use the chainloader command in GRUB so that each distro can update itself after a new kernel is installed.

I've seldom had problems with GRUB and it is really easy to fix any problems, at least the ones I've encountered.
My company supplied laptop came with xp, and I'm obliged to keep that OS on the drive, so that one's multiboot.

OTOH my own linux boxes run linux. full stop. We do have a mac or two for the occasional legacy proprietary app (tax cut for example) and the macs are also single boot.

Any hypothetical need for ms doze would be satisfied in a VM, which could be shut down when finished with whatever chore necessitated its use, freeing up RAM and CPU cycles for more interesting work.
I know that all the cool kids are virtualizing, but I still prefer multiboot for testing. I get a proper native environment without additional hassles for networking and hardware drivers. The one advantage of a virtual guest is making screenshots of booting and installations.
I have a laptop that duel boots OpenSUSE and XP. I don't use it very much but I split my time between the OS's pretty evenly though. Other than that I my main desktop only has PCLOS on it. I have another PC that has Debian testing and XP on it but I haven't even turned it on in almost a year..
good grief, do I multi-boot, lappy has sabayon and funtoo on it. Desktop has sabayon4 32 bit, funtoo 64 bit, XP64, and 2 dedicated partitions for flavor of the day to play with. From lots of experiance playing with grub, this little how to is the hard way to do things.

I keep a master for grub, edit that to add or remove new distros and if I have to go in and tell grub where to locate it.

# grub

> root (hdx,x) **this is where your /boot/ is > setup (hdx) or (hdx,x) **this is where your stage1 is > quit ** all done, go play

I mean seriously, how hard is that?
@azerthoth

Those three lines are how I do it too. Grub is not something to fear.
I don't own a copy of Windows, so if I was multi-booting it would be if I wanted to check out a different Linux distro or maybe one of the *BSDs. Possibly even OpenSolaris on a lark...
Opensolaris has been ported to lark? why wasn't I informed?
I multiboot. I have a laptop and a desktop, and at various times I have to boot them up.
If having two versions of the kernel in lilo is multi-booting, then yes, I do multi-boot ;)
jezuch, as in one custom-built kernel, and one stock kernel to fall back on in case you screwed up the custom build?
No need for custom kernels even. I always keep a generic i386 kernel installed just in case I need to move my hard disk to a different machine for some reason.
Most of my systems are plain old single boot.

My laptop multiboots: Gentoo (of course) BackTrack (in case I feel like playing with it) Ubuntu (the stock install which I don't think I've update much...) Memtest86+ Sbootmgr XP Pro (for some games that don't run in Wine/crossover. argh!)

Yes, I have hiking boots, garden boots, and nice shiny leather Western boots.
I've got hiking boots and snow boots. I also have my every day shoes, and my dress shoes, and I always wear two at a time. So I am multiboot and multishoe.
Quoting:jezuch, as in one custom-built kernel, and one stock kernel to fall back on in case you screwed up the custom build?


Exactly, except that instead of a stock kernel I have a known-good older version of the custom-build one.
Same here.

Of course, I always tweak my kernel configs, but always keep at least one older version just in case I totally screw up a build and break boot. hehe.

Post a comment

A free account is needed to post. Write your comment here first: your text is kept in this browser while you sign up or log in, and is waiting for you when you come back.

Your message:
|||||
10
Markdown: **bold**, *italic*, [text](https://link), - lists, > quotes, $x^2$ for math. Formatting help

Sign up and post (it is free)  or  Log in and post