LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Grub2 - Error 15 (https://www.linuxquestions.org/questions/linux-software-2/grub2-error-15-a-794595/)

telestrial 03-10-2010 11:32 PM

Grub2 - Error 15
 
Hello

As the title suggests, I upgraded to Grub2...probably foolishly so because now my computer will not boot. I get error 15 before the choices even come up. I searched around the forums and google and for the most part saw this solution. However, this does not work. All the commands input successfully, but it hasn't fixed the problem. I'm running 9.10 on a Sony-Vaio FW-139E.

Note: this is after I already did the "upgrade-from-legacy" thing. I boot each option successfully before doing this.

Thanks for any help you can give!

syg00 03-11-2010 12:48 AM

Did you take note of the instruction to make a selection with the space bar ?.

telestrial 03-11-2010 08:40 AM

The first thing that came up said something about a string it took from somewhere...but it was blank....so I just hit okay. Then it asked something else...and I left that default..and hit okay. Then it came up with the informational thing...again I hit okay. And then I selected "sda" as the target device.

Did I miss something?

fair_is_fair 03-11-2010 12:42 PM

You can boot up the live cd and run these commands via terminal.

ls /media [This will show you the partitions. Pick the one where 9.10 is installed and input the volume number into the next command.

sudo grub-setup -d /volume number/sda5/boot/grub /dev/sda [specify your 9.10 partition number in sda5. This will reinstall grub2 to mbr.

sudo grub-setup /dev/sda

This should restore grub2 for you. Worked for me.

telestrial 03-11-2010 03:54 PM

You meant that ls /media would show the volume number, right? That's how I interpreted it.

Anyway....this is what I got:

Code:

grub-setup: error: Cannot open `/boot/grub/device.map'
=\

Any suggestions?

fair_is_fair 03-11-2010 04:21 PM

Mount the partition 9.10 is on via "places" or "computer" in your task bar. I assume you are running the live cd. It will give you the volume number right at the top of the file browser. Try and run the commands again.

If you are getting the error after running the commands with the proper volume number then I'm lost.

telestrial 03-11-2010 04:25 PM

Still nothing. I can even go through the file system and see device.map. It is there.

....so......?

fair_is_fair 03-11-2010 04:42 PM

Grub2 doesn't have a device.map. Are you sure you are dealing with grub2? Grub2 is the default bootloader for ubuntu 9.10 which I assumed you have installed.

syg00 03-11-2010 04:53 PM

Grub2 is only the default on Karmic for fresh installs - upgrades retain (legacy) grub.
I believe this to be the OPs situation.

For reasons that are becoming apparent in the wider user base I refuse to use grub2. Unfortunately I can't help with this.

fair_is_fair 03-11-2010 05:02 PM

For legacy grub the commands would be:

sudo grub

> root (hd0,0)

> setup (hd0)

> exit

(hd0,0) would be the partition legacy grub files are on, hence your linux installation. If your linux install is on sda4 then you would use (hd0,3). Legacy grub always numbers the first partition 0.

(hd0) would signify the mbr of your drive sda.

find /boot/grub/stage1 is the command to find your grub installation if you are unsure.

yancek 03-11-2010 05:11 PM

Did you do a fresh install of Ubuntu 9.10?
The "upgrade from legacy thing" you refer to in your first post, was that update from Grub legacy?

How many hard drives do you have, one?
What operating systems do you have, only Ubuntu?
Open a terminal and run the command "sudo fdisk -l", without quotes, lower case Letter L in command and post the output here.
Do you have a menu.lst file in /boot/grub directory?
Do you have a grub.cfg file in /boot/grub directory?

fair_is_fair 03-11-2010 05:12 PM

Thanks syg. I was not aware of that. Thus lies the crux of the problem.

I've had to spend quite a bit of time with grub2 lately dealing with my own multiboot situations.

telestrial 03-11-2010 05:53 PM

Hey guys. I figured it out! I guess when you have a midterm paper due the following day you get gutsy and experiment....

To explain my situation: I updated to 9.10 from whatever came before...so I still had original grub..BUT..I (of course) wanted the newest. I don't know why. I dual-boot Ubuntu and Vista. Vista has a recovery partition and a normal one, and ubuntu has its "/" and then swap. I downloaded the grub2 package...ran it...rebooted, and everything checked out. I booted into both Windows and Linux fine. SO...I did the "upgrade-from-legacy-grub" thing in terminal..and rebooted...error 15.

All that I needed to do apart from what you told me was chroot into the partition that had /boot/grub on it.

...I don't know why.

Thanks for the help, though. I wouldn't mind posting the entire process if need be. ...It is nothing magical.

aus9 03-11-2010 06:26 PM

hi

in case ppl come here from a google search.....let me repeat that error 15 is a grub-legacy error messsage and not a grub2 error.

Therefore, your bootloader was either grub-legacy in mbr.....looking for a file.....and not finding it or (and rarely)
grub2 is in mbr....chainloads to grub-legacy.....grub-legacy looking for a file and not finding it.

2) In most cases.....a live cd....with chroot commands and running in root mode.....the command upgrade-from-grub-legacy will solve it

this command knows you are using grub-legacy and you select the correct drive.....eg /dev/sda....to install grub2 into the correct mbr.

3) It gets exciting when ppl are not sure which is their corrrect drive.....when they have multiple drives....and or they do things with their bios boot order.

4) grub2 has a device.map file FYI my contents is

(hd0) /dev/sda

5) Only for the technical purists....there is a way....normally using a live cd....to tell which grub is in mbr.....for each of your drives.....but you still need to check your bios boot order...............

...change sda for hda or sdb etc

Code:

dd if=/dev/sda bs=512 count=1 | strings
GRUB
ZRr=
1+0 records in
1+0 records out
`|f       
\|f1
GRUB
512 bytes (512 B) copiedGeom
Hard Disk
Read
 Error
, 1.8806e-05 s, 27.2 MB/s

one of my older researching neatened up had this

Code:

legacy output
GRUB
ZRrK
D|f1
GRUB
Geom
Hard Disk
Read
 Error


grub2 output
GRUB
ZRr=
H|f
D|f1
GRUB
Geom
Hard Disk
Read
 Error

and its hard to tell sometimes so here is the cheat...grub2 (hopefully) should have a string of .......*|f


All times are GMT -5. The time now is 10:13 PM.