Grub error 2

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read this

Grub error 2

Postby newbieboy on Sat Nov 24, 2007 7:34 am

hi guys just downloaded the live cd installed it with the defaults but now get the followng

GRUB loading stage1.5
Grub loading.please wait
Error 2



If its of use Im using SATA disks. Any advice on solving, or getting my MBR back to Windows partition welcome.

sudo fdisk -l
DEVICE BOOT START END ID System

/dev/sda1 * 1 8624 83 Linux
/dev/sda2 8625 8996 5 Extended
/dev/sda5 8625 8996 82 Linux Swap / solaris

Disk /dev/sdb 74.0 GB
255 heads 63 sectors / tracjs

Disk /dev/sdb doesn't contain a valid partition table.
newbieboy
Level 1
Level 1
 
Posts: 2
Joined: Sat Nov 24, 2007 7:30 am

Linux Mint is funded by ads and donations.
 

Re: Grub error 2

Postby Husse on Sat Nov 24, 2007 8:30 am

Error 2 is a stage 2 error
2 : Bad file or directory type
This error is returned if a file requested is not a regular file, but something like a symbolic link, directory, or FIFO.

And you have
Disk /dev/sdb doesn't contain a valid partition table.

Have you ever managed to boot or is this at the first boot?
Anyway it seems that the disk sdb is corrupted, the errors add up....
Don't despair, but open your computer (which probably is a desktop - very few laptops have two disks) and check that the cables are firmly attached to the disk. Errors in this area are much more common with IDE disks, but occur with SATA as well.
If they were, try to boot with sdb disconnected.
If you still have a failure let's hope you have a real Windows CD.
Boot with it, and run fixmbr. Now my Windows knowledge is slightly fading, but I believe there is an option to use the recovery console and that's the option to use.
After running fixmbr you loose grub and will have to repair it - no big deal
http://www.linuxmint.com/wiki/index.php ... _your_grub
If you don't have a real Windows CD post back with details of your Windows
An install in sda does not affect sdb, but the error may have been tolerated by Windows
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: Grub error 2

Postby newbieboy on Sat Nov 24, 2007 8:39 am

The computer booted fine before - I was running XP. I should be able to issue fixMBR to get back into windows. Its a Dell machine - I *think* it has the recovery partition in place - I know this is an issue from reading around.

If they were, try to boot with sdb disconnected.


Can you elaborate? Im a complete newb.
newbieboy
Level 1
Level 1
 
Posts: 2
Joined: Sat Nov 24, 2007 7:30 am

Re: Grub error 2

Postby Husse on Sun Nov 25, 2007 3:02 pm

Sorry I should have written "are" not "were"
If the disks are properly connected, disconnect sdb and see what happens.
It may be the recovery partition...
I'm not quite sure of what happens, but it seems that Linux does not understand the situation when the recovery partition is there, and that's maybe why you get "Disk /dev/sdb doesn't contain a valid partition table."
If you have it you don't have a real Windows CD (with that computer) However supergrub can fix your Windows mbr - never tried it though (a bit odd home page)
http://supergrub.forjamari.linex.org/
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: Grub error 2

Postby Guest on Mon Nov 26, 2007 1:36 pm

Hey thanks for the reply,


sdb disconnect - how do I do that? Or what is SDB?



I have managed to find a Windows disk - but I can't seem to get it to install either - my floppy disk appears to be goosed - and I need it to install SATA drivers! AHHHHHH.

Is there any way I can use Linux to say...check if my floppy disk is ok? And if so copy files over from the web onto it, which can be used to get my Windows up and running again. I think I've managed to delete my Windows partition over the weekend in the process. But I'm ok with the data disappearing so I'm opting for a fresh install - I would however like to get Linux sorted, even if to just get me back up and running with the Web.
Guest
 

Re: Grub error 2

Postby Guest on Mon Nov 26, 2007 1:39 pm

im a plonker.
SDB - is the secondary hard drive. I see.

SDB in this case I think is my external hard drive. I've tried booting with it d/c'd and I've tried installing linux on my SATA disks. Same error.

Paul.
Guest
 

Re: Grub error 2

Postby Guest on Thu Nov 29, 2007 2:34 pm

bump.
Guest
 

Re: Grub error 2

Postby Transitman on Sun Dec 02, 2007 2:08 am

I was getting the same error in the last 24 hours.
All of my drives were ok, and I even went and re-installed Ubuntu Gutsy, which automatically configured the Grub paramaters for me.

What is happening is that the installer for Linux Mint is not correctly installing the boot loader, placing the notation of where it may be installed on another drive as opposed to where it really is.

