Jump to content
  • Announcements

    • spinynorman

      Mandriva Official Documentation

      Official documentation for extant versions of Mandriva can be found at doc.mandriva.com.   Documentation for the latest release may take some time to appear there. You can install all the manuals from the main repository if you have Mandriva installed - files are prefixed mandriva-doc.
    • paul

      Forum software upgrade   10/29/17

      So you may have noticed the forum software has upgraded !!!
      A few things that have changed. We no longer have community blogs (was never really used) We no longer have a portal page.
      We can discuss this, and decide whether it is needed (It costs money) See this thread: Here
rambutan

Cannot Boot Mandriva 2008.1 - Grub Error 2

Recommended Posts

Edited: My solution is in Post #15.

 

Original Post:

I installed Mandriva 2008 Spring, booted it a few times. Then I copied the menu.lst stanza for "linux" from the new installation /dev/sdb11 to my existing menu.lst on /dev/sda6. At boot I went to the grub prompt and ran >setup (hd0) (hd0,5) like I've done for a year. But Mandriva will not boot. I get a grub error of Error 2 which from the web I see:

2 : "Selected disk doesn't exist"

This error is returned if the device part of a device- or full filename refers to a disk or BIOS device that is not present or not recognized by the BIOS in the system.

OK. I'm having no trouble booting the other 10 OSes that are on sdb. SuSE, Debian, Ubuntu boot fine from sdb. Faster to reinstall than to debug. So I did. This time I copied an old stanza from the old menu.lst to the new menu.lst of Mandriva (/dev/sdb11). Boots fine both Mandriva and the copied stanza. OK now I point Grub back to the menu.lst I want to use. grub> setup (hd0) (hd0,5) again. Same results, all the old OSes are fine, Mandriva is stuck at Error 2.

So I tried the LiveCD for rescue. In rescue mode it offers to reinstall Grub or MBR or such (I forgot the text). I tried that and got:

"release file doesn't contain 'Mandriva'" then "program exited abnormally". What's that mean?

Mandriva uses links to vmlinuz and initrd. So I edited to have the full file name rather than a link. I tried both UUID and /dev/ ... Still Error 2. :wall:

 

Anyone know what Mandriva is doing that is upsetting GRUB? I see it is still Grub version 0.97 so it should work on another menu.lst. I cannot do

grub>setup (hd1) (hd1,10)

Grub complains about not finding stage 1 and stage 2 although I see they are there. Even when I try a valid entry on sdb like >setup (hd1) (hd1,1) it looks like it works but still shows the menu from /dev/sda6.

Edited by rambutan

Share this post


Link to post
Share on other sites
I installed Mandriva 2008 Spring, booted it a few times. Then I copied the menu.lst stanza for "linux" from the new installation /dev/sdb11 to my existing menu.lst on /dev/sda6. At boot I went to the grub prompt and ran >setup (hd0) (hd0,5) like I've done for a year. But Mandriva will not boot. I get a grub error of Error 2 which from the web I see:

2 : "Selected disk doesn't exist"

 

You are probably experiencing this bug:

 

https://qa.mandriva.com/show_bug.cgi?id=38054

 

Jim

Share this post


Link to post
Share on other sites

Thank you.

Having read the bug report I know to dump Mandriva until it is fixed, which may be never.

I will not spend my time setting up Mandriva like I want it only to find that when I install Ubuntu 8.04 Mandriva becomes unreachable and all my effort was wasted!

