Grub error 2

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Husse

Re: Grub error 2

Post by Husse »

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
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Husse

Re: Grub error 2

Post by Husse »

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/
Guest

Re: Grub error 2

Post by Guest »

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

Post by Guest »

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

Post by Guest »

bump.
Transitman
Level 2
Level 2
Posts: 95
Joined: Sun Dec 02, 2007 1:48 am

Re: Grub error 2

Post by Transitman »

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.
Husse

Re: Grub error 2

Post by Husse »

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....
Transitman
Level 2
Level 2
Posts: 95
Joined: Sun Dec 02, 2007 1:48 am

Re: Grub error 2

Post by Transitman »

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.
User avatar
BakUp
Level 3
Level 3
Posts: 197
Joined: Sun Sep 23, 2007 9:20 am
Location: Minnesota USA

Re: Grub error 2

Post by BakUp »

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
Husse

Re: Grub error 2

Post by Husse »

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.
Locked

Return to “Installation & Boot”