LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-23-2011, 07:35 AM   #1
hagel
LQ Newbie
 
Registered: Mar 2011
Posts: 3

Rep: Reputation: 0
GRUB error: Unknown Filesystem


Hello,
I installed Crunchbang two days ago and it's been a fun learning experience. Now yesterday I started having problems with GRUB (I assume).
I installed Crunchbang on a secondary (slave) drive with the newbie setup (no partitions or whatever it was, it basically did it all for me and used all the space on the drive). I have Windows XP on my main drive(hdd-0) and Crunchbang on hdd-1.
I set it to boot on hdd-1 first because I want grub to boot Crunchbang. First problem is that windows doesn't show up in the menu. Not a biggie because I just use it for games and not very often.
Anyways, it booted fine the first few times but now I randomly (I say randomly because sometimes I get into Crunchbang for no apparent reason) get this:

error: unknown filesystem
grub rescue >


I reboot my computer a couple of times and still get the same problem. Then I went into the BIOS settings to switch first boot drive to hdd-0(XP) and it runs. I reboot and switch back to boot hdd-1 first and boom, Crunchbang runs like nothing happened.

What seems to be the problem? I tried it this morning again, I just have to set bios to boot XP and the enter setup mode immediately (without booting xp) then set it to boot Crunchbang and it worked. I don't understand. At all.

Should I post my grub config (which I assume will exist somewhere on my computer)?

EDIT: I think I figured something out, maybe...
I istalled crunchbang without the XP drive inserted, and crunchbang then became hdd-0 (I assume). And then GRUB will look at hdd-0 for crunchbang but it really is on hdd-1 now when the xp drive is inserted?
How do I make GRUB think that it should look at hdd-1 instead of hdd-0? If that is even the problem...

Last edited by hagel; 03-23-2011 at 07:37 AM.
 
Old 03-23-2011, 09:12 AM   #2
Soadyheid
Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Posts: 724

Rep: Reputation: 121Reputation: 121
Quote:
EDIT: I think I figured something out, maybe...
I istalled crunchbang without the XP drive inserted, and crunchbang then became hdd-0 (I assume). And then GRUB will look at hdd-0 for crunchbang but it really is on hdd-1 now when the xp drive is inserted?
How do I make GRUB think that it should look at hdd-1 instead of hdd-0? If that is even the problem...
I think you've got it! You can't remove a drive and expect it to boot properly. Have you got room in your system to fit both drives? If so, get the XP one working first, you'll probably have to re-write the MBR. Once it's OK, fit the second drive and install Crunchbang. Grub should then give you a dual boot option with Crunchbang as the default.

Play BonnY!
 
Old 03-23-2011, 09:17 AM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,743

Rep: Reputation: 299Reputation: 299Reputation: 299
Quote:
EDIT: I think I figured something out, maybe...
I istalled crunchbang without the XP drive inserted, and crunchbang then became hdd-0 (I assume). And then GRUB will look at hdd-0 for crunchbang but it really is on hdd-1 now when the xp drive is inserted?
How do I make GRUB think that it should look at hdd-1 instead of hdd-0? If that is even the problem...
That's correct. With the xp drive disconnected, crunchbang didn't know xp existed, so it behaved as though crunchbang is on the only drive. When you connect the xp drive, it upsets the crunchbang config.

To correct this, boot crunchbang, then, with both drives connected, open a terminal and go to the grub prompt (type grub and press enter). At the grub> prompt, run this command: grub> find /boot/grub/stage1. That will tell you whether grub in on hd0 or hd1. Assuming grub on on hd1, run this command: setup (hd0)
That will write the partition table and the first stage of grub to the MBR of the xp drive, so that grub will function correctly with both drives connected. This assumes you are using grub legacy instead of grub2. You will have to go to gnu.org and look up the grub2 manual for procedures with grub2.

Since xp wasn't attached when you installed crunchbang, the grub config file doesn't include xp. You will have to edit the config file to manually add an entry for xp so that you can choose to boot xp or crunchbang from the grub menu.

