LinuxQuestions.org
Visit Jeremy's Blog.
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, 07:10 PM   #1
Peatmoss
Member
 
Registered: Nov 2007
Location: Vancouver
Distribution: Ubuntu 7.10
Posts: 43

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, 07:46 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,751

Rep: Reputation: 272Reputation: 272Reputation: 272
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, 01:03 PM   #3
Peatmoss
Member
 
Registered: Nov 2007
Location: Vancouver
Distribution: Ubuntu 7.10
Posts: 43

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, 05:43 PM   #4
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Ubuntu 12.04 X86_64
Posts: 958

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

/dev/hda is the ide primary master
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


All times are GMT -5. The time now is 10:16 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration