LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-06-2008, 06:10 PM   #1
Peatmoss
Member
 
Registered: Nov 2007
Location: Vancouver
Distribution: Ubuntu 7.10
Posts: 44

Rep: Reputation: 15
Need Help Fixing Grub


Hi All,

I installed PcLinuxOS release 2007 on my IBM T21 and had some problems with the partitions on the hard drive. So I used cfdisk to start from scratch, creating 3 partitions. /dev/hda1 is mounted as /boot. Right at the end of the live CD install, a window popped up and asked some questions about whether to use Grub or Lilo. It also presented some choices for where to install Grub and the choices were:

/dev/hd2 - IBM<extra stuff I don't remember>
/dev/hda1
etc.

The default was the first one and I should have left it, but instead I changed it to the /dev/hda1. The installation completed and I rebooted the machine. Now all you get after the bios launches disk is:

GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB..... over and over until infinity

I think there should be an easy way to fix this without going through the Live CD installation all over again and that's why I'm posting this. I think the solution involves booting something like Damn Small Linux (Knoppix won't run on this machine, but DSL does) and editing something on the disk. Am I on the right track here?

If so, two practical questions:

What would I use to edit the disk to change from /dev/hda1 back to the /dev/hd2 - IBM...?

How do you mount the hard drive after DSL is booted and running?


BTW, this is an experimental machine for learning purposes so there is no need to worry about data loss. It would be very easy to simply re-install the OS from scratch, but I was hoping to gain some insight into partitions, booting, etc. with this posting.

Thanks

Peatmoss/
 
Old 02-06-2008, 06:46 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,336

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Quote:
Originally Posted by Peatmoss View Post
Hi All,

I installed PcLinuxOS release 2007 on my IBM T21

I think there should be an easy way to fix this without going through the Live CD installation all over again and that's why I'm posting this. I think the solution involves booting something like Damn Small Linux (Knoppix won't run on this machine, but DSL does) and editing something on the disk. Am I on the right track here?
Yes, you are on the right track. Check your PcLinuxOS Live CD. Most install CDs serve more than one function. It may have a function to boot into an installed system and/or a function to act as a rescue CD.

Use the Live CD to boot into your new system, log in as root, and issue the command:

grub-install /dev/hda

---------------------
Steve Stites
 
Old 02-07-2008, 12:03 PM   #3
Peatmoss
Member
 
Registered: Nov 2007
Location: Vancouver
Distribution: Ubuntu 7.10
Posts: 44

Original Poster
Rep: Reputation: 15
Hey JB,

Thanks for the tip. I tried it and it didn't work, but I think it's because I didn't correctly guess what directory to use. When I ran the

grub-install /dev/hda

command, it prompted me to use the

--root-directory

argument. I incorrectly(?) used the /boot/grub folder. The program took several minutes before it finished. The device map it found had

/dev/fd0, and
/dev/hda

and suggested I change it if it was incorrect. I left it as-is and proceeded to reboot. This time, instead of all the GRUBGRUBGRUB's appearing, it hung after displaying the message

Grub stage 2...

I did a fresh install again and compared the device map in /boot/grub with before. This time, only

/dev/hda

appears in it. So I'm guessing the presence of the /dev/fd0 in the first line is what caused the failure. I might go back and follow the incorrect procedure again to see if I can fix it manually, but just wanted to update this thread and close it off.

Thanks

/Peat
 
Old 02-07-2008, 04:43 PM   #4
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Manjaro
Posts: 963

Rep: Reputation: 36
/dev/fd0 is your floppy drive,

/dev/hda is the ide primary master
 
  


Reply



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 Need Help fixing grub Alan87i Ubuntu 2 05-29-2007 12:35 PM
need help fixing grub Superme Linux - Software 3 02-21-2006 04:23 PM
Need help fixing grub qwerty Linux - Software 3 02-13-2006 08:51 PM
Fixing GRUB 60cents Fedora - Installation 17 04-17-2005 10:52 PM
fixing partitions in GRUB aryth Linux - Newbie 12 08-23-2004 12:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:01 AM.

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