I pitty users that add new distros only to find Mandriva is suddenly history! This sounds more like MS than Mandriva :(

Edited by rambutan

Share this post


Link to post
Share on other sites

From your post it seems as if you collect Linux OSs as a hobby and are prepared to play around with them, yet after reading the bug report you are not prepared to give Mandriva a chance. Does not seem as if you use Linux to simply get work done.

 

It also seems that you ignored the fact that this problem has been caused by Mandriva trying to move to a future standard. Something the other OSs are very slow at doing.

 

The issue is no problem for any Mandriva users who do not boot multi Linux OSs (the vast vast majority) and is only a minor inconvenience to those who only Dual boot 2 Linuxs ( Mandriva and other Linux or both Mandriva) such as myself. When I installed 2008-Spring I let it install Grub as the boot loader with a view that I could get back into 2008 Free any time I wanted to only to find that 2008 was already listed there and when I selected 2008Free it went to what seemed like its original Grub display ( it wasn't though) so I had nothing to worry about.

 

Two days ago I installed a new Mainboard and New Video card as well so I decided to reinstall 2008-Free so there would not be any problems resulting from basic hardware changes. I reinstalled 2008-Spring for the same reason and once again I was able to boot into both Mandrivas without having to fiddle around making changes to Grubs menu.lst. A huge improvement on the past.

 

I think you are "cutting off your nose to spite your face" as the old saying goes. It is YOUR loss not Mandrivas or ours.

 

Every OS has its bugs and problems and Mandriva is no exception to the rule but considering the numerous significant changes made in Mandriva-Spring I have less and less problems in Mandriva from version to version. This current one is a real goer.

 

Cheers. John.

Share this post


Link to post
Share on other sites
You are probably experiencing this bug:

 

https://qa.mandriva.com/show_bug.cgi?id=38054

 

Jim

 

Quite ironically the security certificate of the above site is invalid! :huh:

Why should a company provide secure logins while it cannot sign them properly is beyond my understanding (or the technical skills of the Mandriva webmaster- whatever sounds more logical to you...).

Share this post


Link to post
Share on other sites

AussieJohn is right. There are ways to get around the problem. In his case he let the new Grub control things, all is well. But what would happen if he installed Mandriva 2007 to a fresh partition on his hard drive, letting it install Grub (standard install)? He would find he can no longer get to Mandriva 2008. Even the LiveCD will not fix the problem. More likely though a Mandriva 2008 user will try Ubuntu on a new partition then get blind sided with the Mandriva cannot be reached problem.

What to do? what to do? Mandriva's LiveCD cannot get Mandriva back. OK so set aside another partition and do a fresh install of Mandriva there. Once that install of Mandriva is complete then you can point back to the original Mandriva and recover your lost work.

I disagree with Mandriva locking their users in on the bleeding edge of a new standard. AussieJohn is right that the Mandriva user is safe as long as he/she remains locked-in to Mandriva.

Look at Ubuntu 8.04 with Firefox 3. Firefox 3 implements a new standard for bookmarks, no longer bookmarks.html but rather a sqlite database file. No compatability for Firefox 2 and Firefox 3 for bookmarks. With Linux I use simple links so my Firefox bookmarks file is the same file for Ubuntu, Fedora, SuSE, Debian ... Now with the new standard I will not use Ubuntu 8.04 for Firefox until my other main distros are all on board with it. Another new standard causing transition problems. I wish they offered both FF2 and FF3 and let the user choose the timing of the switch.

My approach is I am not locked-in to one distro only. I can use the best of the best for whatever task they are best at. I have tried Mandriva before. The fact I'm here says I'm giving it another go.

Share this post


Link to post
Share on other sites

Rambutan, you say that you have been using the commands you quoted for a while so I guess they must have worked for you in the past, but I have never actually seen them written like that before. The 'setup' command writes the boot information to the hard drive, but I always understood that you have to specify where the config files are first. So if I were setting up the system you suggested I would run:

 

grub> root (hd0,5)

 

followed by

 

grub> setup (hd0)

 

Maybe your method amounts to the same thing, but it might be worth a try just in case.

Share this post


Link to post
Share on other sites

Hi viking777

Thanks for the suggestion. I did try it - same results. I searched some more and found

http://www.gnu.org/software/grub/manual/grub.html

setup [--force-lba] [--stage2=os_stage2_file] [--prefix=dir] install_device [image_device]

So [image_device] is an option.

 

I did reinstall Mandriva and play with it some more. As long as I let Mandriva own GRUB I'm safe. Now I'm researching/testing:

second install of Madriva to rescue first install after being locked out (30 mintues +)

dd to make copies of MBR --- may allow simple dd to restore MBR (5 minutes)

GRUB 2 vs GRUB legacy and use of setup tools - maybe GRUB has a fix.

 

On a positive note the most important task I was testing Mandriva for is Skype. I have an old Gateway where Skype works fine with Ubuntu and SuSE. I have a new Dell where Skype is a major challenge for Ubuntu, works better in SuSE. In Mandriva on the Dell I got the best resolution+stability yet so Mandriva is a keeper. Which means I have to find my best work-around to this Grub issue Mandriva has caused.

Share this post


Link to post
Share on other sites

I have a very similar situation. I obviously work my computer in a similar way to yours, at least with respect to Grub, but I also had an issue with mandriva not booting when I carried out my normal procedure (copying menu.lst entries into whatever version of grub I am using). My solution was the same as yours and for similar reasons, in other words I let Mandriva 'own' grub as you put it and that works OK. In my case it was the ease of operation of my 2 hsdpa modems with Mandriva that makes me want to stay with it, that and the fact that once in a while it actually shuts my laptop down completely rather than leaving it hanging, and no other distro on the planet does that.

 

But Linux is like life, nothing is perfect, compromise rules!

Share this post


Link to post
Share on other sites

I had some success but I cannot get repeatability.

I played with /Mandriva/boot/grub some. The problem is that GNU/Grub has created a new GRUB, Grub2 leaving the old world as Grub legacy. In the Grub 2 world there is no stage 1.5. In Grub legacy setup checks for stage 1.5 --- cannot find it and give an error message. When you try to boot from Grub legacy into Grub2 you get Error 2 which I think relates to stage 1.5 but I'm not sure.

After playing with /Mandriva/boot/grub of course I could not boot it any more. So I ran grub>setup and I'm back in grub-legacy. But the partition and files are still there. For a safe sand-box I cloned Mandriva partition to an empty partition. I booted to Ubuntu and used

$ sudo cp -a /Mandriva.original/* /Mandriva.new/

Then in /Mandriva.new/boot I renamed the grub folder to Mandriva.grub. Then I copied in the grub folder from /Ubuntu/boot/ I edited menu.lst and /Mandriva.new/etc/fstab and Mandriva booted up. Cool.

But here is the issue I'm still working on. I tried to edit /Mandriva.original to do the same thing but I cannot get it past Grub Error 2! Why won't this work twice?

I'll install Mandriva on my other PC and test this some more.

Share this post


Link to post
Share on other sites

Someone has mentioned a possible fix for this issue in this week's Distrowatch Weekly comment thread - take a look at that...

Share this post


Link to post
Share on other sites

Hi adamw,

 

I deleted my bookmarks for DistroWatch last year and haven't been back until now. I found their hit parade a manipulated joke and their comments mostly juvenile. But I put on my boots and waded in. Searching through the comments for Mandriva I could not find an answer to this problem. I was glad I had my barn boots on, things haven't changed. Which week number and comment number were you referring to? I could not locate anything useful.

 

On with more tests...

On a second PC I got the same results.

cp -a /Mandriva.old/* /Mandriva.new/

copy in grub from old "grub-legacy" to /Mandriva.new/boot/

Mandriva.new boots from grub-legacy, all seems fine.

But just like the first test when I copy in a new grub to /Mandriva.old it still crashes with Error 2. Replacing the grub folder is not enough it must also be copied (cp -a) to a new partition. Oh well. At least now I have Grub back under control and have Mandriva booting on both the PCs. I can still play with new Distros without getting locked out of Mandriva.

If Grub-2 somehow proves superior for desktops then other Distros will follow. I just hope they do a better job of compatibility with Grub-legacy.

Share this post


Link to post
Share on other sites

Thanks adamw,

DistroWatch has new comments each week. The one adamw is referring to is

http://distrowatch.com/weekly.php?issue=20080414&mode=67

Comments 26 - 34 - 68 - 74 are discussing this problem. More may follow.

The idea of #34 is use chainloader like for the Windows partition.

title Mandriva

root (hd0,x)

chainloader +1

I tried this and it did not work for me. I'll test some more, maybe I hit the wrong partition.

Sidux seems to be in the same boat. Other posts talk of reinstalling grub by booting the Sidux LiveCD and using grub-install.

Another bug report is given:

https://qa.mandriva.com/show_bug.cgi?id=37897

This talked of some chroot and ./install to repair the damage.

 

My current theory (theory since I don't know enough to be sure):

the problem relates to inode size (whatever that is). New = 256 old=128

My guess: "cp -a" uses inode size of 128 in the copy so the copy is fine with legacy grub. Since the original is still 256 a new grub doesn't rescue the orignal installation. Thus "cp -a" becomes the filter that saves the original installation at the cost of a few minutes and a fresh partition.

Share this post


Link to post
Share on other sites

Two more tests I wanted to try:

Copy the problem partition somewhere then copy it back on top of itself and see if it's cured. It was.

Install another Linux Distro and a fresh Grub. See if Mandriva is still OK. It was.

 

My suggestion for others who hit this problem:

 

#A# – if you just installed Mandriva but haven't really done anything with it copy the whole partition to a folder where there is space then copy it back in. Edit /etc/fstab to use /dev/sdaX not UUID and it boots (use “cp -a†not nautilus).

 

#A# - Simply copy, clear and copy back in (I'm using Ubuntu 7.04)

$ sudo mount /dev/sdaX /Mandriva --- mount the Mandriva partition

$ df --- check sizes and available space

$ sudo mkdir /partitionwithspace/Mandriva --- make a new directory to hold all the Mandriva partition (3 GB?).

$ sudo cp -a /Mandriva/* /partitionwithspace/Mandriva/

gparted --- unmount and format the Mandriva partition (effectively erases what's there, changes UUID)

$ sudo mount /dev/sdaX /Mandriva --- mount the Mandriva partition again.

$ sudo cp -a /partitionwithspace/Mandriva/* /Mandriva/ --- puts Mandriva back where you got it

$ sudo gedit /Mandriva/etc/fstab --- change “/†from UUID to /dev/sdaX

Mandriva is now bootable. No more Error 2.

Prove to yourself that it's now OK then use Nautilus to delete the temporary copy. Be sure you delete it not just move it to trash or it will not free up the 3 GB.

 

#B# - If you have lots of time invested in your Mandriva setup and are very adverse to risk, then copy (“cp -aâ€) the Mandriva partition to a new partition, edit the new /etc/fstab to have root use the new partition and it boots.

 

#B# - More complex but safer because the original remains unchanged. Copy to new partition and use that:

$ sudo mount /dev/sdaX /Mandriva --- mount the Mandriva partition

$ df --- check sizes and available space

gparted --- make a new partition for Mandriva

$ sudo mkdir /NewMandriva

$ sudo mount /dev/sdaY /NewMandriva

$ sudo cp -a /Mandriva/* /NewMandriva/

$ sudo gedit /NewMandriva/etc/fstab --- edit the line that says where “/†is, use /dev/sdaY

$ sudo gedit /boot/grub/menu.lst --- add a new stanza for the new partition with Mandriva (copy old Mandriva stanza but change the partition number as needed)

Mandriva is now bootable. No more Error 2.

 

I encourage users to read all the posts. Maybe someone else has a way that suits you better.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×