A suggestion, download and burn a copy of Ubuntu or Xubuntu and install it. Once it is installed and running, open a terminal and copy/paste this command in the terminal "sudo edit /boot/grub/menu.lst" and and also make another copy and save it to another location for reference. Also, take note as to where the Linux OS is located (hd1,1) (yours may vary)
Then, after doing this, re-install Mint, attempt to log in (it will fail again with a Grub Error 22), the load and run another LiveCD OS, preferably not Ubuntu flavored or Mint. I used PCLinuxOS to make the changes need in Grub. I went to /boot/grub/menu.lst and opened it in the LiveCD text editor and made the changes in the Linux Mint loader from (hd2,1) to (hd1,1), rebooted and was greeted by the Mint OS loaded on my hard drive.

I know it sounds and looks like a lot of work, but it does work, as I am typing from Linux Mint 4.0 right now.
Transitman
Level 2
Level 2
 
Posts: 98
Joined: Sun Dec 02, 2007 1:48 am

Re: Grub error 2

Postby Husse on Mon Dec 03, 2007 7:13 am

Welcome to Mint Transitman
??
This seems like nonsense to me :) - but if it works....
No Ubiqity - the installer - puts grub where it tells you it puts grub. Ubuntu and Mint use the same installer
And why should anyone open menu.lst for editing and then not do any editing? Furthermore "sudo edit /boot/grub/menu.lst" is wrong - if you wanted to edit it would be "sudo gedit /boot/grub/menu.lst"
LiveCD text editor and made the changes in the Linux Mint loader from (hd2,1) to (hd1,1), rebooted and was greeted by the Mint OS loaded on my hard drive.

If you had chosen hd(1,1) from the beginning this would not have happened, unless you changed the disks.
If needed you could do it from the Mint live CD. It does not like changes to the disks but will accept it if you sudo...
But as stated - if it works then, great....
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: Grub error 2

Postby Transitman on Mon Dec 03, 2007 4:51 pm

Husse wrote:Welcome to Mint Transitman
??
This seems like nonsense to me :) - but if it works....
No Ubiqity - the installer - puts grub where it tells you it puts grub. Ubuntu and Mint use the same installer

If you had chosen hd(1,1) from the beginning this would not have happened, unless you changed the disks.
If needed you could do it from the Mint live CD. It does not like changes to the disks but will accept it if you sudo...
But as stated - if it works then, great....


Thank you for the welcome.

If "Ubiqity" is the same in both Ubuntu and Mint, then why is there a problem in the Mint install, leaving everything default, and there were no problems with the Ubuntu install, leaving everything default?
It seems like Ubiqity is having a bit of trouble of deciding where to place tthe Grub loader in Mint.

Also, as I pointed out, when this problem developed, and knowing that Mint is built off the *Buntu platform, I did a re-install of Ubuntu, just to be sure there were no problems on the install. When Ubuntu booted from hard-disk like it always had, and this is from a fresh install, I then went back to the Mint installer and did a fresh install again, whereby the Grub 22 error reared its ugly head.

After more digging around, I found the problem and corrected it.
But, if as you say Mint should not have done this, then therein lies a problem. Somewhere down the line the Ubiqity installer got hosed when it was compiled by the Mint team, or not.
And to further test the install method of Mint, i re-downloaded a fresh copy of Mint onto another computer, verified the MD5 checksum, burnt the CD with ImgBurn in Windows and the install still failed upon restart with a Grub 22 error.

I have 3 SDA disks in my computer, 1 for Windows and all programs, 1 for all my music, and 1 for my Linux OS.
All 3 drives showed in the partioner, and I used the manual method to make sure that the correct drive was the one to get the Linux OS. I did this in both Ubuntu and Mint. Ubuntu passed on the install, Mint failed.
So now, how does one explain this??

BTW, I have been using Linux full-time since Ubuntu 5.10, or about 2 years.
Transitman
Level 2
Level 2
 
Posts: 98
Joined: Sun Dec 02, 2007 1:48 am

Re: Grub error 2

Postby BakUp on Tue Dec 04, 2007 8:10 am

Transitman wrote:So now, how does one explain this??


Most likely you have hardware that is right on the edge, is not that uncommon then that it will work with one distro and not the other, even though they may be based the same. Husse is very knowledgeable and tries his best to help everyone, which is a tall order.

cheers,
BakUp
User avatar
BakUp
Level 4
Level 4
 
Posts: 200
Joined: Sun Sep 23, 2007 9:20 am
Location: Minnesota USA

Re: Grub error 2

Postby Husse on Wed Dec 05, 2007 4:12 pm

There is a bit to read here, and forgive me for not having read it carefully, but in this post or possibly another recent post I think the error was because the person asking for help did not understand that grub counts from zero so hd(0,0) is the first partition on the first disk, which would be /dev/sda1.
One has to be careful with the numbering in grub.
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Linux Mint is funded by ads and donations.
 

Return to Installation & Boot

Who is online

Users browsing this forum: No registered users and 9 guests