Do yourself a favor and make a copy of the xp MBR before you run the commands above. In future, if you want to restore the MBR for xp, you can copy it back.
Quote:
Copy MBR only of a hard drive:

dd if=/dev/sda of=/home/sam/MBR.image bs=446 count=1

this will copy the first 446 bytes of the hard drive to a file. If you haven't already guessed, reversing the objects of *if* and *of*, in the dd command line reverses the direction of the write.
You would need to do this if you plan to remove grub and revert to xp only. You would have to restore the MBR for xp before removing grub, or you will have to jump thrugh a few hoops to get xp booting again.

Last edited by bigrigdriver; 03-23-2011 at 09:35 AM.
 
Old 03-23-2011, 12:23 PM   #4
hagel
LQ Newbie
 
Registered: Mar 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bigrigdriver View Post
To correct this, boot crunchbang, then, with both drives connected, open a terminal and go to the grub prompt (type grub and press enter).
Not at the grub rescue, right? So I have to get it going...

Quote:
Originally Posted by bigrigdriver View Post
That will write the partition table and the first stage of grub to the MBR of the xp drive, so that grub will function correctly with both drives connected.
I was hoping to leave the XP drive out of this. I don't want to mess up my data.


Quote:
Originally Posted by bigrigdriver View Post
Since xp wasn't attached when you installed crunchbang, the grub config file doesn't include xp. You will have to edit the config file to manually add an entry for xp so that you can choose to boot xp or crunchbang from the grub menu.
grub.cfg? Where is it located?


Quote:
Originally Posted by bigrigdriver View Post
Do yourself a favor and make a copy of the xp MBR before you run the commands above. In future, if you want to restore the MBR for xp, you can copy it back.

You would need to do this if you plan to remove grub and revert to xp only. You would have to restore the MBR for xp before removing grub, or you will have to jump thrugh a few hoops to get xp booting again.
I'm fine with booting from hdd-1 forever. I really don't want to mess with the XP harddrive. Is it possible to not do anything with hdd-0 and set it to boot to hdd-1 instead, and then choose XP if I need to? I really only play games on the XP drive, but it got a lot of important stuff on it aswell. Linux should be my new primary system.

Thanks for the answers!
 
Old 03-23-2011, 10:37 PM   #5
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,522

Rep: Reputation: 702Reputation: 702Reputation: 702Reputation: 702Reputation: 702Reputation: 702Reputation: 702
Boot you Crunchbang install. I'm not sure where to find the terminal as I've not used Crunchbang. There must be a menu or tabs at the top like Ubuntu? Did you install Grub2 to the master boot record of the drive it is on or to the xp drive? or do you know? If you have it in the mbr of the Crunchbang external drive, boot it up and run sudo update-grub with the xp drive attached. You can set your external Crunchbang drive to first boot priority if you want. The grub.cfg file is in /boot/grub directory.
 
Old 03-24-2011, 12:11 AM   #6
EDDY1
Guru
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 5,077

Rep: Reputation: 448Reputation: 448Reputation: 448Reputation: 448Reputation: 448
I would just leave them both connected, boot into crunchbang and run
Quote:
update-grub
or
Quote:
sudo update-grub
whichever works for you.
It'll detect both os.
 
Old 03-24-2011, 01:02 AM   #7
hagel
LQ Newbie
 
Registered: Mar 2011
Posts: 3

Original Poster
Rep: Reputation: 0
I will try
Quote:
sudo update-grub
when I get home from work.

Thanks guys, you rule.
 
  


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: unknown filesystem, grub rescue magnecticfield Linux - Newbie 28 07-30-2013 03:35 AM
Error on startup. Unknown file filesystem grub rescue>. What to do?? bensheeler Linux - Newbie 3 03-08-2011 03:18 AM
Error: unknown filesystem grub rescue 2lum2 Linux - Software 3 02-13-2011 09:11 PM
Grub error unknown filesystem...really messed stuff up! sillyreed Linux - Newbie 10 01-11-2011 01:55 PM
Grub error: unknown filesystem LydonZA Linux - Newbie 6 05-27-2010 06:00 AM


All times are GMT -5. The time now is 03:11 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration