LinuxQuestions.org
Visit Jeremy's Blog.
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 11-04-2013, 01:19 PM   #1
Daryst
LQ Newbie
 
Registered: Nov 2013
Posts: 4

Rep: Reputation: Disabled
Grub rescue console after restart


Hi There,

I am running a Linux based media server from a USB flash drive. Last night I had to restart my server due to a service not running properly. After the restart, it would not boot anymore and go straight into the Grub Recovery console.

I tried to boot normally by finding the active partition in the grub recovery console and figuring out which one to choose. But all of the options give back a "unknown file system" message.

I then tried to start it up using a Grub recovery disk and managed to start it up that way (only once though), but when I ask it to detect any OS, it gives me 4 entries of Unknown file system before showing a menu to boot into a version of Linux. I am not entirely familiar with what version, but I am using the below recovery software.

http://www.supergrubdisk.org/

Can anyone assist?
 
Old 11-04-2013, 02:49 PM   #2
kbscores
Member
 
Registered: Oct 2011
Location: USA
Distribution: Red Hat
Posts: 259
Blog Entries: 9

Rep: Reputation: 32
GRUB will automatically invoke its shell at boot time if it cannot locate its configuration file. This typically happens if the file is renamed, moved, or deleted.

A couple useful things to keep in mind -
When you are in grub menu you can swap root(/) directory

Code:
  grub> root (hd0,0)
hd0,0 = /dev/sda1
hd0,1 = /dev/sda2
hd1,0 = /dev/sdb1
...etc

First number = disk
Second number = partition

you can use find command to find grub.conf, but it has to be the full path as if it were the root disk.

Example: If /dev/sda1 = /boot
and the config file exists in /boot/grub/grub.conf
then to search for it you'd type"

Code:
 grub> find /grub/grub.conf
It will return the disk it is located on.

Once you have the disk - let's say it returns (hd0,2) - verify the contents by doing:

Code:
grub> cat (hd0,2)/grub/grub.conf
If everything looks good you can set it as the config file:

Code:
grub> configfile (hd0,2)/grub/grub.conf
If it does not find config file:
Try booting manually by essentially doing what the config file does...
Note: (hd0,0) would be whatever the boot partition is, kernel will be kernel version you are using, initrd will be the initrd you are using
- - if the proper files do not exist this will not work and kernel and initrd will most likely need to be rebuilt.

Code:
grub> root (hd0,0)
grub> kernel /vmlinuz-2.6.32-358.el6.x86_64 ro root=/dev/mapper/BASE-ROOT
grub> initrd /initramfs-2.6.32-358.el6.x86_64.img
grub> boot

Hopefully this helps some?
 
Old 11-05-2013, 12:07 PM   #3
Daryst
LQ Newbie
 
Registered: Nov 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
Hi,

thanks for getting back to me. I tried the above mentioned options, but all I am getting back is the message "unknown file system"

When I enter "ls" the following result comes back

(hd0) (hd0,msdos5) (hd0),msdos1) (hd1)

I tried it on every above return, but all it gave back is the "Unknown file system"

One thing I noticed from the commands you mentioned is that it shows (grub>) whereas I only have (grub rescue>) Are all commands then still valid?
 
Old 11-05-2013, 03:42 PM   #4
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,509

Rep: Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491
Quote:
Last night I had to restart my server due to a service not running properly.
What service? I don't see how that would create the problem you are reporting and you would need to provide more detail on what you did.

The commands kdbscores suggests above are for Grub Legacy, the information in your last post indicates you are using Grub2. It shows Grub installed to the mbr of sda and sdb as well as Grub files on sda1 and sda5. Is there any reason you do not indicate which Linux distribution you are using? If you have a Linux install on your computer which you can boot, I would suggest you google "bootinfoscript", go to the site and read the instructions and download and run the script. If you can't determine the problem, post the output, a results.txt file.
 
Old 11-05-2013, 04:00 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
Some help here. http://www.supergrubdisk.org/wiki/Howto_Fix_Grub
 
Old 11-05-2013, 04:31 PM   #6
patrick013
LQ Newbie
 
Registered: Dec 2012
Posts: 25

Rep: Reputation: Disabled
Hi,

Get the rescatux.iso from SuperGrub.

It has SuperGrub2Disk and boot-rescue-disk
both on the iso. Use dd to put it on the
flash drive.

Run SuperGrub2Disk to boot something, or the
boot-rescue-disk program to just replace grub and
run update-grub automatically.


patrick
 
Old 11-06-2013, 04:10 AM   #7
Daryst
LQ Newbie
 
Registered: Nov 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
The service that I restarted was SABnzb, I did not suspect this had anything to do with it, hence me not mentioning it in detail. As for the Linux distribution. I am running OpenMediaVault (http://www.openmediavault.org/) Debian 6 squeeze

I tried the grub2 recovery disk, but it did not find any grub2 installation.
 
Old 11-06-2013, 09:35 AM   #8
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,509

Rep: Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491Reputation: 2491
If the above suggestions don't help, boot the Debian or any Linux Live CD, go to the site below and read the instructions, download and run the bootinfoscript. This should provide detailed information on your drives/partitions as well as boot and other related files in a resultx.txt file.

http://sourceforge.net/projects/bootinfoscript/
 
Old 11-08-2013, 06:39 AM   #9
Daryst
LQ Newbie
 
Registered: Nov 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
I will give the live cd's a go and see if I can sort it out. There is luckily no rush as the data on the raid array is unaffected by this problem.

Thank you all for your help.
 
  


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: unknown filesystem, grub rescue magnecticfield Linux - Newbie 28 07-30-2013 03:35 AM
Grub File Not found Grub Rescue Error on External Sata to USB Drive imayneed Linux - Newbie 11 08-22-2012 02:56 AM
GRUB error: unknown filesystem, grub rescue nnjond Linux - Newbie 4 12-26-2011 07:46 PM
Problem with GRUB: partition not found. Grub Rescue?? genoboss Ubuntu 117 01-04-2011 07:56 PM
Need to (re)install GRUB: fedora c4 rescue cd (and GRUB) unable to see the harddisk whencat Fedora 4 03-05-2006 02:01 PM

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

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