LinuxQuestions.org
Register a domain and help support LQ
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 07-10-2011, 02:46 PM   #1
evsam
LQ Newbie
 
Registered: Jul 2011
Posts: 7

Rep: Reputation: Disabled
Booting problem with Grub


Hello All,
My system refuses to boot after a power failure.
It boots to Grub prompt after starting Stage2.

The power failure resulted in the boot partition being trashed. No files could be read.

I have tried many things to resolve, but to no avail. Here is what I have tried:

Used Knoppix Live CD and disk utils to try and recover the files. All failed with unknown partition type. Knoppix Live CD does not support virtual disks (I have LVM2 as main vol) so now using Fedora Live CD.

I then used disk utility to name the boot partition 'boot' and ext3 type. This seems to resolve the problem with the disk utils but still had the same boot problem.

I have managed to add a second disk and copied all the files from the LVM2 volume (os files and data).

Tried grub_install from live cd but same result. Interestingly, I could not find grub.conf file.


Questions
As the LMV2 partition is intact, as far as I know, are the boot partition files stored anywhere on it?

Is there anyway to get this working without a full install?

I do not have the original install disk, as the system was setup 3+ years ago by others who cannot be traced. Indeed, I find it hard to ID the version of Linux used, but think it was Red Hat.

Any help is appreciated.

Evsam
 
Old 07-10-2011, 02:54 PM   #2
alfredo10
Member
 
Registered: Sep 2010
Location: Algarve
Distribution: Linux Multiboot
Posts: 295

Rep: Reputation: 15
Hi!
With a SuperGrubDisk you can start Linux or repair Grub:
http://www.supergrubdisk.org/
alfredo
 
Old 07-10-2011, 03:22 PM   #3
evsam
LQ Newbie
 
Registered: Jul 2011
Posts: 7

Original Poster
Rep: Reputation: Disabled
Hello Alfredo10,
Thanks for your quick reply.
I wish I had asked the question earlier before messing around. Tried the SuperGrub Disk but the following were returned (erros only) all others were yes or succeeded.

checking if "/boot/grub/stage1" exists... no

findf /boot/grub/menu.lst /grub/menu.lst /boot/grub/grub.conf /grub/grub.conf

Error 15: File not found

Is there anyway to create the above files? Should these files exist in both locatons /boot/grub and /grub?

Thanks again
Evsam
 
Old 07-10-2011, 04:54 PM   #4
qrange
Member
 
Registered: Jul 2006
Location: Belgrade, Yugoslavia
Distribution: Debian stable, amd64
Posts: 805

Rep: Reputation: 32
grub.conf is a text file. it lists operating systems and similar (grub menu items). you could create it manually. but perhaps its better to do it with update-grub command. you might need to chroot first.
you should state the OS and grub version.
btw, it might be easier to reinstall the whole thing.
 
Old 07-10-2011, 05:07 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,931

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
If your /boot partition is trashed and you can not read or recover any files from it then restoring grub will not fix your computer. /boot contains the kernel files which are not stored anywhere else. Did you try running fsck on the /boot partition? I suspect it is unrecoverable.

Since you can access / see if you have a file called /etc/fedora-release, redhat-release or similar. The contents will tell us the version.
 
Old 07-10-2011, 06:02 PM   #6
evsam
LQ Newbie
 
Registered: Jul 2011
Posts: 7

Original Poster
Rep: Reputation: Disabled
Hello Grange,
I was able to manually create grub.conf but as Michaelk mentioned, this did not help as kernel files were missing.

Re-installing is the very last option, as I have no idea how to install and configure the SQL database that was running on this machine.

What I have done:
Attached an old IDE disk to the machine and install Fedora on it.
Copied all files from the new install to original boot partition.
Edit grub.conf as best I could for a single drive.
Copy all files from LVM2 volume to IDE disk (glad this was safe).
Shutdown and remove the IDE disk and reboot hoping this would do the trick. Did not work, got the Grub prompt but does not say 'loading Stage 2 anymore.

Used supergrub disk and manage to get the system to boot (part way), discovered:
Red Hat Enterprise was originally installed.
Red Hat 3.4.6-2 Linux ver 2.6.9-42.EL (got these from conf files).
On booting Fedora/Red Hat (call it Fedora from now on) discovered unclean shutdown and checked /boot but discovered an superblock error.
Now prompting for root password to run disk utils. I do not have, of course.

It seems this disk in not reliable and needs replacing.
So looking at a new install the question I have is, having a backup of the whole hard disk with database how can this be recovered to put on a new install?

Thank Michael for your response.

evsam

Last edited by evsam; 07-10-2011 at 06:16 PM.
 
Old 07-11-2011, 08:37 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,931

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Do you know the database? mysql, postgresql Oracle etc.
The root password should be the one created when you installed Fedora.
 
Old 07-11-2011, 01:47 PM   #8
evsam
LQ Newbie
 
Registered: Jul 2011
Posts: 7

Original Poster
Rep: Reputation: Disabled
No, I don't know which database.
Looking at the files on the disk there are MDB2 files but I am not sure if this is a database server.
I can see many php files.

Do you have any hints on where to look for database files?

Evsam
 
Old 07-11-2011, 02:07 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,931

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Look in /var/lib for mysql or postgresql directories.
 
Old 07-11-2011, 03:11 PM   #10
evsam
LQ Newbie
 
Registered: Jul 2011
Posts: 7

Original Poster
Rep: Reputation: Disabled
Hello Michael,

Found mysql directory in /var/lib
I will attempt to download and install.
Ev
 
  


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
[SOLVED] Problem Booting With GRUB TooTall Ubuntu 17 03-22-2011 10:29 PM
GRUB booting problem edM Slackware 17 10-13-2007 11:08 PM
booting problem with Grub! ajroberts Ubuntu 2 04-27-2006 08:17 AM
Problem With Booting XP using GRUB bowb4steve Linux - Newbie 2 10-28-2004 09:25 PM
RH 9 Problem Booting with Grub scottym Linux - Distributions 1 08-03-2003 11:54 PM


All times are GMT -5. The time now is 02:36 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