LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 12-02-2007, 09:02 PM   #1
MikRose
Member
 
Registered: Mar 2006
Location: Arizona
Distribution: Mint 19.2
Posts: 100

Rep: Reputation: 15
GRUB Reinstall


I had Ubuntu CE (7.04) on my primary drive, then updated it to 7.10. I received a CD from friends and couldn't view it as quickly as I wanted to by investigating Linux, so I took out the hard drive and installed another one identical to the first (IDE, 80G). I installed XP Home on that drive, used Windows Media Player to view the CD, then decided to put both drives in the computer. I put XP first, since Linux has no problem being a Slave, but didn't get a choice of systems when I rebooted. (bios is set to CD, IDE0, IDE1) I have tried all the posts I can find about using "fdisk -l", and then GRUB, root (hd1,0), then setup (hd0), but on re-boot still no luck with option of systems. Since I've played around with things, I'm ready to simply take out the XP drive and just use the Linux drive. How do I get the GRUB back on the drive since it won't boot? I have a SUPER BOOT I burnt, and a live CD for 7.04, but do not want to lose any information on the drive, just reinstall the GRUB. I'm cross-eyed from reading posts, and realize I've probably missed how easy this should be. At least I learned how to fix the mbr on my XP when I lost that temporarily! Thanks
 
Old 12-03-2007, 01:39 AM   #2
FredGSanford
Senior Member
 
Registered: Nov 2005
Location: USA
Distribution: Mageia 7 - Debian 10 - Artix Linux
Posts: 1,142
Blog Entries: 5

Rep: Reputation: 207Reputation: 207Reputation: 207
If you can use your Ubuntu CD to do an "upgade" rather than an install. Go through the process the same as an install, only don't choose install! Choose upgrade instead. It will give you the opportunity to install packages. just skip this step and it should take you to where you can update or reconfigure the boot loader. Redo this part, installing Grub to the MBR. Make sure you also have Windows in there as a boot choice. Follow through to the end and reboot. I've done this before, different distro, in a similar situation and it worked. Let us know how you come out. I hope this helps...
 
Old 12-03-2007, 05:59 AM   #3
atanwar
LQ Newbie
 
Registered: Nov 2003
Location: :PUNE, INDIA 411008
Distribution: redhat-6,7,9, fedoracore-1,2,3, AIX-5.1,5.2 , Tru64 5.1A, SUSE 10.0,ES9
Posts: 14

Rep: Reputation: 0
I am not sure about ubuntu... but try booting with recovery options by booting using ubuntu CD and then use grub-install with required options. it will update MBR on the disk.
check man pages for grub-install.

i myself got struck with similar problem few years back... it helped me to install grub.
 
Old 12-03-2007, 10:43 AM   #4
ronnybob
LQ Newbie
 
Registered: Mar 2005
Location: Fl.
Posts: 1

Rep: Reputation: 0
Grub Reinstall

What Happened to me was I removed the batt. from my box, and when I replaced it, it lost all it's memory, then when I booted an error 17 came up,and it would not boot. Go into the BIOS and boot area and see if the CD-rom is first and primary HDD is second, then stay in the boot area not the booting line up and check all hardware in this order, your primary HDD that has the O/S on it should be first,save and exit, try that and see what happens.

Last edited by ronnybob; 12-03-2007 at 10:48 AM. Reason: more detail
 
Old 12-03-2007, 12:27 PM   #5
pennyg
LQ Newbie
 
Registered: Nov 2005
Location: N. Az
Distribution: kubuntu 12.04
Posts: 8

Rep: Reputation: 0
SuperGrub

I haven't needed to redo my grub but this <http://supergrub.forjamari.linex.org/> claims to have what you need.
 
Old 12-03-2007, 01:05 PM   #6
Don1500
LQ Newbie
 
Registered: May 2007
Location: Corona, CA
Distribution: Gusty, Puppy 3.01
Posts: 12

Rep: Reputation: 0
Quote:
Originally Posted by MikRose View Post
I had Ubuntu CE (7.04) on my primary drive, then updated it to 7.10. I received a CD from friends and couldn't view it as quickly as I wanted to by investigating Linux, so I took out the hard drive and installed another one identical to the first (IDE, 80G). I installed XP Home on that drive, used Windows Media Player to view the CD, then decided to put both drives in the computer. I put XP first, since Linux has no problem being a Slave, but didn't get a choice of systems when I rebooted. (bios is set to CD, IDE0, IDE1) I have tried all the posts I can find about using "fdisk -l", and then GRUB, root (hd1,0), then setup (hd0), but on re-boot still no luck with option of systems. Since I've played around with things, I'm ready to simply take out the XP drive and just use the Linux drive. How do I get the GRUB back on the drive since it won't boot? I have a SUPER BOOT I burnt, and a live CD for 7.04, but do not want to lose any information on the drive, just reinstall the GRUB. I'm cross-eyed from reading posts, and realize I've probably missed how easy this should be. At least I learned how to fix the mbr on my XP when I lost that temporarily! Thanks
Here is a "How To" from the Ubuntu Forum:
http://ubuntuforums.org/showthread.p...GRUB+REINSTALL
If you can do this you're OK, if not then, like I did, you need to reinstall Ubuntu.

Last edited by Don1500; 12-03-2007 at 01:25 PM. Reason: add data
 
Old 12-03-2007, 01:22 PM   #7
thomas.hedden
Member
 
Registered: May 2006
Location: Carlisle, MA
Distribution: Ubuntu, Fedora
Posts: 60

Rep: Reputation: 16
> I put XP first, since Linux has no problem being a Slave,
> but didn't get a choice of systems when I rebooted.
It appears to me that the problem is that your computer is
booting off the XP drive first, which doesn't have GRUB,
so it won't give you a choice of OS. If you boot the Linux
drive first, then you'll get GRUB and then you should be
able to choose the OS. (First you will have to update GRUB
so that it knows about the XP installation. Some of the
other replies have suggested ways to do this. Also see:
http://ubuntuforums.org/archive/index.php/t-158075.html
If XP doesn't want to be on a slave drive, then you could
also try making it a master on the second IDE channel,
instead of a slave on the first one. But I would definitely
have the Linux installation with GRUB be the first to boot.
 
Old 12-03-2007, 06:56 PM   #8
w0orw
LQ Newbie
 
Registered: Jan 2005
Location: NW Illinois USA
Distribution: PCLOS, Mint, Knoppix
Posts: 6

Rep: Reputation: 0
Here is the fix of last resort in case you need it -
I have an old AMD which I use for testing various O/S and hardware configs.
I have two hard drives installed. I run the red and yellow wires to each
hard drive thru a double pole toggle switch. This permits me to activate
either or both hard drives. It is not necessary to switch the IDE cables.
Just remember not to play with the switches unless the PC is off.

It works for me....
 
Old 12-04-2007, 12:34 AM   #9
MikRose
Member
 
Registered: Mar 2006
Location: Arizona
Distribution: Mint 19.2
Posts: 100

Original Poster
Rep: Reputation: 15
Grub Install

Thank you all for the suggestions! FredgSanford = I don't have a choice for "upgrade" on any of my Linux CDs.
Atanwar = I have done that many times. I can find the stage1, then try to move it to other drive, but so far no luck.
ronnybob = Done that and also experimented with all possibilities I can think of. Now Boot is CD/IDE-0/IDE-1.
pennyg = I have burned the Supergrub on a CD, but when I have it in and boot to CD, I get all of the information to boot in DOS and then the screen stops for me to enter something after (A>) I think it is, but I don't know what to type in and Help doesn't help!
Don1500 = I've done most of the steps listed, but will go through them again. thomas.hedden = I have CD first boot, then XP (IDE-0), then Linux (IDE-1). Whether I boot to IDE 0 or IDE 1 first, there is no Grub that shows up. I think I deleted it from Linux drive per my original post and then overwrote it when used fixmbr on XP drive. Getting Grub back on Linux, in order to move it to XP's mbr is my latest issue. But at this point, if I can just get Grub back on the Linux drive, I may just boot to it all the time unless I need an XP function. I have switched the Hard Drives around on the cable also with no luck. Also, have tried many solutions listed in the website you gave, but will filter through the ones I haven't. wOorw = I need Grub on a disk first, then I can wire a switch if necessary.
 
Old 12-04-2007, 06:56 AM   #10
pjeeanah
LQ Newbie
 
Registered: Dec 2006
Posts: 13

Rep: Reputation: 1
I might suggest that you remove the XP disk and put the disk containing linux only on your machine. Then you can boot with the ubuntu CD and select repair. I think with this you can get the linux mbr back on the disk. After getting the linux mbr you can get the linux to boot. You can then add your XP disk and update your menu.lst in linux to have an option for XP.
 
Old 12-04-2007, 11:51 AM   #11
TeddyB
LQ Newbie
 
Registered: Oct 2007
Location: Cleveland, OH
Distribution: Debian Etch, Knoppix for troubleshooting
Posts: 17
Blog Entries: 1

Rep: Reputation: 2
Lightbulb Using Knoppix for system rescue.

Ok, I have been looking into a similar issue myself, due to the fact that I currently have a corrupt Windows partition on a system that also houses Debian. As anyone that has played with duel boot knows, Windows doesn't play nice. Now I don't know how the following will be affected by your multiple drives situation, but this is how I aim on dealing with the issue.

Your un-installation of Grub should only be in the MBR itself, the Program should continue to exist on your system. So my approach is to take a Knoppix disk ( http://knopper.net/knoppix/index-en.html ), or if you have a preferred Live CD, and boot that.

The beauty of a Live CD is that it loads a completely functional copy of Linux from RAM. You can then set your Partitions to writable (if need be), and use the command 'chroot' to change the recognized root file system for the existing instance of Linux. i.e. What your doing is running the Knoppix OS in your RAM but using your local root file system. You can then mount your additional file system partitions if your file system is divided as such (i.e. /home /usr/ etc.)

(More information on this can be found here: http://troubleshooters.com/linux/kno...pix_rescue.htm )

Once you have your file system mounted. You should be able to call up the GRUB Command Line Interface from your shell. The following help file discusses this in detail.

( http://www.gnu.org/software/grub/manual/grub.html )

I think that both sections 3.3 as well as 15.2 & 15.3 have a bearing on this. Section 3 mentions the best way of installing Grub is though use of a Boot Disk, With instructions for creating both Floppy and CD-Rom Boot Disk. 3.3 Talks of using the grub-install command, and I tend to Favor section 15, Invoking GRUB natively and using the instructions in 3.2

This all seems kinda daunting and with my ultra-limited experience, I don't dare suggest the method you should use to reinstall grub. But the information is all there for you to research, and maybe one of our resident Experts will be able to clarify it if need be.

I hope this helps;
TeddyB
 
Old 12-04-2007, 04:04 PM   #12
MikRose
Member
 
Registered: Mar 2006
Location: Arizona
Distribution: Mint 19.2
Posts: 100

Original Poster
Rep: Reputation: 15
Thanks....pgeeanah = I have several CDd of Linux Ubuntu versions: Knoppix, 5.10, 6.06, 7.04, CE, (and the Linux drive I'm trying to access again had CE updated to 7.10), but none of them have the option to "repair". That would be great if I could find one that did. One of them allows me to type in "rescue", but when I try to follow the commands I have no positive results! TeddyB = I just tried having only the Linux drive in earlier, and tried to "find /grub/stage1" using most of my CDs, but none could find the file. So, if I investigate further with what you tell me about getting grub back on the drive. I am just so chicken about losing my files, and not real familiar with using "commands", that it takes a step by step approach, and much of what I've read leaves some of the obvious steps out (at least to them) and I run into a brick wall. Of course my medications don't help...! I'll let you know.
 
Old 12-04-2007, 07:20 PM   #13
TeddyB
LQ Newbie
 
Registered: Oct 2007
Location: Cleveland, OH
Distribution: Debian Etch, Knoppix for troubleshooting
Posts: 17
Blog Entries: 1

Rep: Reputation: 2
I hope it helps Mike,

Grub's Stage Files should be located in /usr/lib/grub/i386-pc under your Linux File System.
 
Old 12-05-2007, 11:56 AM   #14
Duck2006
Member
 
Registered: Sep 2006
Distribution: Ubuntu 8.04 Hardy Heron LST
Posts: 346

Rep: Reputation: 33
Stage1 is in
/boot/grub/stage1
in ubuntu
 
Old 12-07-2007, 05:10 PM   #15
Spirals
LQ Newbie
 
Registered: Jun 2006
Posts: 29

Rep: Reputation: 15
reinstalling grub - on Debian

The following fix worked for me aster a lot of reading and experiment. I ran into this problem after I suffered a corrupted XP installation. I have always installed XP on C: drive (hda1) and Linux (various flavors) on the hdd2 (with hdd1) for swap and hdc1 to hdc4 for "mounted on" working/data partitions.
To restore grub: I booted Debian running in ram, from CD and (presuming your Linux installation on the hdd2 is OK) type: grub <hit return>, on the grub command line type: root (hd2,1) <hit return>,then type: setup (hd0,0) <hit return>, finally type: quit <hit return>. Your finished. Shutdown and fter a cold reboot (power off) I get the grub menu up. Its that simple! Hope this helps.(dja.)
 
  


Reply

Tags
boot, grub, master, mbr, multiboot, record, systems, ubuntu, windows, xp



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub error 17, and wont reinstall using grub-install! chiefreborn Linux - General 6 06-06-2007 10:29 AM
Reinstall grub jaygee02 Ubuntu 4 01-22-2007 02:01 AM
reinstall windows, reinstall GRUB too? leupi Linux - Software 1 05-07-2005 10:50 AM
Reinstall grub rejser Linux - Software 3 04-14-2004 03:19 AM
reinstall grub sau2004 Linux - Newbie 3 01-31-2004 10:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 01:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration